provider.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731
  1. <template>
  2. <section>
  3. <!--工具条-->
  4. <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
  5. <el-form :inline="true">
  6. <el-form-item label="供应商列表">
  7. </el-form-item>
  8. <el-form-item >
  9. <div>
  10. <el-input style="float:left;" v-model="keyword" class="input-with-select" placeholder="请输入供应商名称关键字" clearable="true" @clear="getList()">
  11. <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button>
  12. </el-input>
  13. </div>
  14. </el-form-item>
  15. <el-form-item style="float:right;">
  16. <el-link type="primary" :underline="false" @click="handleAdd(-1,null)" style="margin-right: 10px">新增供应商</el-link>
  17. <el-link type="primary" :underline="false" @click="intocustomerRatio" style="margin-right: 10px">批量导入供应商</el-link>
  18. <el-link type="primary" :underline="false" @click="showClfDialog = true">分类管理</el-link>
  19. </el-form-item>
  20. </el-form>
  21. </el-col>
  22. <!--列表-->
  23. <el-table :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="selectionChange">
  24. <el-table-column type="selection" width="60">
  25. <!-- <template slot-scope="scope" >
  26. {{scope.$index+1+(page-1)*size}}
  27. </template> -->
  28. </el-table-column>
  29. <el-table-column prop="providerCode" label="供应商编码" width="200"></el-table-column>
  30. <el-table-column prop="providerName" label="供应商名称" width="200"></el-table-column>
  31. <el-table-column prop="providerCategoryName" label="供应商分类" width="200"></el-table-column>
  32. <el-table-column prop="contactName" label="联系人" width="120"></el-table-column>
  33. <el-table-column prop="contactPhone" label="联系电话" width="150"></el-table-column>
  34. <el-table-column prop="email" label="邮箱" width="180"></el-table-column>
  35. <el-table-column prop="address" label="地址" width="200"></el-table-column>
  36. <el-table-column prop="remark" label="备注" width="300"></el-table-column>
  37. <el-table-column label="操作" width="150" fixed="right">
  38. <template slot-scope="scope">
  39. <el-button size="mini" type="primary" @click="handleAdd(scope.$index, scope.row)">编辑</el-button>
  40. <el-button size="mini" @click="deletePro(scope.$index, scope.row)">删除</el-button>
  41. </template>
  42. </el-table-column>
  43. </el-table>
  44. <!--工具条-->
  45. <el-col :span="24" class="toolbar">
  46. <el-button type="primary" size="small" @click="batchDelete" :loading="delLoading">批量删除</el-button>
  47. <el-pagination
  48. @size-change="handleSizeChange"
  49. @current-change="handleCurrentChange"
  50. :page-sizes="[20 , 50 , 80 , 100]"
  51. :page-size="20"
  52. layout="total, sizes, prev, pager, next"
  53. :total="total"
  54. style="float:right;"
  55. ></el-pagination>
  56. </el-col>
  57. <!--新增界面-->
  58. <el-dialog :title="title" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth" width="800px">
  59. <el-form ref="form1" :model="addForm" :rules="rules" label-width="120px">
  60. <el-form-item label="供应商编号" >
  61. <el-input v-model="addForm.providerCode" :max="20" placeholder="请输入供应商编号" clearable></el-input>
  62. </el-form-item>
  63. <el-form-item label="供应商名称" prop="providerName">
  64. <el-input v-model="addForm.providerName" :max="20" placeholder="请输入供应商名称" clearable></el-input>
  65. </el-form-item>
  66. <el-form-item label="供应商分类" prop="providerCategoryId">
  67. <el-select v-model="addForm.providerCategoryId" filterable placeholder="请选择供应商分类" clearable @change="supplierChange">
  68. <el-option v-for="item in baseClfList" :key="item.id" :label="item.providerCategoryName" :value="item.id"></el-option>
  69. </el-select>
  70. </el-form-item>
  71. <el-form-item label="联系人" prop="contactName">
  72. <el-input v-model="addForm.contactName" :max="20" placeholder="请输入供应商联系人" clearable></el-input>
  73. </el-form-item>
  74. <el-form-item label="联系电话" prop="contactPhone">
  75. <el-input v-model="addForm.contactPhone" :max="20" placeholder="请输入供应商联系电话" clearable></el-input>
  76. </el-form-item>
  77. <el-form-item label="邮箱" prop="email">
  78. <el-input v-model="addForm.email" :max="25" placeholder="请输入供应商邮箱" clearable></el-input>
  79. </el-form-item>
  80. <el-form-item label="地址" prop="address">
  81. <el-input v-model="addForm.address" :max="50" placeholder="请输入供应商联系地址" clearable></el-input>
  82. </el-form-item>
  83. <el-form-item label="备注" prop="remark ">
  84. <el-input type="textarea" :rows="4" v-model="addForm.remark " maxlength="100" show-word-limit placeholder="请输入备注" clearable></el-input>
  85. </el-form-item>
  86. </el-form>
  87. <div slot="footer" class="dialog-footer;">
  88. <el-button @click.native="addFormVisible = false">取消</el-button>
  89. <el-button type="primary" @click="submitInsert" :loading="addLoading">提交</el-button>
  90. </div>
  91. </el-dialog>
  92. <!-- 导入结果说明 -->
  93. <el-dialog title="分摊比例导入结果" v-if="showImportResult" :visible.sync="showImportResult" customClass="customWidth" width="500px">
  94. <div>
  95. <span>{{importResultMsg}}</span>
  96. </div>
  97. <span slot="footer" class="dialog-footer">
  98. <el-button type="primary" @click="showImportResult=false">确定</el-button>
  99. </span>
  100. </el-dialog>
  101. <el-dialog title="导入供应商数据" v-if="intocustomerDialog" :visible.sync="intocustomerDialog" customClass="customWidth" width="500px">
  102. <p>1. 下载
  103. <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/供应商导入模板.xlsx" download="供应商导入模板.xlsx">供应商导入模板.xlsx</el-link>
  104. </p>
  105. <!-- <p>2. 填写excel模板,请确保模板中的项目和人员已添加到系统中。</p> -->
  106. <p style="display: flex;justify-content: center;padding:1em 0">
  107. <el-upload ref="upload" action="#" :limit="1" :http-request="batchImportData" :show-file-list="false">
  108. <el-button type="primary" :underline="false" :loading="importingData">开始导入</el-button>
  109. </el-upload>
  110. </p>
  111. </el-dialog>
  112. <!-- 分类管理 -->
  113. <el-dialog title="供应商分类条目管理" show-header="false" v-if="showClfDialog" :visible.sync="showClfDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  114. <el-table :data="baseClfList" highlight-current-row height="400" style="width: 100%;">
  115. <el-table-column type="index" width="60" label="序号">
  116. <template slot-scope="scope" >
  117. {{scope.$index+1+(page-1)*size}}
  118. </template>
  119. </el-table-column>
  120. <el-table-column prop="providerCategoryName" label="名称" ></el-table-column>
  121. <el-table-column label="操作" width="150">
  122. <template slot-scope="scope" >
  123. <el-button size="small" type="primary" @click="addNewClf(scope.row)">编辑</el-button>
  124. <el-button size="small" type="danger" @click="deleteClf(scope.row)">删除</el-button>
  125. </template>
  126. </el-table-column>
  127. </el-table>
  128. <div slot="footer" class="dialog-footer">
  129. <el-button type="primary" @click="showClfDialog = false" >关闭</el-button>
  130. <el-button type="primary" @click="addNewClf()" >新增分类项</el-button>
  131. </div>
  132. </el-dialog>
  133. <!-- 新增/编辑 分类条目 -->
  134. <el-dialog title="新增/修改分类条目" v-if="addClfDialog" :visible.sync="addClfDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  135. <el-form ref="form2" :model="addClf" :rules="rules" label-width="100px">
  136. <el-form-item label="主项目名称" prop="name">
  137. <el-input v-model="addClf.providerCategoryName" placeholder="请输入主项目名称" clearable></el-input>
  138. </el-form-item>
  139. </el-form>
  140. <div slot="footer" class="dialog-footer">
  141. <el-button @click.native="addClfDialog = false">取消</el-button>
  142. <el-button type="primary" @click="submitClf" :loading="addLoading">提交</el-button>
  143. </div>
  144. </el-dialog>
  145. </section>
  146. </template>
  147. <style scoped>
  148. .input-with-select .el-input-group__prepend {
  149. background-color: #fff;
  150. }
  151. .line {
  152. padding:10px;
  153. }
  154. .line span{
  155. font-size:15px;
  156. }
  157. .line span:nth-child(even){
  158. float:right;
  159. }
  160. </style>
  161. <script>
  162. import util from "../../common/js/util";
  163. export default {
  164. data() {
  165. return {
  166. roleArray:["普通员工","超级管理员", "系统管理员", "公司高层","财务管理员", "项目管理员"],
  167. status:null,
  168. statusTxt:["-","进行中","已完成","已撤销"],
  169. importanceList:[{id:1,label:'正常'},{id:2,label:'紧急'},{id:3,label:'重要'},{id:4,label:'重要且紧急'}],
  170. searchField:null,
  171. keyword:null,
  172. user: JSON.parse(sessionStorage.getItem("user")),
  173. userDetailVisible: false,
  174. userDetail:{},
  175. date: new Date(),
  176. users: [],
  177. participator:[],
  178. tableHeight: 0,
  179. listLoading: false,
  180. total: 0,
  181. page: 1,
  182. size: 20,
  183. list: [],
  184. subProjectVisible: false,
  185. subProjectList: [],//子项目列表
  186. currentProject:{},
  187. addSubProject: false,
  188. addFormVisible: false,
  189. addLoading: false,
  190. addUp: 0, // 合计
  191. title: "",
  192. addForm: {
  193. name: '',
  194. userId: [],
  195. level:1,
  196. },
  197. rules: {
  198. providerName: [{ required: true, message: "请输入供应商名称", trigger: "blur" }],
  199. },
  200. intocustomerDialog:false,
  201. importingData: false,
  202. importResultMsg:null,
  203. showImportResult:false,
  204. selectArr: [],
  205. delLoading: false,
  206. showClfDialog: false,
  207. baseClfList: [],
  208. addClf: {providerCategoryName: '', companyId: ''},
  209. addClfDialog: false
  210. };
  211. },
  212. // 过滤器
  213. filters: {
  214. numberToCurrency(value) {
  215. if (!value) return '0.00'
  216. // 将数值截取,保留两位小数
  217. value = value.toFixed(2)
  218. // 获取整数部分
  219. const intPart = Math.trunc(value)
  220. // 整数部分处理,增加,
  221. const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
  222. // 预定义小数部分
  223. let floatPart = '.00'
  224. // 将数值截取为小数部分和整数部分
  225. const valueArray = value.toString().split('.')
  226. if (valueArray.length === 2) { // 有小数部分
  227. floatPart = valueArray[1].toString() // 取得小数部分
  228. return intPartFormat + '.' + floatPart
  229. }
  230. return intPartFormat + floatPart
  231. }
  232. },
  233. methods: {
  234. // 新增/编辑 分类条目
  235. addNewClf(row) {
  236. this.addClfDialog = true;
  237. if (row == null) {
  238. this.addClf = {}
  239. } else {
  240. this.addClf = row;
  241. }
  242. },
  243. // 删除分类条目
  244. deleteClf(row) {
  245. this.$confirm("该操作可能造成已有数据丢失,确定要删除吗?","删除分类条目", {
  246. confirmButtonText: "确定",
  247. cancelButtonText: "取消",
  248. type: "warning"
  249. })
  250. .then(() => {
  251. this.listLoading = true;
  252. this.http.post('/provider-category/delete',{
  253. id: row.id
  254. },
  255. res => {
  256. this.listLoading = false;
  257. if (res.code == "ok") {
  258. this.$message({
  259. message: "删除成功",
  260. type: "success"
  261. });
  262. this.getClfConfigList();
  263. } else {
  264. this.$message({
  265. message: res.msg,
  266. type: "error"
  267. });
  268. }
  269. },
  270. error => {
  271. this.listLoading = false;
  272. this.$message({
  273. message: error,
  274. type: "error"
  275. });
  276. });
  277. })
  278. .catch(() => {});
  279. },
  280. // 获取分类条目
  281. getClfConfigList() {
  282. this.http.get('/provider-category/list',
  283. res => {
  284. if (res.code == "ok") {
  285. this.baseClfList = res.data;
  286. console.log("获取分类条目",res.data);
  287. this.$forceUpdate();
  288. } else {
  289. this.$message({
  290. message: res.msg,
  291. type: "error"
  292. });
  293. }
  294. },
  295. error => {
  296. this.$message({
  297. message: error,
  298. type: "error"
  299. });
  300. });
  301. },
  302. supplierChange(e) {
  303. console.log(this.addForm.providerCategoryId)
  304. if(this.addForm.providerCategoryId) {
  305. for(var i in this.baseClfList) {
  306. if(this.baseClfList[i].id == this.addForm.providerCategoryId) {
  307. this.addForm.providerCategoryName = this.baseClfList[i].providerCategoryName
  308. }
  309. }
  310. } else {
  311. this.addForm.providerCategoryName = ''
  312. }
  313. },
  314. // 提交分类
  315. submitClf() {
  316. console.log(this.addClf)
  317. this.http.post('/provider-category/addOrMod',this.addClf,
  318. res => {
  319. if (res.code == "ok") {
  320. this.addClfDialog = false;
  321. // this.baseClfList = res.data;
  322. this.getClfConfigList()
  323. } else {
  324. this.$message({
  325. message: res.msg,
  326. type: "error"
  327. });
  328. }
  329. },
  330. error => {
  331. this.$message({
  332. message: error,
  333. type: "error"
  334. });
  335. });
  336. },
  337. // 批量删除
  338. selectionChange(selection){
  339. console.log('sel',selection);
  340. this.selectArr = selection
  341. },
  342. batchDelete(){
  343. if(this.selectArr.length == 0){
  344. this.$message('请选择要删除的供应商数据')
  345. return
  346. }else{
  347. let nametext = ''
  348. for(let i in this.selectArr){
  349. nametext += this.selectArr[i].providerName + '、'
  350. }
  351. nametext = nametext.substring(0,nametext.length - 1)
  352. this.$confirm("确定要批量删除供应商:" + nametext + "\u3000吗?","删除供应商", {
  353. confirmButtonText: "确定",
  354. cancelButtonText: "取消",
  355. type: "warning"
  356. }).then(()=>{
  357. this.delLoading = true
  358. let batchIds = ''
  359. for(let m in this.selectArr){
  360. batchIds += this.selectArr[m].id + ','
  361. }
  362. batchIds = batchIds.substring(0,batchIds.length - 1)
  363. this.http.post('/provider-info/batchDelete',{
  364. batchIds
  365. },res => {
  366. this.delLoading = false
  367. if(res.code == 'ok'){
  368. this.$message({
  369. message: '删除成功',
  370. type: 'success'
  371. })
  372. this.getList()
  373. }else {
  374. this.$message({
  375. message: res.msg,
  376. type: 'error'
  377. })
  378. }
  379. },err => {
  380. this.delLoading = false
  381. this.$message({
  382. message: res.msg,
  383. type: 'error'
  384. })
  385. })
  386. })
  387. }
  388. },
  389. intocustomerRatio(){
  390. this.intocustomerDialog=true;
  391. },
  392. batchImportData(item) {
  393. //首先判断文件类型
  394. let str = item.file.name.split(".");
  395. let format = str[str.length - 1];
  396. if (format != "xls" && format != "xlsx") {
  397. this.$message({
  398. message: "请选择.xls或.xlsx文件",
  399. type: "error"
  400. });
  401. } else {
  402. this.importingData = true;
  403. let formData = new FormData();
  404. formData.append("file", item.file);
  405. this.http.uploadFile('/provider-info/importData', formData,
  406. res => {
  407. this.$refs.upload.clearFiles();
  408. this.importingData = false;
  409. this.showImportResult = true;
  410. if (res.code == "ok") {
  411. //换成弹出框,以免有人等了半天回来啥也没看到
  412. this.importResultMsg = "成功导入/更新"+res.data+"条供应商数据。"+(res.msg?res.msg:"");
  413. this.getList();
  414. } else {
  415. this.importResultMsg = "导入失败:"+res.msg;
  416. }
  417. },
  418. error => {
  419. this.$refs.upload.clearFiles();
  420. this.importingData = false;
  421. this.$message({
  422. message: error,
  423. type: "error"
  424. });
  425. });
  426. }
  427. },
  428. importProject(item) {
  429. //首先判断文件类型
  430. let str = item.file.name.split(".");
  431. let format = str[str.length - 1];
  432. if (format != "xls" && format != "xlsx") {
  433. this.$message({
  434. message: "请选择.xls或.xlsx文件",
  435. type: "error"
  436. });
  437. } else {
  438. this.listLoading = true;
  439. let formData = new FormData();
  440. formData.append("file", item.file);
  441. formData.append("userId", this.user.id);
  442. this.http.uploadFile('/project/importData', formData,
  443. res => {
  444. this.$refs.upload.clearFiles();
  445. this.listLoading = false;
  446. if (res.code == "ok") {
  447. this.$message({
  448. message: "导入成功",
  449. type: "success"
  450. });
  451. this.getList();
  452. } else {
  453. this.$message({
  454. message: res.msg,
  455. type: "error"
  456. });
  457. }
  458. },
  459. error => {
  460. this.$refs.upload.clearFiles();
  461. this.listLoading = false;
  462. this.$message({
  463. message: error,
  464. type: "error"
  465. });
  466. });
  467. }
  468. },
  469. number(){  
  470. //     this.addForm.budget = this.addForm.budget.replace(/[^\.\d]/g,'');
  471. // this.addForm.budget = this.addForm.budget.replace('.','');
  472.   },
  473. deleteSubPro(subProject) {
  474. this.$confirm("确定要删除子项目" + subProject.name + "吗?","删除子项目", {
  475. confirmButtonText: "确定",
  476. cancelButtonText: "取消",
  477. type: "warning"
  478. })
  479. .then(() => {
  480. this.listLoading = true;
  481. this.http.post('/sub-project/deleteProject',{
  482. id: subProject.id
  483. },
  484. res => {
  485. this.listLoading = false;
  486. if (res.code == "ok") {
  487. this.$message({
  488. message: "删除成功",
  489. type: "success"
  490. });
  491. this.subProject(this.currentProject);
  492. } else {
  493. this.$message({
  494. message: res.msg,
  495. type: "error"
  496. });
  497. }
  498. },
  499. error => {
  500. this.listLoading = false;
  501. this.$message({
  502. message: error,
  503. type: "error"
  504. });
  505. }
  506. );
  507. })
  508. .catch(() => {});
  509. },
  510. searchList() {
  511. this.page = 1;
  512. this.getList();
  513. },
  514. addNewSubProject(subProject) {
  515. console.log(123);
  516. if (subProject == null) {
  517. this.addForm = {projectId: this.currentProject.id, level:1}
  518. } else {
  519. this.addForm = subProject;
  520. }
  521. this.addSubProject = true;
  522. },
  523. //显示子项目
  524. subProject(item) {
  525. this.subProjectVisible = true;
  526. this.currentProject = item;
  527. this.http.post('/sub-project/list', {
  528. projectId: item.id
  529. },
  530. res => {
  531. if (res.code == "ok") {
  532. this.subProjectList = res.data;
  533. } else {
  534. this.$message({
  535. message: res.msg,
  536. type: "error"
  537. });
  538. }
  539. },
  540. error => {
  541. this.$message({
  542. message: error,
  543. type: "error"
  544. });
  545. });
  546. },
  547. //显示用户详情
  548. showUser(userId) {
  549. this.userDetailVisible = true;
  550. this.http.post(this.port.manage.userDetail, {
  551. userId: userId
  552. },
  553. res => {
  554. if (res.code == "ok") {
  555. this.userDetail = res.data;
  556. } else {
  557. this.$message({
  558. message: res.msg,
  559. type: "error"
  560. });
  561. }
  562. },
  563. error => {
  564. this.$message({
  565. message: error,
  566. type: "error"
  567. });
  568. });
  569. },
  570. //分页
  571. handleCurrentChange(val) {
  572. this.page = val;
  573. this.getList();
  574. },
  575. handleSizeChange(val) {
  576. this.size = val;
  577. this.getList();
  578. },
  579. //获取项目列表
  580. getList() {
  581. this.listLoading = true;
  582. this.http.post('/provider-info/list', {
  583. pageIndex: this.page,
  584. pageSize: this.size,
  585. keyword:this.keyword
  586. },
  587. res => {
  588. this.listLoading = false;
  589. if (res.code == "ok") {
  590. var list = res.data.records;
  591. this.list = list;
  592. this.total = res.data.total;
  593. } else {
  594. this.$message({
  595. message: res.msg,
  596. type: "error"
  597. });
  598. }
  599. },
  600. error => {
  601. this.listLoading = false;
  602. this.$message({
  603. message: error,
  604. type: "error"
  605. });
  606. });
  607. },
  608. //显示新增界面
  609. handleAdd(i, item) {
  610. if(i == -1) {
  611. this.title = "新增供应商";
  612. this.addForm = {
  613. }
  614. } else {
  615. this.title = "修改供应商";
  616. this.addForm = JSON.parse(JSON.stringify(item));
  617. }
  618. this.addFormVisible = true;
  619. },
  620. submitInsert() {
  621. this.$refs.form1.validate(valid => {
  622. if (valid) {
  623. this.addLoading = true;
  624. this.http.post('/provider-info/addOrMod', this.addForm,
  625. res => {
  626. this.addLoading = false;
  627. if (res.code == "ok") {
  628. this.addFormVisible = false;
  629. this.getList();
  630. } else {
  631. this.$message({
  632. message: res.msg,
  633. type: "error"
  634. });
  635. }
  636. },
  637. error => {
  638. this.addLoading = false;
  639. this.$message({
  640. message: error,
  641. type: "error"
  642. });
  643. });
  644. }
  645. });
  646. },
  647. // 删除
  648. deletePro(i, item) {
  649. this.$confirm("确定要删除供应商" + item.providerName + "吗?","删除供应商", {
  650. confirmButtonText: "确定",
  651. cancelButtonText: "取消",
  652. type: "warning"
  653. })
  654. .then(() => {
  655. this.listLoading = true;
  656. this.http.post('/provider-info/delete',{
  657. id: item.id
  658. },
  659. res => {
  660. this.listLoading = false;
  661. if (res.code == "ok") {
  662. this.$message({
  663. message: "删除成功",
  664. type: "success"
  665. });
  666. this.getList();
  667. } else {
  668. this.$message({
  669. message: res.msg,
  670. type: "error"
  671. });
  672. }
  673. },
  674. error => {
  675. this.listLoading = false;
  676. this.$message({
  677. message: error,
  678. type: "error"
  679. });
  680. }
  681. );
  682. })
  683. .catch(() => {});
  684. },
  685. },
  686. created() {
  687. let height = window.innerHeight;
  688. this.tableHeight = height - 195;
  689. const that = this;
  690. window.onresize = function temp() {
  691. that.tableHeight = window.innerHeight - 195;
  692. };
  693. },
  694. mounted() {
  695. this.getClfConfigList()
  696. this.getList()
  697. }
  698. };
  699. </script>
  700. <style lang="scss" scoped>
  701. .rg_span{
  702. display: inline-block;
  703. }
  704. .rg_span span {
  705. text-align: right;
  706. box-sizing: border-box;
  707. padding-right: 10px;
  708. }
  709. .el-dialog__title {
  710. display: inline-table;
  711. margin-top: 20px;
  712. }
  713. </style>