form.ftl 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>文章</title>
  5. <#include "../../include/head-file.ftl">
  6. </head>
  7. <body>
  8. <div id="form" v-cloak>
  9. <el-header class="ms-header ms-tr" height="50px">
  10. <el-button type="primary" icon="iconfont icon-baocun" size="mini" @click="save()" :loading="saveDisabled">保存
  11. </el-button>
  12. <el-button size="mini" icon="iconfont icon-fanhui" plain onclick="javascript:history.go(-1)">返回
  13. </el-button>
  14. </el-header>
  15. <el-main class="ms-container" style="position:relative;">
  16. <el-scrollbar style="height: 100%;">
  17. <el-tabs v-model="activeName" style="height: calc(100% - 10px);">
  18. <el-tab-pane style="position:relative;" v-for="(item, index) in editableTabs" :key="index"
  19. :label="item.title" :name="item.name">
  20. <el-form v-if="item.title=='文章编辑'" ref="form" :model="form" :rules="rules" label-width="120px"
  21. size="mini">
  22. <el-row gutter="0" justify="start" align="top">
  23. <el-col :span="returnIsShow?'12':'24'">
  24. <el-form-item label="文章标题" prop="contentTitle">
  25. <template slot='label'>文章标题
  26. <el-popover placement="top-start" title="提示" trigger="hover">
  27. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/nei-rong-biao-qian-ms-field.html"
  28. target="_blank">{ms:field.title/}</a>
  29. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/wen-zhang-lie-biao-ms-arclist.html"
  30. target="_blank">[field.title/]</a>
  31. <i class="el-icon-question" slot="reference"></i>
  32. </el-popover>
  33. </template>
  34. <el-input v-model="form.contentTitle"
  35. :disabled="false"
  36. :style="{width: '100%'}"
  37. :clearable="true"
  38. placeholder="请输入文章标题">
  39. </el-input>
  40. </el-form-item>
  41. </el-col>
  42. <el-col span="12" v-if="returnIsShow">
  43. <el-form-item label="所属栏目" prop="contentCategoryId">
  44. <template slot='label'>所属栏目
  45. <el-popover placement="top-start" title="提示" trigger="hover">
  46. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/nei-rong-biao-qian-ms-field.html"
  47. target="_blank">{ms:field.typetitle/}</a>
  48. <i class="el-icon-question" slot="reference"></i>
  49. </el-popover>
  50. </template>
  51. <tree-select :props="{value: 'id',label: 'categoryTitle',children: 'children'}"
  52. :options="contentCategoryIdOptions" :style="{width:'100%'}"
  53. @change="categoryChange"
  54. v-model="form.contentCategoryId"></tree-select>
  55. </el-form-item>
  56. </el-col>
  57. </el-row>
  58. <el-row
  59. gutter="0"
  60. justify="start" align="top">
  61. <el-col span="12">
  62. <el-form-item label="文章类型" prop="contentType">
  63. <el-select v-model="form.contentType"
  64. :style="{width: '100%'}"
  65. :filterable="false"
  66. :disabled="false"
  67. :multiple="true" :clearable="true"
  68. placeholder="请选择文章类型">
  69. <el-option v-for='item in contentTypeOptions' :key="item.dictValue"
  70. :value="item.dictValue"
  71. :label="item.dictLabel"></el-option>
  72. </el-select>
  73. </el-form-item>
  74. </el-col>
  75. <el-col span="12">
  76. <el-form-item label="发布时间" prop="contentDatetime">
  77. <template slot='label'>发布时间
  78. <el-popover placement="top-start" title="提示" trigger="hover">
  79. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/nei-rong-biao-qian-ms-field.html"
  80. target="_blank">{ms:field.date?string("yyyy-MM-dd")/}</a>
  81. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/wen-zhang-lie-biao-ms-arclist.html"
  82. target="_blank">[field.date?string("yyyy-MM-dd")/]</a>
  83. <i class="el-icon-question" slot="reference"></i>
  84. </el-popover>
  85. </template>
  86. <el-date-picker
  87. v-model="form.contentDatetime"
  88. placeholder="请选择发布时间"
  89. start-placeholder=""
  90. end-placeholder=""
  91. :readonly="false"
  92. :disabled="false"
  93. :editable="true"
  94. :clearable="true"
  95. format="yyyy-MM-dd HH:mm:ss"
  96. value-format="yyyy-MM-dd HH:mm:ss"
  97. :style="{width:'100%'}"
  98. type="datetime">
  99. </el-date-picker>
  100. </el-form-item>
  101. </el-col>
  102. </el-row>
  103. <el-row
  104. gutter="0"
  105. justify="start" align="top">
  106. <el-col span="12">
  107. <el-form-item label="文章作者" prop="contentAuthor">
  108. <template slot='label'>文章作者
  109. <el-popover placement="top-start" title="提示" trigger="hover">
  110. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/nei-rong-biao-qian-ms-field.html"
  111. target="_blank">{ms:field.author/}</a>
  112. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/wen-zhang-lie-biao-ms-arclist.html"
  113. target="_blank">[field.author/]</a>
  114. <i class="el-icon-question" slot="reference"></i>
  115. </el-popover>
  116. </template>
  117. <el-input v-model="form.contentAuthor"
  118. :disabled="false"
  119. :style="{width: '100%'}"
  120. :clearable="true"
  121. placeholder="请输入文章作者">
  122. </el-input>
  123. </el-form-item>
  124. </el-col>
  125. <el-col span="12">
  126. <el-form-item label="文章来源" prop="contentSource">
  127. <template slot='label'>文章来源
  128. <el-popover placement="top-start" title="提示" trigger="hover">
  129. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/nei-rong-biao-qian-ms-field.html"
  130. target="_blank">{ms:field.source/}</a>
  131. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/wen-zhang-lie-biao-ms-arclist.html"
  132. target="_blank">[field.source/]</a>
  133. <i class="el-icon-question" slot="reference"></i>
  134. </el-popover>
  135. </template>
  136. <el-input v-model="form.contentSource"
  137. :disabled="false"
  138. :style="{width: '100%'}"
  139. :clearable="true"
  140. placeholder="请输入文章来源">
  141. </el-input>
  142. </el-form-item>
  143. </el-col>
  144. </el-row>
  145. <el-row
  146. gutter="0"
  147. justify="start" align="top">
  148. <el-col span="12">
  149. <el-form-item label="" prop="contentDisplay">
  150. <template slot='label'>是否显示
  151. <el-popover slot="label" placement="top-start" title="提示" width="200"
  152. trigger="hover"
  153. content="选择否后前端将不显示,需要重新生成才有效果">
  154. <i class="el-icon-question" slot="reference"></i>
  155. </el-popover>
  156. </template>
  157. <el-radio-group v-model="form.contentDisplay"
  158. :style="{width: ''}"
  159. :disabled="false">
  160. <el-radio :style="{display: true ? 'inline-block' : 'block'}"
  161. :label="item.value"
  162. v-for='(item, index) in contentDisplayOptions'
  163. :key="item.value + index">
  164. {{true? item.label : item.value}}
  165. </el-radio>
  166. </el-radio-group>
  167. </el-form-item>
  168. </el-col>
  169. <el-col span="12">
  170. <el-form-item label="自定义顺序" prop="contentSort">
  171. <el-input-number
  172. v-model="form.contentSort"
  173. :disabled="false"
  174. controls-position="">
  175. </el-input-number>
  176. </el-form-item>
  177. </el-col>
  178. </el-row>
  179. <el-form-item label="" prop="contentImg">
  180. <template slot='label'>文章缩略图
  181. <el-popover placement="top-start" title="提示" trigger="hover">
  182. 文章缩略图,支持jpg格式
  183. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/nei-rong-biao-qian-ms-field.html"
  184. target="_blank">{ms:field.litpic/}</a>
  185. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/wen-zhang-lie-biao-ms-arclist.html"
  186. target="_blank">[field.litpic/]</a>
  187. <i class="el-icon-question" slot="reference"></i>
  188. </el-popover>
  189. </template>
  190. <el-upload
  191. :file-list="form.contentImg"
  192. :action="ms.base+'/file/upload.do'"
  193. :on-remove="contentImghandleRemove"
  194. :style="{width:''}"
  195. :limit="1"
  196. :on-exceed="contentImghandleExceed"
  197. :disabled="false"
  198. :data="{uploadPath:'/cms/content','isRename':true ,'appId':true}"
  199. :on-success="contentImgSuccess"
  200. accept="image/*"
  201. list-type="picture-card">
  202. <i class="el-icon-plus"></i>
  203. <div slot="tip" class="el-upload__tip">最多上传1张图片</div>
  204. </el-upload>
  205. </el-form-item>
  206. <el-form-item label="关键字" prop="contentKeyword">
  207. <template slot='label'>关键字
  208. <el-popover placement="top-start" title="提示" trigger="hover">
  209. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/nei-rong-biao-qian-ms-field.html"
  210. target="_blank">{{ms:field.keyword/}</a>
  211. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/wen-zhang-lie-biao-ms-arclist.html"
  212. target="_blank">[field.keyword/]</a>
  213. <i class="el-icon-question" slot="reference"></i>
  214. </el-popover>
  215. </template>
  216. <el-input
  217. type="textarea" :rows="5"
  218. :disabled="false"
  219. v-model="form.contentKeyword"
  220. :style="{width: '100%'}"
  221. placeholder="请输入文章关键字">
  222. </el-input>
  223. </el-form-item>
  224. <el-form-item label="描述" prop="contentDescription">
  225. <template slot='label'>描述
  226. <el-popover placement="top-start" title="提示" trigger="hover">
  227. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/nei-rong-biao-qian-ms-field.html"
  228. target="_blank">{ms:field.descrip/}</a>
  229. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/wen-zhang-lie-biao-ms-arclist.html"
  230. target="_blank">[field.descrip/]</a>
  231. <i class="el-icon-question" slot="reference"></i>
  232. </el-popover>
  233. </template>
  234. <el-input
  235. type="textarea" :rows="5"
  236. :disabled="false"
  237. v-model="form.contentDescription"
  238. :style="{width: '100%'}"
  239. placeholder="请输入对该文章的简短描述,以便用户查看文章简略">
  240. </el-input>
  241. </el-form-item>
  242. <el-form-item label="文章内容" prop="contentDetails">
  243. <template slot='label'>文章内容
  244. <el-popover placement="top-start" title="提示" trigger="hover">
  245. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/nei-rong-biao-qian-ms-field.html"
  246. target="_blank">{ms:field.content/}</a>
  247. <a href="http://doc.ms.mingsoft.net/plugs-cms/biao-qian/wen-zhang-lie-biao-ms-arclist.html"
  248. target="_blank">[field.content/]</a>
  249. <i class="el-icon-question" slot="reference"></i>
  250. </el-popover>
  251. </template>
  252. <vue-ueditor-wrap style="line-height: 0px" v-model="form.contentDetails"
  253. :config="editorConfig"></vue-ueditor-wrap>
  254. </el-form-item>
  255. </el-form>
  256. <div :id="'model'+index" v-else></div>
  257. </el-tab-pane>
  258. </el-tabs>
  259. </el-scrollbar>
  260. </el-main>
  261. </div>
  262. </body>
  263. </html>
  264. <script>
  265. var form = new Vue({
  266. el: '#form',
  267. data: function () {
  268. return {
  269. saveDisabled: false,
  270. activeName: 'form',
  271. model: undefined,
  272. //自定义模型实例
  273. editableTabs: [{
  274. title: '文章编辑',
  275. name: 'form'
  276. }],
  277. editorConfig: {
  278. imageScaleEnabled: true,
  279. autoHeightEnabled: true,
  280. autoFloatEnabled: false,
  281. scaleEnabled: true,
  282. compressSide: 0,
  283. maxImageSideLength: 1000,
  284. maximumWords: 2000,
  285. initialFrameWidth: '100%',
  286. initialFrameHeight: 400,
  287. serverUrl: ms.base + "/static/plugins/ueditor/1.4.3.1/jsp/editor.do?jsonConfig=%7BvideoUrlPrefix:\'" + ms.base + "\',fileUrlPrefix:\'" + ms.base + "\',imageUrlPrefix:\'" + ms.base + "\',imagePathFormat:\'/upload/${appId}/cms/content/editor/%7Btime%7D\',filePathFormat:\'/upload/${appId}/cms/content/editor/%7Btime%7D\',videoPathFormat:\'/upload/${appId}/cms/content/editor/%7Btime%7D\'%7D",
  288. UEDITOR_HOME_URL: ms.base + '/static/plugins/ueditor/1.4.3.1/'
  289. },
  290. contentCategoryIdOptions: [],
  291. returnIsShow: true,
  292. type: '',
  293. //表单数据
  294. form: {
  295. // 文章标题
  296. contentTitle: '',
  297. // 所属栏目
  298. contentCategoryId: '',
  299. // 文章类型
  300. contentType: [],
  301. // 是否显示
  302. contentDisplay: '0',
  303. // 文章作者
  304. contentAuthor: '',
  305. // 文章来源
  306. contentSource: '',
  307. // 自定义顺序
  308. contentSort: 0,
  309. // 文章缩略图
  310. contentImg: [],
  311. // 描述
  312. contentDescription: '',
  313. // 关键字
  314. contentKeyword: '',
  315. // 文章内容
  316. contentDetails: ''
  317. },
  318. contentTypeOptions: [],
  319. categoryIdOptions: [],
  320. contentDisplayOptions: [{
  321. "value": "0",
  322. "label": "是"
  323. }, {
  324. "value": "1",
  325. "label": "否"
  326. }],
  327. rules: {
  328. // 文章标题
  329. contentTitle: [{
  330. "required": true,
  331. "message": "请选择文章标题"
  332. }],
  333. // 发布时间
  334. contentDatetime: [{
  335. "required": true,
  336. "message": "发布时间不能为空"
  337. }],
  338. contentCategoryId: [{
  339. "required": true,
  340. "message": "所属栏目不能为空"
  341. }]
  342. }
  343. };
  344. },
  345. watch: {},
  346. computed: {
  347. currCategory: function () {
  348. var that = this;
  349. return this.categoryIdOptions.find(function (value) {
  350. return value.id === that.form.contentCategoryId;
  351. });
  352. }
  353. },
  354. methods: {
  355. save: function () {
  356. var _this = this;
  357. var that = this; //自定义模型需要验证
  358. if (this.model && !this.model.validate()) {
  359. this.activeName = 'custom-name';
  360. return;
  361. }
  362. var url = ms.manager + "/cms/content/save.do";
  363. if (that.form.id > 0) {
  364. url = ms.manager + "/cms/content/update.do";
  365. }
  366. this.$refs.form[0].validate(function (valid) {
  367. if (valid) {
  368. that.saveDisabled = true; //判断
  369. if (that.categoryIdOptions.filter(function (f) {
  370. return f['id'] == that.form.contentCategoryId;
  371. })[0].categoryType == '2' && that.returnIsShow) {
  372. that.$notify({
  373. title: '提示',
  374. message: '所属栏目不能为封面',
  375. type: 'error'
  376. });
  377. that.saveDisabled = false;
  378. return;
  379. }
  380. var data = JSON.parse(JSON.stringify(that.form));
  381. if (data.contentType) {
  382. data.contentType = data.contentType.join(',');
  383. }
  384. data.contentImg = JSON.stringify(data.contentImg);
  385. ms.http.post(url, data).then(function (data) {
  386. if (data.result) {
  387. //保存时需要赋值关联ID
  388. if (that.model) {
  389. that.model.form.linkId = data.data.id;
  390. that.model.save();
  391. }
  392. that.$notify({
  393. title: '成功',
  394. message: '保存成功',
  395. type: 'success'
  396. });
  397. if (that.returnIsShow) {
  398. javascript: history.go(-1);
  399. } else {
  400. //如果是顶级封面或封面,则重新拿到当前封面id,避免重复保存
  401. that.list(that.form.contentCategoryId);
  402. }
  403. } else {
  404. that.$notify({
  405. title: '失败',
  406. message: data.msg,
  407. type: 'warning'
  408. });
  409. }
  410. that.saveDisabled = false;
  411. });
  412. } else {
  413. _this.activeName = 'form';
  414. return false;
  415. }
  416. });
  417. },
  418. removeModel: function () {
  419. var that = this;
  420. var model = document.getElementById('model1');
  421. var custom = document.getElementById('c_model');
  422. if (custom) {
  423. model.removeChild(custom);
  424. }
  425. that.model = undefined;
  426. },
  427. categoryChange: function () {
  428. this.changeModel();
  429. },
  430. changeModel: function () {
  431. var that = this;
  432. that.editableTabs = [that.editableTabs[0]];
  433. this.removeModel();
  434. if (this.currCategory) {
  435. if (this.currCategory.mdiyModelId) {
  436. ms.http.get(ms.manager + "/mdiy/model/get.do", {
  437. id: this.currCategory.mdiyModelId
  438. }).then(function (data) {
  439. if (data.data && data.data.id) {
  440. that.rederModel(data.data, JSON.parse(data.data.modelJson));
  441. }
  442. });
  443. }
  444. }
  445. },
  446. rederModel: function (modelEntity, data) {
  447. var that = this;
  448. that.editableTabs.push({
  449. title: modelEntity.modelName,
  450. name: 'custom-name'
  451. });
  452. this.removeModel();
  453. that.$nextTick(function () {
  454. var div = document.createElement('div');
  455. div.id = 'c_model';
  456. var model = document.getElementById('model1');
  457. model.appendChild(div);
  458. var s = document.createElement('script');
  459. s.innerHTML = data.script;
  460. var con = document.createElement('div');
  461. con.id = 'custom-model';
  462. con.innerHTML = data.html;
  463. div.appendChild(s);
  464. div.appendChild(con); //初始化自定义模型并传入关联参数
  465. that.model = new custom_model({
  466. data: {
  467. title: modelEntity.modelName,
  468. modelId: modelEntity.id,
  469. form: {
  470. linkId: that.form.id
  471. }
  472. }
  473. });
  474. });
  475. },
  476. getValue: function (data) {
  477. this.form.contentCategoryId = data.id;
  478. },
  479. //获取当前文章
  480. get: function (id) {
  481. var that = this;
  482. ms.http.get(ms.manager + "/cms/content/get.do", {
  483. "id": id
  484. }).then(function (res) {
  485. if (res.result && res.data) {
  486. if (res.data.contentType && res.data.contentType != '') {
  487. res.data.contentType = res.data.contentType.split(',');
  488. } else {
  489. res.data.contentType = [];
  490. }
  491. if (res.data.contentImg) {
  492. res.data.contentImg = JSON.parse(res.data.contentImg);
  493. res.data.contentImg.forEach(function (value) {
  494. value.url = ms.base + value.path;
  495. });
  496. } else {
  497. res.data.contentImg = [];
  498. }
  499. that.form = res.data;
  500. var category = that.categoryIdOptions.filter(function (f) {
  501. return f['id'] == that.form.contentCategoryId;
  502. });
  503. if (category.length == 1) {
  504. if (category[0].categoryType == '2') {
  505. that.returnIsShow = false;
  506. }
  507. }
  508. that.changeModel();
  509. }
  510. }).catch(function (err) {
  511. console.log(err);
  512. });
  513. },
  514. //获取contentCategoryId数据源
  515. contentCategoryIdOptionsGet: function () {
  516. var that = this;
  517. ms.http.get(ms.manager + "/cms/category/list.do", {
  518. pageSize: 9999
  519. }).then(function (res) {
  520. if (res.result) {
  521. that.contentCategoryIdOptions = ms.util.treeData(res.data.rows, 'id', 'categoryId', 'children');
  522. that.categoryIdOptions = res.data.rows;
  523. that.changeModel();
  524. }
  525. }).catch(function (err) {
  526. console.log(err);
  527. });
  528. },
  529. //获取contentType数据源
  530. contentTypeOptionsGet: function () {
  531. var that = this;
  532. ms.http.get(ms.base + '/mdiy/dict/list.do', {
  533. dictType: '文章属性',
  534. pageSize: 99999
  535. }).then(function (data) {
  536. that.contentTypeOptions = data.rows;
  537. }).catch(function (err) {
  538. console.log(err);
  539. });
  540. },
  541. //contentImg文件上传完成回调
  542. contentImgSuccess: function (response, file, fileList) {
  543. this.form.contentImg.push({
  544. url: file.url,
  545. name: file.name,
  546. path: response,
  547. uid: file.uid
  548. });
  549. },
  550. contentImghandleRemove: function (file, files) {
  551. var index = -1;
  552. index = this.form.contentImg.findIndex(function (text) {
  553. return text == file;
  554. });
  555. if (index != -1) {
  556. this.form.contentImg.splice(index, 1);
  557. }
  558. },
  559. //上传超过限制
  560. contentImghandleExceed: function (files, fileList) {
  561. this.$notify({
  562. title: '当前最多上传1个文件',
  563. type: 'warning'
  564. });
  565. },
  566. //查询列表
  567. list: function (contentCategoryId) {
  568. var that = this;
  569. ms.http.post(ms.manager + "/cms/content/list.do", {
  570. contentCategoryId: contentCategoryId
  571. }).then(function (res) {
  572. if (res.result && res.data.total > 0) {
  573. if (res.data.rows[0].contentType) {
  574. res.data.rows[0].contentType = res.data.rows[0].contentType.split(',');
  575. }
  576. if (res.data.rows[0].contentImg) {
  577. res.data.rows[0].contentImg = JSON.parse(res.data.rows[0].contentImg);
  578. res.data.rows[0].contentImg.forEach(function (value) {
  579. value.url = ms.base + value.path;
  580. });
  581. } else {
  582. res.data.rows[0].contentImg = [];
  583. }
  584. that.form = res.data.rows[0];
  585. }
  586. }).catch(function (err) {
  587. console.log(err);
  588. });
  589. }
  590. },
  591. created: function () {
  592. this.contentCategoryIdOptionsGet();
  593. this.contentTypeOptionsGet();
  594. this.form.id = ms.util.getParameter("id");
  595. if (ms.util.getParameter("categoryId") != 'undefined' && ms.util.getParameter("categoryId") != 'null') {
  596. this.form.contentCategoryId = ms.util.getParameter("categoryId");
  597. }
  598. this.type = ms.util.getParameter("type");
  599. if (this.form.id) {
  600. this.get(this.form.id);
  601. }
  602. if (this.type) {
  603. this.list(this.form.contentCategoryId);
  604. this.returnIsShow = false;
  605. }
  606. }
  607. });
  608. </script>
  609. <style>
  610. .el-select {
  611. width: 100%;
  612. }
  613. body {
  614. overflow: hidden;
  615. }
  616. #form {
  617. overflow: hidden;
  618. }
  619. .el-scrollbar__bar.is-vertical{
  620. width: 6px!important;
  621. }
  622. </style>