templateCreat.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981
  1. <template>
  2. <div class="mainBox">
  3. <div class="topMenuBox">
  4. <div>
  5. <el-button icon="el-icon-refresh" type="warning" size="small">随机生成模板</el-button>
  6. </div>
  7. <div>
  8. <el-button icon="el-icon-right" type="primary" size="small" @click="gotoList">首页</el-button>
  9. <el-button icon="el-icon-right" type="primary" size="small" @click="gotoList">分类页</el-button>
  10. <el-button icon="el-icon-right" type="primary" size="small" @click="gotoList">列表页</el-button>
  11. <el-button icon="el-icon-right" type="primary" size="small" @click="gotoList">详情页</el-button>
  12. </div>
  13. <div>
  14. <el-button type="primary" size="small" @click="gotoList">保存</el-button>
  15. <el-button icon="el-icon-view" type="warning" size="small">预览</el-button>
  16. <el-button icon="el-icon-circle-close" type="info" size="small" @click="goStyle">退出编辑</el-button>
  17. </div>
  18. </div>
  19. <div class="pageTabsBox">
  20. <div>首页<i class="el-icon-circle-check"></i></div>
  21. <div>分类页<i class="el-icon-circle-check"></i></div>
  22. <div>列表页<i class="el-icon-circle-check"></i></div>
  23. <div>详情页<i class="el-icon-circle-check"></i></div>
  24. </div>
  25. <!-- <div class="layerTabsBox">
  26. <div class="layerTabsItem active">配置首页</div>
  27. <div class="layerTabsItem">配置列表页</div>
  28. <div class="layerTabsItem">配置详情页</div>
  29. </div> -->
  30. <!-- 工具栏 start ---------------------------------------->
  31. <!-- <div class="menuPostionBox">
  32. <MenuTopBox @add-module="addModule"/>
  33. </div> -->
  34. <!-- 工具栏 end ---------------------------------------->
  35. <!-- 栅格布局 预览模式 start ---------------------------------------->
  36. <div class="websiteBox">
  37. <div class="grid-layout-demo">
  38. <grid-layout :layout="layout" :col-num="12" :row-height="30" :is-draggable="true" :is-resizable="true">
  39. <grid-item
  40. v-for="(item, index) in layout"
  41. :key="item.i"
  42. :i="item.i"
  43. :x="item.x"
  44. :y="item.y"
  45. :w="item.w"
  46. :h="item.h"
  47. :is-resizable="false"
  48. >
  49. <div class="grid-item-content">
  50. <!-- 模块内容1 顶部菜单 -->
  51. <div v-if="item.type == 1" class="module1Box">
  52. <div class="module1Title">{{form.type1.welcomeText}}</div>
  53. <div class="module1LoginLink">{{form.type1.linkText}}</div>
  54. <div class="shadowBox">
  55. <div class="editBtnBox">
  56. <el-button @click="openWindow(item)" type="primary" size="mini" circle>
  57. <i class="el-icon-edit"></i>
  58. </el-button>
  59. <el-button @click="deleteModule(item)" type="danger" size="mini" circle>
  60. <i class="el-icon-delete"></i>
  61. </el-button>
  62. </div>
  63. </div>
  64. </div>
  65. <!-- 模块内容2 logo栏 -->
  66. <div v-if="item.type == 2" class="module2Box">
  67. <div class="module2Logo">
  68. <div class="module2NoImgBox">
  69. <img src="@/assets/public/upload/noImage.png">
  70. <div>请添加图片</div>
  71. </div>
  72. </div>
  73. <div class="module2rightAd">
  74. <div class="module2NoImgBox">
  75. <img src="@/assets/public/upload/noImage.png">
  76. <div>请添加图片</div>
  77. </div>
  78. </div>
  79. <div class="shadowBox">
  80. <div class="editBtnBox">
  81. <el-button @click="openWindow(item)" type="primary" size="mini" circle>
  82. <i class="el-icon-edit"></i>
  83. </el-button>
  84. <el-button @click="deleteModule(item)" type="danger" size="mini" circle>
  85. <i class="el-icon-delete"></i>
  86. </el-button>
  87. </div>
  88. </div>
  89. </div>
  90. <!-- 模块内容3 导航栏 -->
  91. <div v-if="item.type == 3" class="module3Box">
  92. <div class="module3Nav">
  93. <div class="module3NavItem" v-for="(item,index) in form.type3" :key="index">{{item.linkText}}</div>
  94. </div>
  95. <div class="shadowBox">
  96. <div class="editBtnBox">
  97. <el-button @click="openWindow(item)" type="primary" size="mini" circle>
  98. <i class="el-icon-edit"></i>
  99. </el-button>
  100. <el-button @click="deleteModule(item)" type="danger" size="mini" circle>
  101. <i class="el-icon-delete"></i>
  102. </el-button>
  103. </div>
  104. </div>
  105. </div>
  106. <!-- 模块内容4 Banner -->
  107. <div v-if="item.type == 4" class="module4Box">
  108. <div class="module4Banner">
  109. <div class="module4BannerNoImgBox">
  110. <img src="@/assets/public/upload/noImage.png">
  111. <div>请添加图片</div>
  112. </div>
  113. </div>
  114. <div class="shadowBox">
  115. <div class="editBtnBox">
  116. <el-button @click="openWindow(item)" type="primary" size="mini" circle>
  117. <i class="el-icon-edit"></i>
  118. </el-button>
  119. <el-button @click="deleteModule(item)" type="danger" size="mini" circle>
  120. <i class="el-icon-delete"></i>
  121. </el-button>
  122. </div>
  123. </div>
  124. </div>
  125. <!-- 模块内容6 图片列表 -->
  126. <div v-if="item.type == 6" class="module6Box">
  127. <div class="module6imgBox">
  128. <div class="module6item">
  129. <div>
  130. <img src="@/assets/public/upload/noImage.png">
  131. <div>请添加图片</div>
  132. </div>
  133. </div>
  134. <div class="module6item">
  135. <div>
  136. <img src="@/assets/public/upload/noImage.png">
  137. <div>请添加图片</div>
  138. </div>
  139. </div>
  140. <div class="module6item">
  141. <div>
  142. <img src="@/assets/public/upload/noImage.png">
  143. <div>请添加图片</div>
  144. </div>
  145. </div>
  146. <div class="module6item">
  147. <div>
  148. <img src="@/assets/public/upload/noImage.png">
  149. <div>请添加图片</div>
  150. </div>
  151. </div>
  152. </div>
  153. <div class="shadowBox">
  154. <div class="editBtnBox">
  155. <el-button @click="openWindow(item)" type="primary" size="mini" circle>
  156. <i class="el-icon-edit"></i>
  157. </el-button>
  158. <el-button @click="deleteModule(item)" type="danger" size="mini" circle>
  159. <i class="el-icon-delete"></i>
  160. </el-button>
  161. </div>
  162. </div>
  163. </div>
  164. <!-- 模块内容7 文本列表 -->
  165. <div v-if="item.type == 7" class="module7Box">
  166. <div class="module7textList">
  167. <div v-for="(item,index) of form.type7" :key="index">{{item.linkText}}</div>
  168. </div>
  169. <div class="shadowBox">
  170. <div class="editBtnBox">
  171. <el-button @click="openWindow(item)" type="primary" size="mini" circle>
  172. <i class="el-icon-edit"></i>
  173. </el-button>
  174. <el-button @click="deleteModule(item)" type="danger" size="mini" circle>
  175. <i class="el-icon-delete"></i>
  176. </el-button>
  177. </div>
  178. </div>
  179. </div>
  180. <!-- 模块内容8 图文列表 -->
  181. <div v-if="item.type == 8" class="module8Box">
  182. <div class="module8ImgBox">
  183. <div class="module8ImgItem" v-for="(item,index) of form.type8" :key="index">
  184. <img src="@/assets/public/upload/noImage.png">
  185. <div class="module8ImgItemText">
  186. <div class="module8ImgItemTitle">{{item.title}}</div>
  187. <div class="module8ImgItemText">{{item.text}}</div>
  188. </div>
  189. </div>
  190. </div>
  191. <div class="shadowBox">
  192. <div class="editBtnBox">
  193. <el-button @click="openWindow(item)" type="primary" size="mini" circle>
  194. <i class="el-icon-edit"></i>
  195. </el-button>
  196. <el-button @click="deleteModule(item)" type="danger" size="mini" circle>
  197. <i class="el-icon-delete"></i>
  198. </el-button>
  199. </div>
  200. </div>
  201. </div>
  202. <!-- 模块内容10 友情链接 -->
  203. <div v-if="item.type == 10" class="module10Box">
  204. <div class="module10Linkbox">
  205. <div class="module10LinkImgBox">
  206. <div class="module10LinkImgItem"><img src="@/assets/public/upload/noImage.png"></div>
  207. <div class="module10LinkImgItem"><img src="@/assets/public/upload/noImage.png"></div>
  208. <div class="module10LinkImgItem"><img src="@/assets/public/upload/noImage.png"></div>
  209. <div class="module10LinkImgItem"><img src="@/assets/public/upload/noImage.png"></div>
  210. <div class="module10LinkImgItem"><img src="@/assets/public/upload/noImage.png"></div>
  211. </div>
  212. <div class="module10LinkTextBox">
  213. <div>友情链接</div>
  214. <div>友情链接</div>
  215. <div>友情链接</div>
  216. <div>友情链接</div>
  217. <div>友情链接</div>
  218. </div>
  219. </div>
  220. <div class="shadowBox">
  221. <div class="editBtnBox">
  222. <el-button @click="openWindow(item)" type="primary" size="mini" circle>
  223. <i class="el-icon-edit"></i>
  224. </el-button>
  225. <el-button @click="deleteModule(item)" type="danger" size="mini" circle>
  226. <i class="el-icon-delete"></i>
  227. </el-button>
  228. </div>
  229. </div>
  230. </div>
  231. <!-- 模块内容11 纯文本 -->
  232. <div v-if="item.type == 11" class="module11Box">
  233. <div class="module11Text">
  234. <div>说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字</div>
  235. <div>说明文字说明文字说明文字说明文字</div>
  236. </div>
  237. <div class="shadowBox">
  238. <div class="editBtnBox">
  239. <el-button @click="openWindow(item)" type="primary" size="mini" circle>
  240. <i class="el-icon-edit"></i>
  241. </el-button>
  242. <el-button @click="deleteModule(item)" type="danger" size="mini" circle>
  243. <i class="el-icon-delete"></i>
  244. </el-button>
  245. </div>
  246. </div>
  247. </div>
  248. </div>
  249. </grid-item>
  250. </grid-layout>
  251. </div>
  252. </div>
  253. <!-- 栅格布局 预览模式 end ---------------------------------------->
  254. <!--弹出框 start------------------------------------------------------------>
  255. <el-dialog title="编辑模块" :visible.sync="windowStatus">
  256. <el-form :model="form" ref="form" autocomplete="off" label-position="left">
  257. <div class="formDiv">
  258. <el-form-item label="欢迎语:" :label-width="formLabelWidth" prop="alias" class="custom-align-right">
  259. <el-input v-model="form.type1.welcomeText" autocomplete="off"></el-input>
  260. </el-form-item>
  261. <el-form-item label="登录链接标题:" :label-width="formLabelWidth" prop="alias" class="custom-align-right">
  262. <el-input v-model="form.type1.linkText" autocomplete="off"></el-input>
  263. </el-form-item>
  264. </div>
  265. </el-form>
  266. <div slot="footer" class="dialog-footer">
  267. <div>
  268. <el-button @click="closeWindow">取 消</el-button>
  269. <el-button type="primary" @click="editGridItem">确定</el-button>
  270. </div>
  271. </div>
  272. </el-dialog>
  273. <!--弹出框 end------------------------------------------------------------>
  274. </div>
  275. </template>
  276. <script>
  277. //引入公用样式
  278. import '@/styles/global.less';
  279. //引入vue-grid-layout
  280. import { GridLayout, GridItem } from 'vue-grid-layout';
  281. //标题
  282. import tableTitle from './public/tableTitle';
  283. //导入新组件
  284. //import MenuTopBox from './public/indexComponents.vue';
  285. export default {
  286. components: {
  287. GridLayout,
  288. GridItem,
  289. tableTitle,
  290. //MenuTopBox
  291. },
  292. data() {
  293. return {
  294. //页面 start------------------------------------------------------------>
  295. headerTitle: '模块',
  296. windowStatus: false,
  297. editPageStatus:0,//当前正在配置的页面 0 首页 1 分类页 2 列表页 3 详情页
  298. //页面 end------------------------------------------------------------>
  299. //弹出框 start------------------------------------------------------------>
  300. formLabelWidth: '120px',
  301. editModule: "",//待编辑的模块
  302. form: {
  303. content: '',
  304. //模块1 顶部菜单
  305. type1: {
  306. welcomeText: '欢迎光临XXX网!',
  307. linkText: '用户登录'
  308. },
  309. //模块2 logo栏
  310. type2:{
  311. logoImg: '',
  312. adImg: ''
  313. },
  314. //模块3 导航栏
  315. type3:[
  316. {linkText:"网站导航",src:"http://www.baidu.com"},
  317. {linkText:"网站导航",src:"http://www.baidu.com"},
  318. {linkText:"网站导航",src:"http://www.baidu.com"},
  319. {linkText:"网站导航",src:"http://www.baidu.com"},
  320. {linkText:"网站导航",src:"http://www.baidu.com"},
  321. {linkText:"网站导航",src:"http://www.baidu.com"},
  322. {linkText:"网站导航",src:"http://www.baidu.com"},
  323. {linkText:"网站导航",src:"http://www.baidu.com"},
  324. {linkText:"网站导航",src:"http://www.baidu.com"},
  325. {linkText:"网站导航",src:"http://www.baidu.com"},
  326. {linkText:"网站导航",src:"http://www.baidu.com"},
  327. {linkText:"网站导航",src:"http://www.baidu.com"},
  328. {linkText:"网站导航",src:"http://www.baidu.com"},
  329. {linkText:"网站导航",src:"http://www.baidu.com"},
  330. {linkText:"网站导航",src:"http://www.baidu.com"},
  331. {linkText:"网站导航",src:"http://www.baidu.com"},
  332. {linkText:"网站导航",src:"http://www.baidu.com"},
  333. {linkText:"网站导航",src:"http://www.baidu.com"},
  334. {linkText:"网站导航",src:"http://www.baidu.com"},
  335. {linkText:"网站导航",src:"http://www.baidu.com"}
  336. ],
  337. //模块7 文本列表
  338. type7:[
  339. {linkText:"新闻标题新闻标题新新闻标题新闻标题新新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题标题新闻标题新闻标题标题新闻标题新闻标题",src:"http://www.baidu.com"},
  340. {linkText:"新闻标题新闻标题新新闻标题新闻标题新新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题标题新闻标题新闻标题标题新闻标题新闻标题",src:"http://www.baidu.com"},
  341. {linkText:"新闻标题新闻标题新新闻标题新闻标题新新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题标题新闻标题新闻标题标题新闻标题新闻标题",src:"http://www.baidu.com"},
  342. {linkText:"新闻标题新闻标题新新闻标题新闻标题新新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题标题新闻标题新闻标题标题新闻标题新闻标题",src:"http://www.baidu.com"},
  343. {linkText:"新闻标题新闻标题新新闻标题新闻标题新新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题标题新闻标题新闻标题标题新闻标题新闻标题",src:"http://www.baidu.com"},
  344. {linkText:"新闻标题新闻标题新新闻标题新闻标题新新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题标题新闻标题新闻标题标题新闻标题新闻标题",src:"http://www.baidu.com"},
  345. {linkText:"新闻标题新闻标题新新闻标题新闻标题新新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题标题新闻标题新闻标题标题新闻标题新闻标题",src:"http://www.baidu.com"},
  346. ],
  347. type8:[
  348. {img:"",title:"图文列表标题",text:"图标列表描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述"},
  349. {img:"",title:"图文列表标题",text:"图标列表描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述"},
  350. {img:"",title:"图文列表标题",text:"图标列表描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述"},
  351. {img:"",title:"图文列表标题",text:"图标列表描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述"},
  352. {img:"",title:"图文列表标题",text:"图标列表描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述"},
  353. ]
  354. },
  355. //弹出框 end------------------------------------------------------------>
  356. //预览 start------------------------------------------------------------>
  357. layout: [
  358. // i = id
  359. // w = 最大宽度是12
  360. // { i: "0", x: 0, y: 0, w: 12, h: 2, content:""},
  361. // { i: "1", x: 0, y: 0, w: 12, h: 2, content:""},
  362. // { i: "2", x: 3, y: 0, w: 3, h: 2, content:""},
  363. // { i: "3", x: 6, y: 0, w: 3, h: 2, content:""}
  364. ],
  365. //预览 end------------------------------------------------------------>
  366. //保存页面信息
  367. pageData:{
  368. page_index:{
  369. },
  370. page_theme:{
  371. },
  372. page_list:{
  373. },
  374. page_article:{
  375. }
  376. }
  377. }
  378. },
  379. methods: {
  380. //0.全局操作 start ------------------------------------------------------------>
  381. //上一步
  382. goStyle(){
  383. this.$router.push({
  384. path: '/templateStyle',
  385. query: {
  386. id: this.editId
  387. }
  388. });
  389. },
  390. nextPage(){
  391. //保存页面信息
  392. this.pageData.page_theme = 1;
  393. },
  394. gotoList(){
  395. this.$router.push({
  396. path: '/templateList'
  397. });
  398. },
  399. //0.全局操作 end ------------------------------------------------------------>
  400. //添加模块
  401. addModule(type) {
  402. // 计算当前布局的最大 y 值
  403. const maxY = Math.max(...this.layout.map(item => item.y), 0);
  404. // type=1 顶部菜单
  405. if(type==1){
  406. this.layout.push({
  407. i: this.layout.length,
  408. x: 0,
  409. y: maxY + 1,
  410. w: 12,
  411. h: 1,
  412. type: type,
  413. content:""
  414. });
  415. }
  416. // type=2 logo
  417. if(type==2){
  418. this.layout.push({
  419. i: this.layout.length,
  420. x: 0,
  421. y: maxY + 1,
  422. w: 12,
  423. h: 2,
  424. type: type,
  425. content:""
  426. });
  427. }
  428. // type=3 nav
  429. if(type==3){
  430. this.layout.push({
  431. i: this.layout.length,
  432. x: 0,
  433. y: maxY + 1,
  434. w: 12,
  435. h: 2,
  436. type: type,
  437. content:""
  438. });
  439. }
  440. // type=4 banner
  441. if(type==4){
  442. this.layout.push({
  443. i: this.layout.length,
  444. x: 0,
  445. y: maxY + 1,
  446. w: 8,
  447. h: 5,
  448. type: type,
  449. content:""
  450. });
  451. }
  452. // type=6 多图列表
  453. if(type==6){
  454. this.layout.push({
  455. i: this.layout.length,
  456. x: 0,
  457. y: maxY + 1,
  458. w: 12,
  459. h: 2,
  460. type: type,
  461. content:""
  462. });
  463. }
  464. // type=7 文本列表
  465. if(type==7){
  466. this.layout.push({
  467. i: this.layout.length,
  468. x: 0,
  469. y: maxY + 1,
  470. w: 4,
  471. h: 5,
  472. type: type,
  473. content:""
  474. });
  475. }
  476. // type=8 图文列表
  477. if(type==8){
  478. this.layout.push({
  479. i: this.layout.length,
  480. x: 0,
  481. y: maxY + 1,
  482. w: 8,
  483. h: 10,
  484. type: type,
  485. content:""
  486. });
  487. }
  488. // type=10 友情链接
  489. if(type==10){
  490. this.layout.push({
  491. i: this.layout.length,
  492. x: 0,
  493. y: maxY + 1,
  494. w: 12,
  495. h: 2,
  496. type: type,
  497. content:""
  498. });
  499. }
  500. // type=11 纯文本
  501. if(type==11){
  502. this.layout.push({
  503. i: this.layout.length,
  504. x: 0,
  505. y: maxY + 1,
  506. w: 12,
  507. h: 1,
  508. type: type,
  509. content:""
  510. });
  511. }
  512. },
  513. //删除模块
  514. deleteModule(item) {
  515. //找到对应的模块删除掉
  516. for(let i = 0; i < this.layout.length; i++) {
  517. if(this.layout[i].i == item.i) {
  518. this.layout.splice(i, 1);
  519. }
  520. }
  521. },
  522. //打开弹出框
  523. openWindow(item) {
  524. this.editModule = item.i;
  525. this.windowStatus = true;
  526. },
  527. //编辑栅格布局
  528. editGridItem() {
  529. console.log(this.editModule);
  530. //找对在栅栏中对应的窗口,把编辑的值放进去
  531. for(let i = 0; i < this.layout.length; i++) {
  532. if(this.layout[i].i == this.editModule) {
  533. this.layout[i].content = this.form.content;
  534. }
  535. }
  536. //关闭窗口
  537. this.windowStatus = false;
  538. },
  539. //关闭弹出框
  540. closeWindow() {
  541. this.windowStatus = false;
  542. }
  543. },
  544. mounted(){
  545. const id = this.$route.query.id;
  546. console.log('Retrieved ID from route:', id);
  547. }
  548. }
  549. </script>
  550. <style scoped lang="less">
  551. //顶部菜单
  552. .topMenuBox {
  553. padding: 20px 30px 20px 30px;
  554. display: flex;
  555. align-items: center;
  556. justify-content: space-between;
  557. background: #fff
  558. }
  559. //当前步骤
  560. .pageTabsBox {
  561. border-top: 1px solid #E9EDF7;
  562. background: #fff;
  563. display: flex;
  564. align-items: center;
  565. justify-items: flex-start;
  566. font-size:12px;
  567. padding:10px 30px;
  568. div {
  569. margin-right: 30px;
  570. color: #999;
  571. i {
  572. margin-left: 5px;
  573. }
  574. }
  575. .active {
  576. color: #5570F1;
  577. }
  578. }
  579. //页面容器
  580. .websiteBox {
  581. margin: 30px;
  582. background: #fff;
  583. border: 1px solid #E9EDF7;
  584. padding: 20px 20px 20px 20px;
  585. -webkit-box-sizing: border-box;
  586. box-sizing: border-box;
  587. }
  588. //菜单 start------------------------------------------------------------>
  589. // .layerTabsBox {
  590. // margin: 30px;
  591. // border-radius: 20px;
  592. // background: #fff;
  593. // border: 1px solid #d3d3d3;
  594. // -webkit-box-sizing: border-box;
  595. // box-sizing: border-box;
  596. // display: flex;
  597. // align-items: center;
  598. // justify-content: space-between;
  599. // overflow: hidden;
  600. // .layerTabsItem {
  601. // width: 33.33%; /* 每个占3分之一的空间 */
  602. // padding: 10px 20px;
  603. // cursor: pointer;
  604. // text-align: center;
  605. // font-size: 14px;
  606. // border-right: 1px solid #d3d3d3;
  607. // background: #fff;
  608. // }
  609. // .active {
  610. // background: #5570F1;
  611. // color: #fff;
  612. // }
  613. // }
  614. // .layerBox {
  615. // padding-bottom: 10px;
  616. // }
  617. //菜单 end------------------------------------------------------------>
  618. //模块 start------------------------------------------------------------>
  619. .module1Box,.module2Box {
  620. display: flex;
  621. width: 100%;
  622. height: 100%;
  623. position: relative;
  624. justify-content: space-between;
  625. }
  626. //1.顶部菜单
  627. .module1Box {
  628. padding: 0 10px;
  629. border: 1px dashed #333;
  630. .module1Title {
  631. font-size: 12px;
  632. color: #666;
  633. display: flex;
  634. align-items: center;
  635. }
  636. .module1LoginLink {
  637. font-size: 12px;
  638. color: #666;
  639. display: flex;
  640. align-items: center;
  641. }
  642. &:hover .shadowBox{
  643. display: block;
  644. }
  645. }
  646. //2.logo
  647. .module2Box {
  648. .module2Logo {
  649. display: flex;
  650. align-items: center;
  651. justify-content: center;
  652. margin-right: 20px;
  653. width: 200px;
  654. border: 1px dashed #333;
  655. background: #f0f2f5;
  656. .module2NoImgBox {
  657. text-align: center;
  658. font-size: 12px;
  659. color: #666;
  660. img{
  661. width: 20px;
  662. height: 20px;
  663. margin-bottom: 5px;
  664. }
  665. }
  666. }
  667. .module2rightAd {
  668. flex: 1;
  669. border: 1px dashed #333;
  670. display: flex;
  671. align-items: center;
  672. justify-content: center;
  673. background: #f0f2f5;
  674. text-align: center;
  675. font-size: 12px;
  676. img{
  677. width: 20px;
  678. height: 20px;
  679. margin-bottom: 5px;
  680. }
  681. }
  682. &:hover .shadowBox{
  683. display: block;
  684. }
  685. }
  686. //3.网站导航
  687. .module3Box {
  688. width: 100%;
  689. .module3Nav {
  690. width: 100%;
  691. display: flex;
  692. align-items: center;
  693. justify-content: space-between;
  694. flex-wrap: wrap;
  695. .module3NavItem {
  696. width: 10%;
  697. font-size: 12px;
  698. color: #666;
  699. height: 30px;
  700. line-height: 30px;
  701. text-align: center;
  702. border: 1px dashed #333;
  703. padding: 0 10px;
  704. margin-bottom: 5px;
  705. }
  706. }
  707. &:hover .shadowBox{
  708. display: block;
  709. }
  710. }
  711. //5.banner
  712. .module4Box {
  713. border: 1px dashed #333;
  714. background: #f0f2f5;
  715. width: 100%;
  716. height: 100%;
  717. .module4Banner {
  718. display: flex;
  719. align-items: center;
  720. justify-content: center;
  721. width: 100%;
  722. height: 100%;
  723. .module4BannerNoImgBox {
  724. text-align: center;
  725. font-size: 12px;
  726. color: #666;
  727. img{
  728. width: 20px;
  729. height: 20px;
  730. margin-bottom: 5px;
  731. }
  732. }
  733. }
  734. &:hover .shadowBox{
  735. display: block;
  736. }
  737. }
  738. //6.多图列表
  739. .module6Box {
  740. width: 100%;
  741. height: 100%;
  742. .module6imgBox {
  743. display: flex;
  744. align-items: center;
  745. justify-content: space-between;
  746. height: 100%;
  747. .module6item {
  748. display: flex;
  749. align-items: center;
  750. justify-content: center;
  751. height: 100%;
  752. border: 1px dashed #333;
  753. font-size: 12px;
  754. width: 25%;
  755. text-align: center;
  756. color: #666;
  757. img{
  758. width: 20px;
  759. height: 20px;
  760. margin-bottom: 5px;
  761. }
  762. }
  763. }
  764. &:hover .shadowBox{
  765. display: block;
  766. }
  767. }
  768. //7.文本列表
  769. .module7Box {
  770. width: 100%;
  771. height: 100%;
  772. .module7textList {
  773. width: 100%;
  774. height: 100%;
  775. overflow: hidden;
  776. div {
  777. border: 1px dashed #333;
  778. width: 100%;
  779. height:27px;
  780. font-size: 12px;
  781. line-height: 27px;
  782. overflow: hidden;
  783. }
  784. }
  785. &:hover .shadowBox{
  786. display: block;
  787. }
  788. }
  789. //8.图文列表
  790. .module8Box {
  791. width: 100%;
  792. height: 100%;
  793. .module8ImgBox {
  794. width: 100%;
  795. height: 100%;
  796. .module8ImgItem:last-child {
  797. padding-bottom: 10px;
  798. }
  799. .module8ImgItem {
  800. width: 100%;
  801. height: 20%;
  802. display: flex;
  803. align-items: center;
  804. justify-content: flex-start;
  805. border: 1px dashed #333;
  806. box-sizing: border-box;
  807. padding: 6px 6px 7px 6px;
  808. .module8ImgItemText {
  809. .module8ImgItemTitle {
  810. font-size: 14px;
  811. color: #333;
  812. margin-bottom: 5px;
  813. }
  814. .module8ImgItemText {
  815. font-size: 12px;
  816. color: #666;
  817. }
  818. }
  819. img {
  820. width: 50px;
  821. height: 50px;
  822. margin-right: 10px;
  823. }
  824. }
  825. }
  826. &:hover .shadowBox{
  827. display: block;
  828. }
  829. }
  830. //10.友情链接
  831. .module10Box {
  832. width: 100%;
  833. height: 100%;
  834. .module10Linkbox {
  835. .module10LinkImgBox {
  836. display: flex;
  837. .module10LinkImgItem {
  838. width: 20%;
  839. height: 45px;
  840. border: 1px dashed #333;
  841. display: flex;
  842. align-items: center;
  843. justify-content: center;
  844. img {
  845. width: 20px;
  846. height: 20px;
  847. margin-bottom: 5px;
  848. }
  849. }
  850. }
  851. .module10LinkTextBox {
  852. display: flex;
  853. align-items: center;
  854. justify-content: center;
  855. flex-wrap: wrap;
  856. div {
  857. width: 20%;
  858. font-size: 12px;
  859. color: #666;
  860. border: 1px dashed #333;
  861. text-align: center;
  862. height: 24px;
  863. line-height: 24px;
  864. }
  865. }
  866. }
  867. &:hover .shadowBox{
  868. display: block;
  869. }
  870. }
  871. //11.纯文本
  872. .module11Box {
  873. width: 100%;
  874. height: 100%;
  875. .module11Text {
  876. div {
  877. text-align: center;
  878. font-size: 12px;
  879. color: #666;
  880. }
  881. }
  882. &:hover .shadowBox{
  883. display: block;
  884. }
  885. }
  886. //公用 编辑按钮
  887. .shadowBox {
  888. display: none;
  889. position: absolute;
  890. right: 0;
  891. top: 0;
  892. background: rgba(0,0,0,0.3);
  893. width: 100%;
  894. height: 100%;
  895. .editBtnBox {
  896. display: flex;
  897. align-items: center;
  898. justify-content: center;
  899. width: 100%;
  900. height: 100%;
  901. }
  902. }
  903. //模块 end------------------------------------------------------------>
  904. //栅格布局 start------------------------------------------------------------>
  905. .grid-layout-demo {
  906. //background-color:#f0f2f5;
  907. padding: 20px;
  908. }
  909. .grid-item-content {
  910. display: flex;
  911. align-items: center;
  912. justify-content: center;
  913. background-color: #fff;
  914. height: 100%;
  915. overflow: hidden;
  916. }
  917. //栅格布局 end------------------------------------------------------------>
  918. //执行v-deep穿透scope选择器 start------------------------------------------------------------>*/
  919. ::v-deep .custom-form-item > .el-form-item__label {
  920. line-height: 140px !important;
  921. }
  922. ::v-deep .custom-textarea .el-textarea__inner {
  923. resize: none; /* 禁止用户拖拽调整大小 */
  924. }
  925. ::v-deep .custom-align-right .el-form-item__label {
  926. text-align: right; /* 设置标签文字右对齐 */
  927. }
  928. ::v-deep .shadowBox .el-button--mini.is-circle {
  929. border-radius: 50% !important;
  930. }
  931. //执行v-deep穿透scope选择器 end------------------------------------------------------------>*/
  932. </style>