You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
homestay/minsu/admin/node_modules/.cache/vue-loader/b14dba86ab5d9d10e5681c1078a...

1 line
44 KiB

{"remainingRequest":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\src\\views\\modules\\dictionary\\list.vue?vue&type=style&index=0&id=4df75745&lang=scss&scoped=true&","dependencies":[{"path":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\src\\views\\modules\\dictionary\\list.vue","mtime":1649818275451},{"path":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\node_modules\\css-loader\\dist\\cjs.js","mtime":1720078528809},{"path":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":1720078529623},{"path":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\node_modules\\postcss-loader\\src\\index.js","mtime":1720078529188},{"path":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\node_modules\\sass-loader\\dist\\cjs.js","mtime":1720078528567},{"path":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1720078528573},{"path":"D:\\mywork\\buycode\\code1\\springboot301400\\306\\分离\\admin\\node_modules\\vue-loader\\lib\\index.js","mtime":1720078529317}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCg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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA","file":"list.vue","sourceRoot":"src/views/modules/dictionary","sourcesContent":["<template>\r\n <div class=\"main-content\">\r\n\r\n <!-- 条件查询 -->\r\n <div v-if=\"showFlag\">\r\n <el-form :inline=\"true\" :model=\"searchForm\" class=\"form-content\">\r\n <el-row :gutter=\"20\" class=\"slt\" :style=\"{justifyContent:contents.searchBoxPosition=='1'?'flex-start':contents.searchBoxPosition=='2'?'center':'flex-end'}\">\r\n \r\n <el-form-item :label=\"contents.inputTitle == 1 ? '编码名字' : ''\">\r\n <el-input prefix-icon=\"el-icon-search\" v-model=\"searchForm.indexName\" placeholder=\"编码名字\" clearable></el-input>\r\n </el-form-item>\r\n \r\n\r\n\r\n <el-form-item>\r\n <el-button type=\"success\" @click=\"search()\">查询<i class=\"el-icon-search el-icon--right\"/></el-button>\r\n </el-form-item>\r\n </el-row>\r\n <el-row class=\"ad\" :style=\"{justifyContent:contents.btnAdAllBoxPosition=='1'?'flex-start':contents.btnAdAllBoxPosition=='2'?'center':'flex-end'}\">\r\n <el-form-item>\r\n <el-button\r\n v-if=\"isAuth('dictionary','新增')\"\r\n type=\"success\"\r\n icon=\"el-icon-plus\"\r\n @click=\"addOrUpdateHandler()\"\r\n >新增</el-button>\r\n &nbsp;\r\n <el-button\r\n v-if=\"isAuth('dictionary','删除')\"\r\n :disabled=\"dataListSelections.length <= 0\"\r\n type=\"danger\"\r\n icon=\"el-icon-delete\"\r\n @click=\"deleteHandler()\"\r\n >删除</el-button>\r\n &nbsp;\r\n <el-button\r\n v-if=\"isAuth('dictionary','报表')\"\r\n type=\"success\"\r\n icon=\"el-icon-pie-chart\"\r\n @click=\"chartDialog()\"\r\n >报表</el-button>\r\n &nbsp;\r\n <a style=\"text-decoration:none\" class=\"el-button el-button--success\"\r\n v-if=\"isAuth('dictionary','导入导出')\"\r\n icon=\"el-icon-download\"\r\n href=\"http://localhost:8080/minsuguanliw/upload/dictionaryMuBan.xls\"\r\n >批量导入字典表数据模板</a>\r\n &nbsp;\r\n <el-upload\r\n v-if=\"isAuth('dictionary','导入导出')\"\r\n style=\"display: inline-block\"\r\n action=\"minsuguanliw/file/upload\"\r\n :on-success=\"dictionaryUploadSuccess\"\r\n :on-error=\"dictionaryUploadError\"\r\n :show-file-list = false>\r\n <el-button\r\n v-if=\"isAuth('dictionary','导入导出')\"\r\n type=\"success\"\r\n icon=\"el-icon-upload2\"\r\n >批量导入字典表数据</el-button>\r\n </el-upload>\r\n &nbsp;\r\n <!-- 导出excel -->\r\n <download-excel v-if=\"isAuth('dictionary','导入导出')\" style=\"display: inline-block\" class = \"export-excel-wrapper\" :data = \"dataList\" :fields = \"json_fields\" name = \"dictionary.xls\">\r\n <!-- 导出excel -->\r\n <el-button\r\n type=\"success\"\r\n icon=\"el-icon-download\"\r\n >导出</el-button>\r\n </download-excel>\r\n &nbsp;\r\n </el-form-item>\r\n </el-row>\r\n </el-form>\r\n <div class=\"table-content\">\r\n <el-table class=\"tables\" :size=\"contents.tableSize\" :show-header=\"contents.tableShowHeader\"\r\n :header-row-style=\"headerRowStyle\" :header-cell-style=\"headerCellStyle\"\r\n :border=\"contents.tableBorder\"\r\n :fit=\"contents.tableFit\"\r\n :stripe=\"contents.tableStripe\"\r\n :row-style=\"rowStyle\"\r\n :cell-style=\"cellStyle\"\r\n :style=\"{width: '100%',fontSize:contents.tableContentFontSize,color:contents.tableContentFontColor}\"\r\n v-if=\"isAuth('dictionary','查看')\"\r\n :data=\"dataList\"\r\n v-loading=\"dataListLoading\"\r\n @selection-change=\"selectionChangeHandler\">\r\n <el-table-column v-if=\"contents.tableSelection\"\r\n type=\"selection\"\r\n header-align=\"center\"\r\n align=\"center\"\r\n width=\"50\">\r\n </el-table-column>\r\n <el-table-column label=\"索引\" v-if=\"contents.tableIndex\" type=\"index\" width=\"50\" />\r\n\r\n <el-table-column :sortable=\"contents.tableSortable\" :align=\"contents.tableAlign\"\r\n prop=\"dicCode\"\r\n header-align=\"center\"\r\n label=\"字段\">\r\n <template slot-scope=\"scope\">\r\n {{scope.row.dicCode}}\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column :sortable=\"contents.tableSortable\" :align=\"contents.tableAlign\"\r\n prop=\"dicName\"\r\n header-align=\"center\"\r\n label=\"字段名\">\r\n <template slot-scope=\"scope\">\r\n {{scope.row.dicName}}\r\n </template>\r\n </el-table-column>\r\n <el-table-column :sortable=\"contents.tableSortable\" :align=\"contents.tableAlign\"\r\n prop=\"codeIndex\"\r\n header-align=\"center\"\r\n label=\"编码\">\r\n <template slot-scope=\"scope\">\r\n {{scope.row.codeIndex}}\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column :sortable=\"contents.tableSortable\" :align=\"contents.tableAlign\"\r\n prop=\"indexName\"\r\n header-align=\"center\"\r\n label=\"编码名字\">\r\n <template slot-scope=\"scope\">\r\n {{scope.row.indexName}}\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column :sortable=\"contents.tableSortable\" :align=\"contents.tableAlign\"\r\n prop=\"beizhu\"\r\n header-align=\"center\"\r\n label=\"备注\">\r\n <template slot-scope=\"scope\">\r\n {{scope.row.beizhu}}\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column width=\"300\" :align=\"contents.tableAlign\"\r\n header-align=\"center\"\r\n label=\"操作\">\r\n <template slot-scope=\"scope\">\r\n <el-button v-if=\"isAuth('dictionary','查看')\" type=\"success\" icon=\"el-icon-tickets\" size=\"mini\" @click=\"addOrUpdateHandler(scope.row.id,'info')\">详情</el-button>\r\n <el-button v-if=\"isAuth('dictionary','修改')\" type=\"primary\" icon=\"el-icon-edit\" size=\"mini\" @click=\"addOrUpdateHandler(scope.row.id)\">修改</el-button>\r\n\r\n <el-button v-if=\"isAuth('dictionary','删除')\" type=\"danger\" icon=\"el-icon-delete\" size=\"mini\" @click=\"deleteHandler(scope.row.id)\">删除</el-button>\r\n\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n <el-pagination\r\n clsss=\"pages\"\r\n :layout=\"layouts\"\r\n @size-change=\"sizeChangeHandle\"\r\n @current-change=\"currentChangeHandle\"\r\n :current-page=\"pageIndex\"\r\n :page-sizes=\"[10, 20, 50, 100]\"\r\n :page-size=\"Number(contents.pageEachNum)\"\r\n :total=\"totalPage\"\r\n :small=\"contents.pageStyle\"\r\n class=\"pagination-content\"\r\n :background=\"contents.pageBtnBG\"\r\n :style=\"{textAlign:contents.pagePosition==1?'left':contents.pagePosition==2?'center':'right'}\"\r\n ></el-pagination>\r\n </div>\r\n </div>\r\n <!-- 添加/修改页面 将父组件的search方法传递给子组件-->\r\n <add-or-update v-if=\"addOrUpdateFlag\" :parent=\"this\" ref=\"addOrUpdate\"></add-or-update>\r\n\r\n\r\n\r\n <el-dialog title=\"统计报表\" :visible.sync=\"chartVisiable\" width=\"800\">\r\n <el-date-picker\r\n v-model=\"echartsDate\"\r\n type=\"year\"\r\n placeholder=\"选择年\">\r\n </el-date-picker>\r\n <el-button @click=\"chartDialog()\">查询</el-button>\r\n <div id=\"statistic\" style=\"width:100%;height:600px;\"></div>\r\n <span slot=\"footer\" class=\"dialog-footer\">\r\n\t\t\t\t<el-button @click=\"chartVisiable = false\">关闭</el-button>\r\n\t\t\t</span>\r\n </el-dialog>\r\n\r\n </div>\r\n</template>\r\n<script>\r\n import AddOrUpdate from \"./add-or-update\";\r\n import styleJs from \"../../../utils/style.js\";\r\n import utilsJs from \"../../../utils/utils.js\";\r\n\r\n export default {\r\n data() {\r\n return {\r\n searchForm: {\r\n key: \"\"\r\n },\r\n sessionTable : \"\",//登录账户所在表名\r\n role : \"\",//权限\r\n userId:\"\",//当前登录人的id\r\n //级联表下拉框搜索条件\r\n //当前表下拉框搜索条件\r\n form:{\r\n id : null,\r\n dicCode : null,\r\n dicName : null,\r\n codeIndex : null,\r\n indexName : null,\r\n superId : null,\r\n beizhu : null,\r\n createTime : null,\r\n },\r\n dataList: [],\r\n pageIndex: 1,\r\n pageSize: 10,\r\n totalPage: 0,\r\n dataListLoading: false,\r\n dataListSelections: [],\r\n showFlag: true,\r\n sfshVisiable: false,\r\n shForm: {},\r\n chartVisiable: false,\r\n echartsDate: new Date(),//echarts的时间查询字段\r\n addOrUpdateFlag:false,\r\n contents:null,\r\n layouts: '',\r\n\r\n //导出excel\r\n json_fields: {\r\n //级联表字段\r\n //本表字段\r\n '字段': \"dicCode\",\r\n '字段名': \"dicName\",\r\n '编码': \"codeIndex\",\r\n '编码名字': \"indexName\",\r\n '备注': \"beizhu\",\r\n },\r\n\r\n };\r\n },\r\n created() {\r\n this.contents = styleJs.listStyle();\r\n this.init();\r\n this.getDataList();\r\n this.contentStyleChange()\r\n },\r\n mounted() {\r\n //获取当前登录用户的信息\r\n this.sessionTable = this.$storage.get(\"sessionTable\");\r\n this.role = this.$storage.get(\"role\");\r\n this.userId = this.$storage.get(\"userId\");\r\n\r\n },\r\n filters: {\r\n htmlfilter: function (val) {\r\n return val.replace(/<[^>]*>/g).replace(/undefined/g,'');\r\n }\r\n },\r\n components: {\r\n AddOrUpdate,\r\n },\r\n computed: {\r\n },\r\n methods: {\r\n chartDialog() {\r\n let _this = this;\r\n let params = {\r\n dateFormat :\"%Y\", //%Y-%m\r\n riqi :_this.echartsDate.getFullYear(),\r\n // riqi :_this.echartsDate.getFullYear()+\"-\"+(_this.echartsDate.getMonth() + 1 < 10 ? '0' + (_this.echartsDate.getMonth() + 1) : _this.echartsDate.getMonth() + 1),\r\n thisTable : {//当前表\r\n tableName :'dictionary',//当前表表名,\r\n sumColum : 'dictionary_number', //求和字段\r\n date : 'insert_time',//分组日期字段\r\n // string : 'dictionary_name',//分组字符串字段\r\n // types : 'dictionary_types',//分组下拉框字段\r\n },\r\n // joinTable : {//级联表(可以不存在)\r\n // tableName :'yonghu',//级联表表名\r\n // // date : 'insert_time',//分组日期字段\r\n // string : 'yonghu_name',//分组字符串字段\r\n // // types : 'yonghu_types',//分组下拉框字段\r\n // }\r\n }\r\n _this.chartVisiable = true;\r\n _this.$nextTick(() => {\r\n var statistic = this.$echarts.init(document.getElementById(\"statistic\"), 'macarons');\r\n this.$http({\r\n url: \"barSum\",\r\n method: \"get\",\r\n params: params\r\n }).then(({data}) => {\r\n if(data && data.code === 0){\r\n\r\n //柱状图 求和 已成功使用\r\n //start\r\n let yAxisName = \"数值\";//根据查询数据具体改(单列要改,多列不改)\r\n let xAxisName = \"月份\";\r\n let series = [];//具体数据值\r\n data.data.yAxis.forEach(function (item,index) {\r\n let tempMap = {};\r\n // tempMap.name= [\"数值\"];//根据查询数据具体改(单列要改,多列不改)\r\n tempMap.name=data.data.legend[index];\r\n tempMap.type='bar';\r\n tempMap.data=item;\r\n series.push(tempMap);\r\n\r\n })\r\n\r\n var option = {\r\n tooltip: {\r\n trigger: 'axis',\r\n axisPointer: {\r\n type: 'cross',\r\n crossStyle: {\r\n color: '#999'\r\n }\r\n }\r\n },\r\n toolbox: {\r\n feature: {\r\n // dataView: { show: true, readOnly: false }, // 数据查看\r\n magicType: { show: true, type: ['line', 'bar'] },//切换图形展示方式\r\n // restore: { show: true }, // 刷新\r\n saveAsImage: { show: true }//保存\r\n }\r\n },\r\n legend: {\r\n data: data.data.legend//标题 可以点击导致某一列数据消失\r\n },\r\n xAxis: [\r\n {\r\n type: 'category',\r\n name: xAxisName,\r\n data: data.data.xAxis,\r\n axisPointer: {\r\n type: 'shadow'\r\n }\r\n }\r\n ],\r\n yAxis: [\r\n {\r\n type: 'value',//不能改\r\n name: yAxisName,//y轴单位\r\n axisLabel: {\r\n formatter: '{value}' // 后缀\r\n }\r\n }\r\n ],\r\n series:series//具体数据\r\n };\r\n // 使用刚指定的配置项和数据显示图表。\r\n statistic.setOption(option,true);\r\n //根据窗口的大小变动图表\r\n window.onresize = function () {\r\n statistic.resize();\r\n };\r\n //end\r\n }else {\r\n this.$message({\r\n message: \"报表未查询到数据\",\r\n type: \"success\",\r\n duration: 1500,\r\n onClose: () => {\r\n this.search();\r\n }\r\n });\r\n }\r\n });\r\n });\r\n ////饼状图\r\n //_this.chartVisiable = true;\r\n // this.$nextTick(()=>{\r\n // var statistic = this.$echarts.init(document.getElementById(\"statistic\"),'macarons');\r\n // let params = {\r\n // tableName: \"dictionary\",\r\n // groupColumn: \"dictionary_types\",\r\n // }\r\n // this.$http({\r\n // url: \"newSelectGroupCount\",\r\n // method: \"get\",\r\n // params: params\r\n // }).then(({data}) => {\r\n // if (data && data.code === 0) {\r\n // let res = data.data;\r\n // let xAxis = [];\r\n // let yAxis = [];\r\n // let pArray = []\r\n // var option = {};\r\n // for(let i=0;i<res.length;i++){\r\n // xAxis.push(res[i].name);\r\n // yAxis.push(res[i].value);\r\n // pArray.push({\r\n // value: res[i].value,\r\n // name: res[i].name\r\n // })\r\n // option = {\r\n // title: {\r\n // text: '保险合同类型统计',\r\n // left: 'center'\r\n // },\r\n // tooltip: {\r\n // trigger: 'item',\r\n // formatter: '{b} : {c} ({d}%)'\r\n // },\r\n // series: [\r\n // {\r\n // type: 'pie',\r\n // radius: '55%',\r\n // center: ['50%', '60%'],\r\n // data: pArray,\r\n // emphasis: {\r\n // itemStyle: {\r\n // shadowBlur: 10,\r\n // shadowOffsetX: 0,\r\n // shadowColor: 'rgba(0, 0, 0, 0.5)'\r\n // }\r\n // }\r\n // }\r\n // ]\r\n // };\r\n // }\r\n // statistic.setOption(option);\r\n // window.onresize = function() {\r\n // statistic.resize();\r\n // };\r\n // }\r\n // });\r\n // })\r\n },\r\n contentStyleChange() {\r\n this.contentSearchStyleChange()\r\n this.contentBtnAdAllStyleChange()\r\n this.contentSearchBtnStyleChange()\r\n this.contentTableBtnStyleChange()\r\n this.contentPageStyleChange()\r\n },\r\n contentSearchStyleChange() {\r\n this.$nextTick(() => {\r\n document.querySelectorAll('.form-content .slt .el-input__inner').forEach(el => {\r\n let textAlign = 'left'\r\n if(this.contents.inputFontPosition == 2)\r\n textAlign = 'center'\r\n if (this.contents.inputFontPosition == 3) textAlign = 'right'\r\n el.style.textAlign = textAlign\r\n el.style.height = this.contents.inputHeight\r\n el.style.lineHeight = this.contents.inputHeight\r\n el.style.color = this.contents.inputFontColor\r\n el.style.fontSize = this.contents.inputFontSize\r\n el.style.borderWidth = this.contents.inputBorderWidth\r\n el.style.borderStyle = this.contents.inputBorderStyle\r\n el.style.borderColor = this.contents.inputBorderColor\r\n el.style.borderRadius = this.contents.inputBorderRadius\r\n el.style.backgroundColor = this.contents.inputBgColor\r\n })\r\n if (this.contents.inputTitle) {\r\n document.querySelectorAll('.form-content .slt .el-form-item__label').forEach(el => {\r\n el.style.color = this.contents.inputTitleColor\r\n el.style.fontSize = this.contents.inputTitleSize\r\n el.style.lineHeight = this.contents.inputHeight\r\n })\r\n }\r\n setTimeout(() => {\r\n document.querySelectorAll('.form-content .slt .el-input__prefix').forEach(el => {\r\n el.style.color = this.contents.inputIconColor\r\n el.style.lineHeight = this.contents.inputHeight\r\n })\r\n document.querySelectorAll('.form-content .slt .el-input__suffix').forEach(el => {\r\n el.style.color = this.contents.inputIconColor\r\n el.style.lineHeight = this.contents.inputHeight\r\n })\r\n document.querySelectorAll('.form-content .slt .el-input__icon').forEach(el => {\r\n el.style.lineHeight = this.contents.inputHeight\r\n })\r\n }, 10 )\r\n })\r\n },\r\n // 搜索按钮\r\n contentSearchBtnStyleChange() {\r\n this.$nextTick(() => {\r\n document.querySelectorAll('.form-content .slt .el-button--success').forEach(el => {\r\n el.style.height = this.contents.searchBtnHeight\r\n el.style.color = this.contents.searchBtnFontColor\r\n el.style.fontSize = this.contents.searchBtnFontSize\r\n el.style.borderWidth = this.contents.searchBtnBorderWidth\r\n el.style.borderStyle = this.contents.searchBtnBorderStyle\r\n el.style.borderColor = this.contents.searchBtnBorderColor\r\n el.style.borderRadius = this.contents.searchBtnBorderRadius\r\n el.style.backgroundColor = this.contents.searchBtnBgColor\r\n })\r\n })\r\n },\r\n // 新增、批量删除\r\n contentBtnAdAllStyleChange() {\r\n this.$nextTick(() => {\r\n document.querySelectorAll('.form-content .ad .el-button--success').forEach(el => {\r\n el.style.height = this.contents.btnAdAllHeight\r\n el.style.color = this.contents.btnAdAllAddFontColor\r\n el.style.fontSize = this.contents.btnAdAllFontSize\r\n el.style.borderWidth = this.contents.btnAdAllBorderWidth\r\n el.style.borderStyle = this.contents.btnAdAllBorderStyle\r\n el.style.borderColor = this.contents.btnAdAllBorderColor\r\n el.style.borderRadius = this.contents.btnAdAllBorderRadius\r\n el.style.backgroundColor = this.contents.btnAdAllAddBgColor\r\n })\r\n document.querySelectorAll('.form-content .ad .el-button--danger').forEach(el => {\r\n el.style.height = this.contents.btnAdAllHeight\r\n el.style.color = this.contents.btnAdAllDelFontColor\r\n el.style.fontSize = this.contents.btnAdAllFontSize\r\n el.style.borderWidth = this.contents.btnAdAllBorderWidth\r\n el.style.borderStyle = this.contents.btnAdAllBorderStyle\r\n el.style.borderColor = this.contents.btnAdAllBorderColor\r\n el.style.borderRadius = this.contents.btnAdAllBorderRadius\r\n el.style.backgroundColor = this.contents.btnAdAllDelBgColor\r\n })\r\n document.querySelectorAll('.form-content .ad .el-button--warning').forEach(el => {\r\n el.style.height = this.contents.btnAdAllHeight\r\n el.style.color = this.contents.btnAdAllWarnFontColor\r\n el.style.fontSize = this.contents.btnAdAllFontSize\r\n el.style.borderWidth = this.contents.btnAdAllBorderWidth\r\n el.style.borderStyle = this.contents.btnAdAllBorderStyle\r\n el.style.borderColor = this.contents.btnAdAllBorderColor\r\n el.style.borderRadius = this.contents.btnAdAllBorderRadius\r\n el.style.backgroundColor = this.contents.btnAdAllWarnBgColor\r\n })\r\n })\r\n },\r\n // 表格\r\n rowStyle({row, rowIndex}) {\r\n if (rowIndex % 2 == 1) {\r\n if (this.contents.tableStripe) {\r\n return {color: this.contents.tableStripeFontColor}\r\n }\r\n } else {\r\n return ''\r\n }\r\n },\r\n cellStyle({row, rowIndex}) {\r\n if (rowIndex % 2 == 1) {\r\n if (this.contents.tableStripe) {\r\n return {backgroundColor: this.contents.tableStripeBgColor}\r\n }\r\n } else {\r\n return ''\r\n }\r\n },\r\n headerRowStyle({row, rowIndex}) {\r\n return {color: this.contents.tableHeaderFontColor}\r\n },\r\n headerCellStyle({row, rowIndex}) {\r\n return {backgroundColor: this.contents.tableHeaderBgColor}\r\n },\r\n // 表格按钮\r\n contentTableBtnStyleChange() {\r\n // this.$nextTick(()=>{\r\n // setTimeout(()=>{\r\n // document.querySelectorAll('.table-content .tables .el-table__body .el-button--success').forEach(el=>{\r\n // el.style.height = this.contents.tableBtnHeight\r\n // el.style.color = this.contents.tableBtnDetailFontColor\r\n // el.style.fontSize = this.contents.tableBtnFontSize\r\n // el.style.borderWidth = this.contents.tableBtnBorderWidth\r\n // el.style.borderStyle = this.contents.tableBtnBorderStyle\r\n // el.style.borderColor = this.contents.tableBtnBorderColor\r\n // el.style.borderRadius = this.contents.tableBtnBorderRadius\r\n // el.style.backgroundColor = this.contents.tableBtnDetailBgColor\r\n // })\r\n // document.querySelectorAll('.table-content .tables .el-table__body .el-button--primary').forEach(el=>{\r\n // el.style.height = this.contents.tableBtnHeight\r\n // el.style.color = this.contents.tableBtnEditFontColor\r\n // el.style.fontSize = this.contents.tableBtnFontSize\r\n // el.style.borderWidth = this.contents.tableBtnBorderWidth\r\n // el.style.borderStyle = this.contents.tableBtnBorderStyle\r\n // el.style.borderColor = this.contents.tableBtnBorderColor\r\n // el.style.borderRadius = this.contents.tableBtnBorderRadius\r\n // el.style.backgroundColor = this.contents.tableBtnEditBgColor\r\n // })\r\n // document.querySelectorAll('.table-content .tables .el-table__body .el-button--danger').forEach(el=>{\r\n // el.style.height = this.contents.tableBtnHeight\r\n // el.style.color = this.contents.tableBtnDelFontColor\r\n // el.style.fontSize = this.contents.tableBtnFontSize\r\n // el.style.borderWidth = this.contents.tableBtnBorderWidth\r\n // el.style.borderStyle = this.contents.tableBtnBorderStyle\r\n // el.style.borderColor = this.contents.tableBtnBorderColor\r\n // el.style.borderRadius = this.contents.tableBtnBorderRadius\r\n // el.style.backgroundColor = this.contents.tableBtnDelBgColor\r\n // })\r\n\r\n // }, 50)\r\n // })\r\n },\r\n // 分页\r\n contentPageStyleChange() {\r\n let arr = []\r\n if (this.contents.pageTotal) arr.push('total')\r\n if (this.contents.pageSizes) arr.push('sizes')\r\n if (this.contents.pagePrevNext) {\r\n arr.push('prev')\r\n if (this.contents.pagePager) arr.push('pager')\r\n arr.push('next')\r\n }\r\n if (this.contents.pageJumper) arr.push('jumper')\r\n this.layouts = arr.join()\r\n this.contents.pageEachNum = 10\r\n },\r\n\r\n init() {\r\n },\r\n search() {\r\n this.pageIndex = 1;\r\n this.getDataList();\r\n },\r\n // 获取数据列表\r\n getDataList() {\r\n this.dataListLoading = true;\r\n let params = {\r\n page: this.pageIndex,\r\n limit: this.pageSize,\r\n sort: 'id',\r\n }\r\n\r\n \r\n if (this.searchForm.indexName!= '' && this.searchForm.indexName!= undefined) {\r\n params['indexName'] = '%' + this.searchForm.indexName + '%'\r\n }\r\n \r\n params['dictionaryDelete'] = 1// 逻辑删除字段 1 未删除 2 删除\r\n\r\n\r\n this.$http({\r\n url: \"dictionary/page\",\r\n method: \"get\",\r\n params: params\r\n }).then(({data}) => {\r\n if(data && data.code === 0){\r\n this.dataList = data.data.list;\r\n this.totalPage = data.data.total;\r\n }else{\r\n this.dataList = [];\r\n this.totalPage = 0;\r\n }\r\n this.dataListLoading = false;\r\n });\r\n\r\n //查询级联表搜索条件所有列表\r\n //查询当前表搜索条件所有列表\r\n },\r\n //每页数\r\n sizeChangeHandle(val) {\r\n this.pageSize = val;\r\n this.pageIndex = 1;\r\n this.getDataList();\r\n },\r\n // 当前页\r\n currentChangeHandle(val) {\r\n this.pageIndex = val;\r\n this.getDataList();\r\n },\r\n // 多选\r\n selectionChangeHandler(val) {\r\n this.dataListSelections = val;\r\n },\r\n // 添加/修改\r\n addOrUpdateHandler(id, type) {\r\n this.showFlag = false;\r\n this.addOrUpdateFlag = true;\r\n this.crossAddOrUpdateFlag = false;\r\n if (type != 'info') {\r\n type = 'else';\r\n }\r\n this.$nextTick(() => {\r\n this.$refs.addOrUpdate.init(id, type);\r\n });\r\n },\r\n // 下载\r\n download(file) {\r\n window.open(\" ${file} \")\r\n },\r\n // 删除\r\n deleteHandler(id) {\r\n var ids = id ? [Number(id)] : this.dataListSelections.map(item => {\r\n return Number(item.id);\r\n });\r\n\r\n this.$confirm(`确定进行[${id ? \"删除\" : \"批量删除\"}]操作?`, \"提示\", {\r\n confirmButtonText: \"确定\",\r\n cancelButtonText: \"取消\",\r\n type: \"warning\"\r\n }).then(() => {\r\n this.$http({\r\n url: \"dictionary/delete\",\r\n method: \"post\",\r\n data: ids\r\n }).then(({data}) => {\r\n if(data && data.code === 0){\r\n this.$message({\r\n message: \"操作成功\",\r\n type: \"success\",\r\n duration: 1500,\r\n onClose: () => {\r\n this.search();\r\n }\r\n });\r\n }else{\r\n this.$message.error(data.msg);\r\n }\r\n });\r\n });\r\n },\r\n // 导入功能上传文件成功后调用导入方法\r\n dictionaryUploadSuccess(data){\r\n let _this = this;\r\n _this.$http({\r\n url: \"dictionary/batchInsert?fileName=\" + data.file,\r\n method: \"get\"\r\n }).then(({data}) => {\r\n if(data && data.code === 0){\r\n _this.$message({\r\n message: \"导入字典表数据成功\",\r\n type: \"success\",\r\n duration: 1500,\r\n onClose: () => {\r\n _this.search();\r\n }\r\n });\r\n }else{\r\n _this.$message.error(data.msg);\r\n }\r\n });\r\n\r\n },\r\n // 导入功能上传文件失败后调用导入方法\r\n dictionaryUploadError(data){\r\n this.$message.error('上传失败');\r\n },\r\n }\r\n };\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n.slt {\r\n margin: 0 !important;\r\n display: flex;\r\n }\r\n\r\n .ad {\r\n margin: 0 !important;\r\n display: flex;\r\n }\r\n\r\n .pages {\r\n & /deep/ el-pagination__sizes{\r\n & /deep/ el-input__inner {\r\n height: 22px;\r\n line-height: 22px;\r\n }\r\n }\r\n }\r\n \r\n\r\n .el-button+.el-button {\r\n margin:0;\r\n } \r\n\r\n .tables {\r\n\t& /deep/ .el-button--success {\r\n\t\theight: 40px;\r\n\t\tcolor: #333;\r\n\t\tfont-size: 14px;\r\n\t\tborder-width: 1px;\r\n\t\tborder-style: solid;\r\n\t\tborder-color: #DCDFE6;\r\n\t\tborder-radius: 4px;\r\n\t\tbackground-color: rgba(117, 113, 249, 1);\r\n\t}\r\n\t\r\n\t& /deep/ .el-button--primary {\r\n\t\theight: 40px;\r\n\t\tcolor: #333;\r\n\t\tfont-size: 14px;\r\n\t\tborder-width: 1px;\r\n\t\tborder-style: solid;\r\n\t\tborder-color: #DCDFE6;\r\n\t\tborder-radius: 4px;\r\n\t\tbackground-color: rgba(102, 204, 255, 1);\r\n\t}\r\n\t\r\n\t& /deep/ .el-button--danger {\r\n\t\theight: 40px;\r\n\t\tcolor: #333;\r\n\t\tfont-size: 14px;\r\n\t\tborder-width: 1px;\r\n\t\tborder-style: solid;\r\n\t\tborder-color: #DCDFE6;\r\n\t\tborder-radius: 4px;\r\n\t\tbackground-color: rgba(204, 255, 102, 1);\r\n\t}\r\n\r\n & /deep/ .el-button {\r\n margin: 4px;\r\n }\r\n }\r\n</style>\r\n\r\n\r\n"]}]}