index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900
  1. <template>
  2. <div id="qianpeiArrange">
  3. <table-list
  4. :tableSets="tableSet"
  5. :tableData="tableData"
  6. :navText="navText"
  7. @addClick="addClick"
  8. :loading="loading"
  9. @editInfo="editInfo"
  10. >
  11. <template slot="btn" slot-scope="props">
  12. <el-button type="text" @click="addClick(props.scope.row, 0)"
  13. :disabled="props.scope.row.status === 1"
  14. >修改计划</el-button
  15. >
  16. <el-button type="text" @click="editGoods(props.scope.row)"
  17. :disabled="props.scope.row.status === 1"
  18. >适用商品</el-button
  19. >
  20. <el-button type="text" @click="watchs(props.scope.row)">预览</el-button>
  21. <el-button
  22. type="text"
  23. @click="del(props.scope.row, 1)"
  24. v-if="props.scope.row.status === 0"
  25. >启用</el-button
  26. >
  27. <el-button
  28. type="text"
  29. @click="del(props.scope.row, 2)"
  30. v-if="props.scope.row.status === 1"
  31. >关闭</el-button
  32. >
  33. <el-button type="text" @click="del(props.scope.row, 3)">删除</el-button>
  34. </template>
  35. </table-list>
  36. <pagination
  37. :total="total"
  38. :pageSize="pageSize"
  39. :currentPage="currentPage"
  40. @handleSizeChange="handleSizeChange"
  41. @handleCurrentChange="handleCurrentChange"
  42. />
  43. <el-dialog
  44. :visible.sync="dialogVisible"
  45. width="560px"
  46. :show-close="false"
  47. :close-on-click-modal="false"
  48. >
  49. <div slot="title" class="hearders">
  50. <div class="leftTitle">
  51. {{ statusPop === 1 ? "添加" : statusPop === 0 ? "修改" : "详情" }}
  52. </div>
  53. <div class="rightBoxs">
  54. <img src="@/assets/images/Close@2x.png" alt="" @click="close" />
  55. </div>
  56. </div>
  57. <div>
  58. <el-form
  59. label-position="right"
  60. label-width="150px"
  61. :model="listData"
  62. :rules="rules"
  63. ref="listData"
  64. >
  65. <el-form-item label="前培标题" prop="beforeName">
  66. <el-input
  67. :disabled="statusPop === 2"
  68. v-model="listData.beforeName"
  69. ></el-input>
  70. </el-form-item>
  71. <el-form-item label="关联题卷" required prop="beforeStatus">
  72. <el-select v-model="listData.beforeStatus" placeholder="请选择">
  73. <el-option
  74. v-for="item in optionsApis"
  75. :key="item.value"
  76. :label="item.label"
  77. :value="item.value"
  78. >
  79. </el-option>
  80. </el-select>
  81. </el-form-item>
  82. <el-form-item label="" prop="beforeUrl" v-if="listData.beforeStatus">
  83. <el-radio-group v-model="listData.beforeUrl">
  84. <el-radio
  85. v-for="(item, index) in radioApi"
  86. :key="index"
  87. :label="item.beforeUrlId"
  88. >{{ item.urlName }} - {{ item.url }}</el-radio
  89. >
  90. </el-radio-group>
  91. </el-form-item>
  92. <el-form-item label="学习开放时间" required>
  93. <el-col :span="11">
  94. <el-form-item prop="beforeStartTime">
  95. <el-date-picker
  96. type="date"
  97. placeholder="开始日期"
  98. @change="changeEndTime(1)"
  99. v-model="listData.beforeStartTime"
  100. style="width: 100%"
  101. format="yyyy 年 MM 月 dd 日"
  102. value-format="timestamp"
  103. ></el-date-picker>
  104. </el-form-item>
  105. </el-col>
  106. <el-col class="line" style="text-align: center" :span="2">-</el-col>
  107. <el-col :span="11">
  108. <el-form-item prop="beforeEndTime">
  109. <el-date-picker
  110. type="date"
  111. placeholder="结束日期"
  112. @change="changeEndTime(2)"
  113. v-model="listData.beforeEndTime"
  114. style="width: 100%"
  115. format="yyyy 年 MM 月 dd 日"
  116. value-format="timestamp"
  117. ></el-date-picker>
  118. </el-form-item>
  119. </el-col>
  120. </el-form-item>
  121. </el-form>
  122. </div>
  123. <span slot="footer" class="dialog-footer">
  124. <el-button @click="close">取 消</el-button>
  125. <el-button
  126. type="primary"
  127. v-if="statusPop !== 2"
  128. @click="submit('listData')"
  129. >确 定</el-button
  130. >
  131. </span>
  132. </el-dialog>
  133. <el-dialog
  134. :visible.sync="dialogVisiblenew"
  135. width="560px"
  136. :show-close="false"
  137. :close-on-click-modal="false"
  138. >
  139. <div slot="title" class="hearders">
  140. <div class="leftTitle">适用商品</div>
  141. <div class="rightBoxs">
  142. <img
  143. src="@/assets/images/Close@2x.png"
  144. alt=""
  145. @click="dialogVisiblenew = false"
  146. />
  147. </div>
  148. </div>
  149. <div>
  150. <el-form
  151. label-position="right"
  152. label-width="150px"
  153. :model="listDataGoods"
  154. :rules="rulesnew"
  155. ref="listDataGoods"
  156. >
  157. <el-form-item label="商品类型" prop="goodsType">
  158. <el-select
  159. v-model="listDataGoods.goodsType"
  160. placeholder="请选择"
  161. disabled
  162. >
  163. <el-option
  164. v-for="item in options"
  165. :key="item.value"
  166. :label="item.label"
  167. :value="item.value"
  168. >
  169. </el-option>
  170. </el-select>
  171. </el-form-item>
  172. <el-form-item label="业务层级" prop="educationTypeId">
  173. <el-select
  174. v-model="listDataGoods.educationTypeId"
  175. placeholder="选择教育类型"
  176. @change="listDataGoods.businessId = ''"
  177. :disabled="statusPop === 0"
  178. >
  179. <el-option
  180. v-for="item in educationType"
  181. :key="item.id"
  182. :label="item.educationName"
  183. :value="item.id"
  184. >
  185. </el-option>
  186. </el-select>
  187. </el-form-item>
  188. <el-form-item
  189. label=""
  190. prop="businessId"
  191. v-if="listDataGoods.educationTypeId"
  192. >
  193. <el-select
  194. v-model="listDataGoods.businessId"
  195. :disabled="statusPop === 0"
  196. placeholder="选择业务层次"
  197. >
  198. <el-option
  199. v-for="item in businessList"
  200. :key="item.id"
  201. :label="item.projectName + '-' + item.businessName"
  202. :value="item.id"
  203. >
  204. </el-option>
  205. </el-select>
  206. </el-form-item>
  207. <el-form-item label="适用商品" prop="goodsId">
  208. <span v-if="!listDataGoods.businessId" style="color: #f56c6c"
  209. >请先选择业务层级</span
  210. >
  211. <el-checkbox-group
  212. v-model="listDataGoods.goodsId"
  213. v-else-if="listDataGoods.businessId && goodsList.length"
  214. >
  215. <el-checkbox
  216. v-for="(item, index) in goodsList"
  217. :key="index"
  218. :label="item.goodsId"
  219. :disabled="
  220. item.goodsStatus === 0 &&
  221. bfListData.goodsId.indexOf(item.goodsId) === -1
  222. "
  223. >{{ item.code + "-" + item.goodsName + "-" }}
  224. <span
  225. :style="
  226. item.goodsStatus === 0 &&
  227. bfListData.goodsId.indexOf(item.goodsId) === -1
  228. ? ''
  229. : 'color:#F56C6C'
  230. "
  231. >¥{{ item.standPrice }}</span
  232. ></el-checkbox
  233. >
  234. </el-checkbox-group>
  235. <span style="color: #f56c6c" v-else>该业务层级下,无适用商品</span>
  236. </el-form-item>
  237. </el-form>
  238. </div>
  239. <span slot="footer" class="dialog-footer">
  240. <el-button @click="dialogVisiblenew = false">取 消</el-button>
  241. <el-button
  242. type="primary"
  243. v-if="statusPop !== 2"
  244. @click="submitnew('listDataGoods')"
  245. >确 定</el-button
  246. >
  247. </span>
  248. </el-dialog>
  249. <el-dialog
  250. :visible.sync="dialoginfoWatch"
  251. width="860px"
  252. :show-close="false"
  253. :close-on-click-modal="false"
  254. >
  255. <div slot="title" class="hearders">
  256. <div class="leftTitle">【{{ infoData.beforeName }}】预览</div>
  257. <div class="rightBoxs">
  258. <img
  259. src="@/assets/images/Close@2x.png"
  260. alt=""
  261. @click="dialoginfoWatch = false"
  262. />
  263. </div>
  264. </div>
  265. <div>
  266. <el-form :model="infoData" class="demo-form-inline" label-width="120px">
  267. <el-button type="info" style="margin-bottom: 20px" size="mini"
  268. >前培计划信息</el-button
  269. >
  270. <el-form-item label="前培标题:">
  271. <span>{{ infoData.beforeName }}</span>
  272. </el-form-item>
  273. <el-form-item label="关联题卷:">
  274. <span v-for="(item,index) in optionsApis" :key="index">
  275. <span v-if="item.value === infoData.beforeStatus">{{item.label}}</span>
  276. </span>
  277. <span>{{ infoData.urlName }}</span> <span>{{ infoData.url }}</span>
  278. </el-form-item>
  279. <el-form-item label="开放时间:">
  280. <span>{{
  281. $methodsTools.onlyForma(infoData.beforeStartTime, false)
  282. }}</span>
  283. <span>{{
  284. $methodsTools.onlyForma(infoData.beforeEndTime, false)
  285. }}</span>
  286. </el-form-item>
  287. <el-button type="info" style="margin-bottom: 20px" size="mini"
  288. >适用商品</el-button
  289. >
  290. <el-form-item label="商品类型:">
  291. <span v-for="(item, index) in options" :key="index">{{
  292. item.value === infoData.goodsType ? item.label : ""
  293. }}</span>
  294. </el-form-item>
  295. <el-form-item label="业务层级:">
  296. <span
  297. >{{ infoData.educationName }}-{{ infoData.projectName }}-{{
  298. infoData.businessName
  299. }}</span
  300. >
  301. </el-form-item>
  302. <el-form-item label="适用商品:">
  303. <div v-for="(item, index) in infoData.examNumberGoods" :key="index">
  304. {{ index + 1 }}.{{ item.code }}-{{ item.goodsName }}-<span
  305. style="color: #f56c6c"
  306. >¥{{ item.standPrice }}</span
  307. >
  308. </div>
  309. </el-form-item>
  310. </el-form>
  311. </div>
  312. <span slot="footer" class="dialog-footer">
  313. <el-button @click="dialoginfoWatch = false">取 消</el-button>
  314. </span>
  315. </el-dialog>
  316. </div>
  317. </template>
  318. <script>
  319. import { mapGetters } from "vuex";
  320. import searchBox from "@/components/searchBox";
  321. import tableList from "@/components/tableList";
  322. import pagination from "@/components/pagination";
  323. export default {
  324. components: { searchBox, tableList, pagination },
  325. data() {
  326. return {
  327. loading: false, //当前表单加载是否加载动画
  328. navText: {
  329. title: "前培安排",
  330. index: 0,
  331. ch: "条",
  332. num: true,
  333. changeWidth: "300px",
  334. choice: true,
  335. border: true,
  336. addHide: false,
  337. backFatherBtn: {
  338. status: false,
  339. title: "未定义",
  340. },
  341. },
  342. // 表单
  343. tableSet: [
  344. {
  345. label: "前培编码",
  346. prop: "code",
  347. hidden: true,
  348. width: "140px",
  349. },
  350. {
  351. label: "前培标题",
  352. prop: "beforeName",
  353. hidden: true,
  354. width: "120px",
  355. },
  356. {
  357. label: "报名开放时间",
  358. prop1: "beforeStartTime",
  359. prop2: "beforeEndTime",
  360. hidden: true,
  361. scope: "TimeLists",
  362. Diszing: false,
  363. width: "220px",
  364. },
  365. {
  366. label: "使用状态",
  367. prop: "status",
  368. hidden: true,
  369. scope: "isOptions",
  370. options: [
  371. {
  372. label: "进行中",
  373. value: 1,
  374. },
  375. {
  376. label: "未启用",
  377. value: 0,
  378. },
  379. {
  380. label: "删除",
  381. value: -1,
  382. },
  383. {
  384. label: "已过期",
  385. value: 2,
  386. },
  387. ],
  388. },
  389. {
  390. label: "符合条件的学员(人次)",
  391. prop: "people",
  392. hidden: true,
  393. width: "140px",
  394. },
  395. ],
  396. optionsApis: [
  397. // {
  398. // label: "内部接口",
  399. // value: 1,
  400. // },
  401. {
  402. label: "外部接口",
  403. value: 2,
  404. },
  405. // {
  406. // label: "关联题库资源",
  407. // value: 3,
  408. // },
  409. ],
  410. tableData: [], //表单数据
  411. total: 0, //一共多少条
  412. pageSize: 10, //每页多少条数据
  413. currentPage: 1, //当前页码
  414. // 弹窗数据
  415. listData: {},
  416. statusPop: -1,
  417. dialogVisible: false,
  418. //表单验证
  419. rules: {
  420. beforeName: [
  421. { required: true, message: "请输入前培标题", trigger: "blur" },
  422. ],
  423. beforeStatus: [
  424. { required: true, message: "请选中关联题卷", trigger: "change" },
  425. ],
  426. beforeUrl: [
  427. { required: true, message: "请选择接口地址", trigger: "change" },
  428. ],
  429. beforeStartTime: [
  430. {
  431. type: "date",
  432. required: true,
  433. message: "请选择学习开放开始时间",
  434. trigger: "change",
  435. },
  436. ],
  437. beforeEndTime: [
  438. {
  439. type: "date",
  440. required: true,
  441. message: "请选择学习开放结束时间",
  442. trigger: "change",
  443. },
  444. ],
  445. },
  446. dialogVisiblenew: false,
  447. options: [
  448. {
  449. label: "视频",
  450. value: 1,
  451. },
  452. {
  453. label: "题库",
  454. value: 2,
  455. },
  456. {
  457. label: "补考",
  458. value: 3,
  459. },
  460. {
  461. label: "前培",
  462. value: 4,
  463. },
  464. ],
  465. //表单验证
  466. rulesnew: {
  467. goodsType: [
  468. { required: true, message: "请选择商品类型", trigger: "change" },
  469. ],
  470. educationTypeId: [
  471. { required: true, message: "请选择教育类型", trigger: "change" },
  472. ],
  473. businessId: [
  474. { required: true, message: "请选择业务层次", trigger: "change" },
  475. ],
  476. goodsId: [
  477. {
  478. type: "array",
  479. required: true,
  480. message: "请至少选择一个商品",
  481. trigger: "change",
  482. },
  483. ],
  484. },
  485. busList: [],
  486. businessList: [],
  487. goodsList: [],
  488. bfListData: {},
  489. listDataGoods: {},
  490. radioApi: [],
  491. dialoginfoWatch: false,
  492. infoData: {},
  493. };
  494. },
  495. mounted() {
  496. this.getDict();
  497. this.search();
  498. },
  499. watch: {
  500. "listDataGoods.educationTypeId"(value) {
  501. this.businessList = this.busList.filter((item) => {
  502. return item.educationId == value;
  503. });
  504. },
  505. "listDataGoods.businessId"(value) {
  506. if (value) {
  507. if (this.statusPop === 1) {
  508. this.listDataGoods.goodsId = [];
  509. }
  510. this.$api.inquiresystembeforelistGoods({ businessId: value }).then((res) => {
  511. this.goodsList = res.rows;
  512. });
  513. }
  514. },
  515. "listData.beforeStatus"(value) {
  516. this.$api.inquiresystembeforelistUrl({ urlStatus: value }).then((res) => {
  517. this.radioApi = res.rows;
  518. });
  519. },
  520. },
  521. computed: { ...mapGetters(["educationType"]) },
  522. methods: {
  523. //修改适用商品
  524. editGoods(row) {
  525. this.$api
  526. .inquiresystembeforelistGoodsgoodsInfo({ beforeId: row.beforeId })
  527. .then((res) => {
  528. if (res.data.goodsType && res.data.goodsId.length) {
  529. this.statusPop = 0;
  530. this.bfListData = JSON.parse(JSON.stringify(res.data));
  531. this.listDataGoods = JSON.parse(JSON.stringify(res.data));
  532. } else {
  533. this.statusPop = 1;
  534. this.bfListData = {
  535. goodsId: [],
  536. };
  537. this.listDataGoods = {
  538. beforeId: row.beforeId,
  539. goodsType: 1,
  540. businessId: "",
  541. goodsId: [],
  542. };
  543. }
  544. this.$nextTick(() => {
  545. this.$refs.listDataGoods.clearValidate();
  546. });
  547. this.dialogVisiblenew = true;
  548. });
  549. },
  550. //提交验证适用商品表单
  551. submitnew(formName) {
  552. this.$refs[formName].validate((valid) => {
  553. if (valid) {
  554. this.rulesTableSumbitnew();
  555. } else {
  556. return false;
  557. }
  558. });
  559. },
  560. //验证通过
  561. rulesTableSumbitnew() {
  562. var data = JSON.parse(JSON.stringify(this.listDataGoods));
  563. this.busList.map((item) => {
  564. if (item.id === data.businessId) {
  565. data.projectId = item.projectId;
  566. }
  567. });
  568. this.$api.appsystemaddGoods(data).then((res) => {
  569. this.$message.success("适用商品设置成功");
  570. this.dialogVisiblenew = false;
  571. this.search();
  572. });
  573. console.log(data, 321);
  574. },
  575. //获取初始基础参数
  576. getDict() {
  577. this.$api.inquirebusinessList({ status: 1 }).then((res) => {
  578. this.busList = res.rows;
  579. });
  580. },
  581. // 判断选择时间逻辑
  582. changeEndTime(int) {
  583. if (
  584. int === 1 &&
  585. this.listData.beforeEndTime &&
  586. this.listData.beforeStartTime > this.listData.beforeEndTime
  587. ) {
  588. this.$message.warning(
  589. "当前选择的开始时间大于结束时间,请重新选择开始时间!"
  590. );
  591. this.listData.beforeStartTime = "";
  592. return;
  593. }
  594. if (
  595. int === 2 &&
  596. this.listData.beforeStartTime &&
  597. this.listData.beforeEndTime < this.listData.beforeStartTime
  598. ) {
  599. this.$message.warning(
  600. "当前选择的结束时间小于开始时间,请重新选择结束时间!"
  601. );
  602. this.listData.beforeEndTime = "";
  603. return;
  604. }
  605. },
  606. editInfo(v) {
  607. this.addClick(v, 0);
  608. },
  609. search(v) {
  610. this.loading = true;
  611. var data = {
  612. status: "0,1",
  613. pageSize: this.pageSize,
  614. pageNum: this.currentPage,
  615. };
  616. this.$api
  617. .inquiresystembefore(data)
  618. .then((res) => {
  619. this.tableData = res.rows;
  620. this.total = res.total;
  621. this.navText.index = res.total;
  622. })
  623. .finally(() => {
  624. this.loading = false;
  625. });
  626. },
  627. init() {
  628. this.search();
  629. },
  630. watchs(v) {
  631. this.$api.obtainsystembefore(v.beforeId).then((res) => {
  632. this.infoData = res.data;
  633. this.dialoginfoWatch = true;
  634. });
  635. },
  636. del(v, int) {
  637. this.$alert(
  638. `确定${
  639. int === 1 ? "启用" : int === 2 ? "关闭" : int === 3 ? "删除" : "xxx"
  640. }前培计划【${v.beforeName}】?<br />${
  641. int === 1
  642. ? "启用后,学员端预约考试的入口同步开通,请慎重考虑!"
  643. : int === 2
  644. ? "关闭后,学员端预约考试的入口同步关闭,请慎重考虑!"
  645. : int === 3
  646. ? "内容删除后将无法恢复,请慎重考虑"
  647. : "xxx"
  648. }`,
  649. "操作提示",
  650. {
  651. dangerouslyUseHTMLString: true,
  652. }
  653. )
  654. .then(() => {
  655. var data = {
  656. beforeId: v.beforeId,
  657. };
  658. if (int === 1) {
  659. data.status = 1;
  660. }
  661. if (int === 2) {
  662. data.status = 0;
  663. }
  664. if (int === 3) {
  665. data.status = -1;
  666. }
  667. this.$api.editsystembefore(data).then((res) => {
  668. this.$message.success(
  669. `${
  670. int === 1
  671. ? "启用"
  672. : int === 2
  673. ? "关闭"
  674. : int === 3
  675. ? "删除"
  676. : "xxx"
  677. }成功`
  678. );
  679. this.search();
  680. });
  681. })
  682. .catch(() => {
  683. // this.$message({
  684. // type: "info",
  685. // message: "已取消删除",
  686. // });
  687. });
  688. },
  689. addClick(v, int) {
  690. if (v === undefined) {
  691. this.statusPop = 1;
  692. this.listData = {};
  693. this.$nextTick(() => {
  694. this.$refs.listData.clearValidate();
  695. });
  696. this.dialogVisible = true;
  697. } else {
  698. this.statusPop = int;
  699. var res = JSON.parse(JSON.stringify(v));
  700. if (res.beforeStartTime) {
  701. res.beforeStartTime = this.$methodsTools.time10to13(
  702. res.beforeStartTime,
  703. 2
  704. );
  705. }
  706. if (res.beforeEndTime) {
  707. res.beforeEndTime = this.$methodsTools.time10to13(
  708. res.beforeEndTime,
  709. 2
  710. );
  711. }
  712. this.listData = res;
  713. this.$nextTick(() => {
  714. this.$refs.listData.clearValidate();
  715. });
  716. this.dialogVisible = true;
  717. }
  718. },
  719. submit(formName) {
  720. this.$refs[formName].validate((valid) => {
  721. if (valid) {
  722. this.rulesTableSumbit();
  723. } else {
  724. return false;
  725. }
  726. });
  727. },
  728. rulesTableSumbit() {
  729. var data = JSON.parse(JSON.stringify(this.listData));
  730. data.beforeStartTime = this.$methodsTools.time10to13(
  731. data.beforeStartTime,
  732. 1
  733. );
  734. data.beforeEndTime = this.$methodsTools.time10to13(data.beforeEndTime, 1);
  735. if (this.statusPop === 1) {
  736. data.status = 0;
  737. this.$api.appsystembefore(data).then((res) => {
  738. this.$message.success("新增成功");
  739. this.dialogVisible = false;
  740. this.search();
  741. });
  742. }
  743. if (this.statusPop === 0) {
  744. this.$api.editsystembefore(data).then((res) => {
  745. this.$message.success("修改成功");
  746. this.dialogVisible = false;
  747. this.search();
  748. });
  749. }
  750. },
  751. close() {
  752. this.dialogVisible = false;
  753. },
  754. handleSizeChange(v) {
  755. this.pageSize = v;
  756. this.currentPage = 1;
  757. this.search();
  758. },
  759. handleCurrentChange(v) {
  760. this.currentPage = v;
  761. this.search();
  762. },
  763. },
  764. };
  765. </script>
  766. <style lang="less" scoped>
  767. /deep/.el-button {
  768. border-radius: 8px;
  769. }
  770. /deep/.el-dialog {
  771. border-radius: 8px;
  772. .el-dialog__header {
  773. padding: 0;
  774. .hearders {
  775. height: 40px;
  776. display: flex;
  777. align-items: center;
  778. justify-content: space-between;
  779. padding: 0px 18px 0px 20px;
  780. border-bottom: 1px solid #e2e2e2;
  781. .leftTitle {
  782. font-size: 14px;
  783. font-weight: bold;
  784. color: #2f4378;
  785. }
  786. .rightBoxs {
  787. display: flex;
  788. align-items: center;
  789. img {
  790. width: 14px;
  791. height: 14px;
  792. margin-left: 13px;
  793. cursor: pointer;
  794. }
  795. }
  796. }
  797. }
  798. .el-dialog__footer {
  799. padding: 0;
  800. .dialog-footer {
  801. padding: 0px 40px;
  802. height: 70px;
  803. border-top: 1px solid #e2e2e2;
  804. display: flex;
  805. align-items: center;
  806. justify-content: flex-end;
  807. }
  808. }
  809. }
  810. .imgBox {
  811. width: 100%;
  812. // height: 210px;
  813. border: 1px solid #e2e2e2;
  814. border-radius: 8px;
  815. padding: 8px 8px 3px;
  816. display: flex;
  817. flex-direction: column;
  818. align-items: center;
  819. .imgLabel {
  820. flex: 1;
  821. width: 100%;
  822. border: 1px dotted #e2e2e2;
  823. color: #999;
  824. font-size: 14px;
  825. cursor: pointer;
  826. border-radius: 8px;
  827. .msPhoto {
  828. display: flex;
  829. justify-content: center;
  830. align-items: center;
  831. max-width: 100%;
  832. max-height: 270px;
  833. img {
  834. max-width: 100%;
  835. max-height: 270px;
  836. }
  837. }
  838. .imgbbx {
  839. display: flex;
  840. flex-direction: column;
  841. align-items: center;
  842. justify-content: center;
  843. width: 100%;
  844. height: 100%;
  845. i {
  846. font-weight: bold;
  847. margin: 14px 0;
  848. font-size: 24px;
  849. }
  850. }
  851. }
  852. p {
  853. margin: 5px 0px;
  854. }
  855. }
  856. .dis_fs {
  857. display: flex;
  858. align-items: center;
  859. .imgBoxs {
  860. width: 200px;
  861. height: 130px;
  862. border: 1px solid #999;
  863. margin-right: 6px;
  864. }
  865. .btns {
  866. align-self: end;
  867. border: 1px solid #999;
  868. font-size: 12px;
  869. height: 28px;
  870. line-height: 28px;
  871. padding: 0px 10px;
  872. border-radius: 4px;
  873. cursor: pointer;
  874. }
  875. }
  876. .dis_fs {
  877. display: flex;
  878. align-items: center;
  879. }
  880. .jbtw {
  881. justify-content: space-between;
  882. }
  883. .bors {
  884. border: 1px solid #999;
  885. padding: 0px 8px;
  886. height: 30px;
  887. line-height: 30px;
  888. border-radius: 4px;
  889. }
  890. .mar_bgc {
  891. width: 90%;
  892. padding: 12px;
  893. margin-top: 12px;
  894. background-color: #eee;
  895. }
  896. </style>