738813bed0477af4bd0d286eba07fe0c.json 27 KB

1
  1. {"remainingRequest":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/src/views/system/department-dict/type/index.vue?vue&type=style&index=0&id=3a12f4f1&lang=scss&scoped=true","dependencies":[{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/src/views/system/department-dict/type/index.vue","mtime":1708395041890},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/css-loader/dist/cjs.js","mtime":1708395146948},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/loaders/stylePostLoader.js","mtime":1708395147772},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/postcss-loader/src/index.js","mtime":1708395147225},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/sass-loader/dist/cjs.js","mtime":1708395146389},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/cache-loader/dist/cjs.js","mtime":1708395146433},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/index.js","mtime":1708395147382}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCg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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+WA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/views/system/department-dict/type","sourcesContent":["<template>\r\n <div class=\"dashboard-container\">\r\n <div class=\"search-content\">\r\n <el-select v-model=\"queryParams.dictType\" placeholder=\"请选择字典名称\" style=\"width: 220px\" clearable>\r\n <el-option v-for=\"item in getOptionData\" :key=\"item.dictType\" :label=\"item.dictName\" :value=\"item.dictType\" />\r\n </el-select>\r\n <el-input style=\"width: 220px;\" v-model=\"queryParams.dictLabel\" placeholder=\"请输入字典标签\" />\r\n <el-select style=\"width: 220px;\" clearable placeholder=\"请选择状态\" v-model=\"queryParams.status\">\r\n <el-option v-for=\"item in statusOptions\" :key=\"item.value\" :label=\"item.label\" :value=\"item.value\" />\r\n </el-select>\r\n <div class=\"search-btn\">\r\n <div class=\"search\" @click=\"handleSearch\">查询</div>\r\n <div class=\"reset\" style=\"margin-right: 10px;\" @click=\"reset\">重置</div>\r\n <div class=\"reset\" @click=\"backLaster\">返回</div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-content\">\r\n <div style=\"width: 100%;height: 30px;\">\r\n <div class=\"btn\" @click=\"addDepartMenDict\">\r\n <span class=\"icon font_family\">&#xe604;</span>\r\n 新增\r\n </div>\r\n <div class=\"btn\" @click=\"deleteDictIds\">\r\n <span class=\"icon font_family\">&#xe607;</span>\r\n 批量删除\r\n </div>\r\n <div class=\"btn\" @click=\"uploadOut\">\r\n <span class=\"icon font_family\">&#xe605;</span>\r\n 导出\r\n </div>\r\n </div>\r\n <el-table ref=\"multipleTable\" :data=\"tableData\" tooltip-effect=\"dark\" style=\"width: 100%\"\r\n @selection-change=\"handleSelectionChange\">\r\n <el-table-column type=\"selection\" width=\"55\" align=\"center\" />\r\n <el-table-column prop=\"dictCode\" label=\"字典主键\" align=\"center\" width=\"100\" />\r\n <!-- <el-table-column prop=\"dictLabel\" label=\"字典名称\" /> -->\r\n <el-table-column prop=\"dictType\" label=\"字典类型\" align=\"center\" width=\"210\" />\r\n <el-table-column label=\"字典标签\" align=\"center\" prop=\"dictLabel\" width=\"150\">\r\n <template #default=\"scope\">\r\n <span v-if=\"scope.row.listClass == '' || scope.row.listClass == 'default'\">{{ scope.row.dictLabel }}</span>\r\n <el-tag v-else :type=\"scope.row.listClass == 'primary' ? '' : scope.row.listClass\">{{ scope.row.dictLabel\r\n }}</el-tag>\r\n </template>\r\n </el-table-column>\r\n <el-table-column prop=\"dictSort\" label=\"字典排序\" align=\"center\" width=\"120\" />\r\n <el-table-column prop=\"status\" label=\"状态\" align=\"center\" width=\"100\">\r\n <template slot-scope=\"scope\">\r\n <div class=\"startUsing\" v-if=\"scope.row.status == 1\">启用</div>\r\n <div class=\"Deactivate\" v-else>停用</div>\r\n </template>\r\n </el-table-column>\r\n <el-table-column prop=\"remark\" label=\"备注\" align=\"center\" width=\"220\" />\r\n <el-table-column prop=\"updateTime\" label=\"最后更新\" align=\"center\" />\r\n <el-table-column label=\"操作\" align=\"center\">\r\n <template slot-scope=\"scope\">\r\n <div class=\"operateBtn\">\r\n <div style=\"color: #2766DD;\" @click=\"editDict(scope.row)\">修改</div>\r\n <div style=\"color: #2766DD;\" @click=\"deleteDict(scope.row)\">删除</div>\r\n </div>\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n <el-row type=\"flex\" justify=\"end\" style=\"margin-top: 10px\">\r\n\r\n <div class=\"pagination\">\r\n <el-pagination :page-sizes=\"[10, 15, 20]\" :page-size=\"searchData.pageSize\"\r\n layout=\"total, sizes, prev, pager, next, jumper\" :total=\"total\" @size-change=\"handleSizeChange\"\r\n @current-change=\"handleCurrentChange\" />\r\n </div>\r\n </el-row>\r\n </div>\r\n\r\n <el-dialog center width=\"636px\" :title=\"title\" :visible.sync=\"dialogFormVisible\">\r\n <el-form ref=\"form\" :model=\"form\" :rules=\"rules\">\r\n <el-form-item label=\"字典类型\" label-width=\"80px\" prop=\"railwayName\">\r\n <el-input v-model=\"form.dictType\" autocomplete=\"off\" disabled />\r\n </el-form-item>\r\n <el-form-item label=\"数据标签\" label-width=\"80px\" prop=\"railwayCode\">\r\n <el-input v-model=\"form.dictLabel\" autocomplete=\"off\" maxlength=\"20\" placeholder=\"请输入数据标签\" />\r\n </el-form-item>\r\n <el-form-item label=\"数据键值\" label-width=\"80px\" prop=\"railwayCode\">\r\n <el-input v-model=\"form.dictValue\" autocomplete=\"off\" maxlength=\"25\" placeholder=\"请输入数据键值\" />\r\n </el-form-item>\r\n <el-form-item label=\"样式属性\" label-width=\"80px\" prop=\"railwayCode\">\r\n <el-input v-model=\"form.cssClass\" autocomplete=\"off\" maxlength=\"4\" placeholder=\"请输入样式属性\" />\r\n </el-form-item>\r\n <el-form-item label=\"显示排序\" label-width=\"80px\" prop=\"railwayCode\">\r\n <el-input v-model=\"form.dictSort\" autocomplete=\"off\" maxlength=\"4\" placeholder=\"请输入部门排序\" />\r\n </el-form-item>\r\n <el-form-item label=\"回显样式\" label-width=\"80px\" prop=\"listClass\">\r\n <el-select v-model=\"form.listClass\" style=\"width: 100%\">\r\n <el-option v-for=\"item in listClassOptions\" :key=\"item.value\" :label=\"item.label + '(' + item.value + ')'\"\r\n :value=\"item.value\"></el-option>\r\n </el-select>\r\n </el-form-item>\r\n <el-form-item label=\"字典状态\" label-width=\"80px\">\r\n <el-radio-group v-model=\"form.status\">\r\n <el-radio :label=\"1\">启用</el-radio>\r\n <el-radio :label=\"2\">停用</el-radio>\r\n </el-radio-group>\r\n </el-form-item>\r\n <el-form-item label=\"备注\" label-width=\"80px\" prop=\"remark\">\r\n <el-input v-model=\"form.remark\" placeholder=\"请输入备注\" autocomplete=\"off\" />\r\n </el-form-item>\r\n </el-form>\r\n <div slot=\"footer\" class=\"dialog-footer\">\r\n <!-- <el-button class=\"reset\" @click=\"dialogFormVisible = false\">取 消</el-button>\r\n <el-button class=\"search\" @click=\"submitForm\">保存</el-button> -->\r\n <div class=\"search\" @click=\"submitForm\">保 存</div>\r\n <div class=\"reset\" @click=\"dialogFormVisible = false\">取 消</div>\r\n </div>\r\n </el-dialog>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { getType, getAddData, getUpdateData, getDeleteData, getExportOutData, getNameSelectData } from '@/api/departMentDict'\r\nimport { mapGetters } from 'vuex'\r\n\r\nexport default {\r\n name: 'DepartType',\r\n computed: {\r\n ...mapGetters([\r\n 'name'\r\n ])\r\n },\r\n data() {\r\n return {\r\n clickType: '',\r\n getOptionData: [],\r\n queryParams: {\r\n dataType: '',\r\n pageSize: 10,\r\n pageNum: 1,\r\n diceCode: '',\r\n dictLabel: '',\r\n dictType: ''\r\n },\r\n form: {\r\n // dictCode: '',\r\n dictLabel: '',\r\n dictValue: '',\r\n cssClass: '',\r\n listClass: \"default\",\r\n dictSort: 0,\r\n status: \"0\",\r\n dictType: this.$route.query.testQuery,\r\n remark: ''\r\n },\r\n statusOptions: [\r\n {\r\n label: '启用',\r\n value: '1'\r\n },\r\n {\r\n label: '停用',\r\n value: '2'\r\n }\r\n ],\r\n searchData: {},\r\n ids: [],\r\n tableData: [],\r\n total: 0,\r\n title: '',\r\n dialogFormVisible: false,\r\n testQuery: '',\r\n listClassOptions: [\r\n { value: \"default\", label: \"默认\" },\r\n { value: \"primary\", label: \"主要\" },\r\n { value: \"success\", label: \"成功\" },\r\n { value: \"info\", label: \"信息\" },\r\n { value: \"warning\", label: \"警告\" },\r\n { value: \"danger\", label: \"危险\" }\r\n ]\r\n }\r\n },\r\n created() {\r\n this.queryParams.dictType = this.$route.query.testQuery\r\n this.getTypes()\r\n this.getSelectNameList()\r\n },\r\n mounted() {\r\n },\r\n methods: { \r\n backLaster() {\r\n this.$router.push({ path: '/system/department-dict' })\r\n },\r\n getSelectNameList() {\r\n getNameSelectData({ dataType: '' }).then(res => { \r\n this.getOptionData = res.data\r\n })\r\n },\r\n uploadOut() {\r\n getExportOutData(this.queryParams).then(response => {\r\n // this.exportFile(response, '部门数据字典信息')\r\n\r\n\r\n if (res.type == \"application/json\") {\r\n const reader = new FileReader(); \r\n reader.readAsText(res, 'utf-8'); \r\n reader.onload = function () {\r\n const msg = JSON.parse(reader.result);\r\n if(msg.code == 200){\r\n this.exportFile(response, '部门数据字典信息')\r\n } else{\r\n Message({\r\n type: 'error',\r\n message: msg.msg\r\n });\r\n } \r\n }\r\n }else{\r\n this.exportFile(response, '部门数据字典信息')\r\n }\r\n })\r\n },\r\n exportFile: function (obj, name = Date.now(), suffix = 'xlsx') {\r\n const url = window.URL.createObjectURL(\r\n new Blob([obj], { type: 'application/vnd.ms-excel' })\r\n )\r\n const aDOM = document.createElement('a')\r\n aDOM.style.display = 'none'\r\n aDOM.href = url\r\n const fileName = name + '.' + suffix\r\n aDOM.setAttribute('download', fileName)\r\n document.body.appendChild(aDOM)\r\n aDOM.click()\r\n document.body.removeChild(aDOM)\r\n },\r\n reset() {\r\n this.queryParams = {}\r\n this.queryParams.pageNum = 1\r\n this.queryParams.pageSize = 10\r\n this.getTypes()\r\n },\r\n handleSelectionChange(val) {\r\n this.ids = val.map((item) => item.dictCode)\r\n },\r\n deleteDictIds() {\r\n if (this.ids.length == 0) {\r\n this.$message({\r\n type: 'error',\r\n message: '请选择要删除的字典数据!'\r\n })\r\n } else {\r\n this.$confirm('确定要删除吗?', '信息提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n }).then(() => {\r\n getDeleteData(this.ids).then(res => {\r\n if (res.code == 200) {\r\n this.getTypes(this.data)\r\n this.$message({\r\n type: 'success',\r\n message: '删除成功!'\r\n })\r\n } else {\r\n this.$message({\r\n type: 'error',\r\n message: res.msg\r\n })\r\n }\r\n })\r\n }).catch(() => {\r\n this.$message({\r\n type: 'info',\r\n message: '已取消删除'\r\n })\r\n })\r\n }\r\n },\r\n deleteDict(scope) { \r\n this.$confirm('确定要删除吗?', '信息提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n }).then(() => {\r\n getDeleteData(scope.dictCode).then(res => {\r\n if (res.code == 200) {\r\n this.getTypes(this.data)\r\n this.$message({\r\n type: 'success',\r\n message: '删除成功!'\r\n })\r\n } else {\r\n this.$message({\r\n type: 'error',\r\n message: res.msg\r\n })\r\n }\r\n })\r\n }).catch(() => {\r\n this.$message({\r\n type: 'info',\r\n message: '已取消删除'\r\n })\r\n })\r\n },\r\n submitForm() {\r\n if (this.clickType == 1) {\r\n getAddData(this.form).then(response => {\r\n // useDictStore().removeDict(queryParams.value.dictType);\r\n if (response.code == 200) {\r\n this.$message({\r\n type: 'success',\r\n message: '新增成功!'\r\n })\r\n this.dialogFormVisible = false\r\n this.form = {}\r\n this.getTypes();\r\n }\r\n });\r\n } else if (this.clickType == 2) {\r\n getUpdateData(this.form).then(response => {\r\n // useDictStore().removeDict(queryParams.value.dictType);\r\n if (response.code == 200) {\r\n this.$message({\r\n type: 'success',\r\n message: '修改成功!'\r\n })\r\n this.dialogFormVisible = false\r\n this.form = {}\r\n this.getTypes()\r\n }\r\n });\r\n }\r\n },\r\n handleSearch() {\r\n this.queryParams.pageNum = 1\r\n this.getTypes()\r\n },\r\n /** 查询字典类型详细 */\r\n getTypes() {\r\n // this.queryParams.dictType = this.$route.query.testQuery\r\n getType(this.queryParams).then(response => {\r\n this.tableData = response.data.records\r\n this.total = response.data.total\r\n })\r\n },\r\n addDepartMenDict() {\r\n this.form = {}\r\n this.form.dictType = this.$route.query.testQuery\r\n this.clickType = 1\r\n this.title = '添加字典数据'\r\n this.dialogFormVisible = true\r\n },\r\n editDict(scope) {\r\n this.clickType = 2\r\n this.title = '修改字典数据'\r\n this.dialogFormVisible = true\r\n this.form = JSON.parse(JSON.stringify(scope))\r\n },\r\n handleSizeChange(val) {\r\n this.queryParams.pageSize = val\r\n this.getTypes()\r\n },\r\n handleCurrentChange(val) {\r\n this.queryParams.pageNum = val\r\n this.getTypes()\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.dashboard {\r\n &-container {\r\n margin: 45px 30px 30px;\r\n }\r\n\r\n &-text {\r\n font-size: 30px;\r\n line-height: 46px;\r\n }\r\n}\r\n\r\n.dashboard-container {\r\n\r\n .search-content {\r\n width: 100%;\r\n height: 74px;\r\n background-color: #fff;\r\n display: flex;\r\n align-items: center;\r\n padding-left: 10px;\r\n\r\n .el-input {\r\n margin: 0 10px;\r\n }\r\n\r\n .el-select {\r\n margin: 0 10px;\r\n }\r\n\r\n .search-btn {\r\n display: flex;\r\n align-items: center;\r\n height: 100%;\r\n margin-left: 10px;\r\n\r\n div {\r\n // margin: 0 6px;\r\n display: inline-block;\r\n width: 80px;\r\n height: 40px;\r\n border-radius: 2px;\r\n font-size: 14px;\r\n line-height: 40px;\r\n text-align: center;\r\n }\r\n\r\n div:hover {\r\n cursor: pointer;\r\n }\r\n\r\n .search {\r\n margin-right: 10px;\r\n background-color: #2766DD;\r\n color: #F7F8FB;\r\n }\r\n\r\n .search:hover {\r\n background-color: #4D85F4;\r\n }\r\n\r\n .reset {\r\n color: #333334;\r\n border: 1px solid #D7D7D7;\r\n }\r\n\r\n .reset:hover {\r\n color: #1F9FFF;\r\n border: 1px solid #1F9FFF;\r\n }\r\n }\r\n }\r\n\r\n .table-content {\r\n margin-top: 15px;\r\n width: 100%;\r\n background-color: #fff;\r\n padding: 0 20px 20px;\r\n\r\n .btn {\r\n margin: 15px 20px 15px 0;\r\n cursor: pointer;\r\n float: left;\r\n text-align: center;\r\n width: 98px;\r\n height: 34px;\r\n border-radius: 2px;\r\n border: 1px solid #ABC7FD;\r\n line-height: 34px;\r\n font-weight: 400;\r\n font-size: 14px;\r\n color: #2250C8;\r\n background-color: #E7EEFF;\r\n }\r\n\r\n .btn:hover {\r\n color: #FFFFFF;\r\n background-color: #2250C8;\r\n border: 1px solid #2250C8;\r\n }\r\n\r\n .btn:active {\r\n color: #FFFFFF;\r\n background-color: #194DA4;\r\n border: 1px solid #194DA4;\r\n }\r\n\r\n\r\n .startUsing {\r\n width: 54px;\r\n height: 24px;\r\n margin: 14.5px auto 0;\r\n line-height: 24px;\r\n text-align: center;\r\n font-size: 12px;\r\n color: #00974D;\r\n border-radius: 4px;\r\n background-color: #E7FAF0;\r\n border: 1px solid #BEFDDD;\r\n }\r\n\r\n .Deactivate {\r\n width: 54px;\r\n height: 24px;\r\n margin: 14.5px auto 0;\r\n line-height: 24px;\r\n text-align: center;\r\n font-size: 12px;\r\n color: #FF9933;\r\n border-radius: 4px;\r\n background-color: #FFF3E8;\r\n border: 1px solid #FDE6CF;\r\n }\r\n\r\n .operateBtn {\r\n display: flex;\r\n justify-content: center;\r\n color: #2866DD;\r\n\r\n div {\r\n font-size: 14px;\r\n margin: 0 5px;\r\n cursor: pointer;\r\n }\r\n }\r\n\r\n .pagination {\r\n margin: 10px 0;\r\n width: 100%;\r\n height: 20px;\r\n\r\n .el-pagination {\r\n float: right;\r\n margin: 10px 0;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.search {\r\n background-color: #2766DD;\r\n color: #F7F8FB;\r\n}\r\n\r\n.search:hover {\r\n background-color: #4D85F4;\r\n}\r\n\r\n.reset {\r\n color: #333334;\r\n border: 1px solid #D7D7D7;\r\n}\r\n\r\n.reset:hover {\r\n color: #1F9FFF;\r\n border: 1px solid #1F9FFF;\r\n background: none;\r\n}\r\n\r\n.operateBtn {\r\n display: flex;\r\n justify-content: center;\r\n color: #2766DD;\r\n\r\n div {\r\n font-size: 16px;\r\n margin: 0 5px;\r\n cursor: pointer;\r\n }\r\n}\r\n\r\n.startUsing {\r\n width: 54px;\r\n height: 24px;\r\n margin: 14.5px auto 0;\r\n line-height: 24px;\r\n text-align: center;\r\n font-size: 12px;\r\n color: #00974D;\r\n border-radius: 4px;\r\n background-color: #E7FAF0;\r\n border: 1px solid #BEFDDD;\r\n}\r\n\r\n.Deactivate {\r\n width: 54px;\r\n height: 24px;\r\n margin: 14.5px auto 0;\r\n line-height: 24px;\r\n text-align: center;\r\n font-size: 12px;\r\n color: #FF9933;\r\n border-radius: 4px;\r\n background-color: #FFF3E8;\r\n border: 1px solid #FDE6CF;\r\n}\r\n::v-deep .el-dialog__body {\r\n padding: 20px 95px !important;\r\n}\r\n</style>\r\n"]}]}