{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\yhxt-web\\src\\views\\basicDataManagement\\AssessmentItems.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\basicDataManagement\\AssessmentItems.vue","mtime":1706175428975},{"path":"D:\\jenkins\\workspace\\yhxt-web\\babel.config.js","mtime":1667326389982},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.map\";\nimport _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport req from '@/request.js';\nimport basicData from '@/api/basicData.js';\nimport CascaderCompany from '@/components/selector/CascaderCompany.vue';\nexport default {\n name: 'AssessmentItems',\n components: {\n // CascaderCompany\n },\n data: function data() {\n return {\n searchForm: {},\n data: [],\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n dialogVisible: false,\n //判断是否是添加还是修改\n type: '',\n form: {\n flag: true //默认启用\n },\n\n Flag: true,\n permission: 'b',\n dialogVisibleSection: false,\n isShowControls: false,\n rules: {\n roadId: {\n required: true,\n message: '请选择路段',\n trigger: 'blur'\n },\n assessmentContent: {\n required: true,\n message: '请输入考核内容',\n trigger: 'blur'\n },\n weight: {\n required: true,\n message: '请输入权重',\n trigger: 'blur'\n },\n assessmentDetailedContent: {\n required: true,\n message: '请输入详细考核内容',\n trigger: 'blur'\n },\n scoringCriteria: {\n required: true,\n message: '请输入评分标准',\n trigger: 'blur'\n }\n },\n dictSelection: [],\n roadData: []\n };\n },\n computed: {\n deleteUrl: function deleteUrl() {\n return window.context.yhxt + '/assessment/curingAssessmentItem/v1/';\n }\n },\n created: function created() {\n this.getRoadData();\n },\n methods: {\n getRoadData: function getRoadData() {\n var _this = this;\n var arr = [];\n basicData.getRoadManagement().then(function (res) {\n var data = res.rows;\n data.forEach(function (item) {\n arr.push({\n roadName: item.name,\n roadId: item.id,\n companyName: item.companyName,\n companyId: item.companyId\n });\n });\n _this.roadData = arr;\n });\n },\n handleRoadChange: function handleRoadChange(roadId) {\n var data = this.roadData;\n var result = data.filter(function (item) {\n return item.roadId === roadId;\n });\n this.form = _objectSpread(_objectSpread({}, this.form), result[0]);\n },\n handleSelect: function handleSelect(selection) {\n this.dictSelection = selection;\n },\n //启用\n // 更新状态\n handleDictFlag: function handleDictFlag(flag) {\n var _this2 = this;\n // this.dictSelection 选中的数据\n if (!this.dictSelection.length) {\n this.$message.warning(\"\\u8BF7\\u9009\\u62E9\\u8981\".concat(flag, \"\\u7528\\u7684\\u6570\\u636E\"));\n return;\n } else {\n var msg = \"\\u786E\\u5B9A\".concat(flag, \"\\u7528\\u9009\\u4E2D\\u6570\\u636E\\u5417?\");\n this.$confirm(msg, '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n var ids = [];\n _this2.dictSelection.forEach(function (item) {\n ids.push(item.id);\n });\n var param = {\n flag: flag == '启' ? 0 : 1,\n ids: ids.join(',')\n };\n // 调用接口 提交数据\n _this2.$http.post('${yhxt}/assessment/curingAssessmentItem/v1/updateStatus', param)(function (res) {\n _this2.dictSelection = [];\n _this2.$refs.htTable.load();\n });\n }).catch(function () {\n _this2.$message({\n type: 'info',\n message: \"\\u5DF2\\u53D6\\u6D88\".concat(flag == '禁' ? '启用' : '禁用')\n });\n _this2.$refs.htTable.load(); //重新获取数据\n });\n }\n },\n //保存排序号\n handleSaveSortNumber: function handleSaveSortNumber() {\n var _this3 = this;\n var params = {};\n this.data.forEach(function (item) {\n params[item.id] = item.sn;\n });\n this.$http.post('${yhxt}/assessment/curingAssessmentItem/v1/updateSequence', params).then(function (res) {\n if (res.data.state) {\n _this3.$message.success(res.data.message);\n } else {\n _this3.$message.error(res.data.message);\n }\n _this3.$refs.htTable.load(); //重新获取数据\n });\n },\n //字典回调\n handleDict: function handleDict(val, obj, str) {\n if (str === 'mclx') {}\n },\n handleAddSection: function handleAddSection(row) {\n this.dialogVisibleSection = true;\n },\n afterDelete: function afterDelete() {\n this.$refs.htTable.load();\n },\n //新增\n handleAdd: function handleAdd() {\n this.form = {\n // flag: true\n };\n this.Flag = true;\n this.dialogVisible = true;\n this.type = 'add';\n },\n //修改\n handleEdit: function handleEdit(props) {\n if (props.flag == 0) {\n this.Flag = true; //启用\n } else {\n this.Flag = false; //禁用\n }\n\n this.type = 'edit';\n this.form = props;\n this.dialogVisible = true;\n },\n handleClose: function handleClose(done) {\n done();\n },\n //取消弹窗\n handleCancel: function handleCancel() {\n this.dialogVisible = false;\n this.dialogVisibleSection = false;\n },\n //提交保存或者修改\n handleSubmit: function handleSubmit() {\n var _this4 = this;\n //验证表单是否填写完\n this.$refs.form.validate(function (bool) {\n if (bool) {\n if (_this4.Flag) {\n _this4.form.flag = 0; //启用\n } else {\n _this4.form.flag = 1; //禁用\n }\n\n _this4.dialogVisible = false;\n //请求保存提交\n _this4.$http.post('${yhxt}/assessment/curingAssessmentItem/v1/saveCuringAssessment', _this4.form).then(function (res) {\n var data = res.data;\n if (data.state) {\n _this4.$message.success(data.message);\n } else {\n _this4.$message.error(data.message);\n }\n _this4.$refs.htTable.load(); //重新获取数据\n });\n }\n });\n },\n uniqueFunc: function uniqueFunc(arr, uniId) {\n var res = new Map();\n return arr.filter(function (item) {\n return !res.has(item[uniId]) && res.set(item[uniId], 1);\n });\n },\n handleReset: function handleReset() {\n this.searchForm = _objectSpread(_objectSpread({}, this.searchForm), {}, {\n roadId: '',\n assessmentContent: ''\n });\n this.findinfo();\n },\n findinfo: function findinfo() {\n var _this5 = this;\n typeof this.$refs.filterTable !== 'undefined' && this.$refs.filterTable.clearFilter();\n //console.log(this.searchForm.name)\n var query = [];\n var search = {\n company_id_: this.searchForm.companyIds,\n ROAD_ID_: this.searchForm.roadId,\n assessment_content_: this.searchForm.assessmentContent\n };\n for (var i in search) {\n if (search[i]) {\n if (i == 'company_id_') {\n query.push({\n group: 'companyIds',\n operation: 'IN',\n parentGroup: '',\n property: 'COMPANY_ID_',\n relation: 'AND',\n value: search[i]\n });\n } else if (i === 'ROAD_ID_') {\n query.push({\n group: 'advance',\n operation: 'EQUAL',\n property: i,\n relation: 'AND',\n value: search[i]\n });\n } else {\n query.push({\n group: 'advance',\n operation: 'LIKE',\n property: i,\n relation: 'AND',\n value: search[i]\n });\n }\n }\n }\n query = this.uniqueFunc(query, 'property');\n var data = {\n pageBean: {\n page: 1,\n pageSize: 20,\n showTotal: true\n },\n querys: query\n };\n this.topQuery = query;\n this.$http.post('${yhxt}/assessment/curingAssessmentItem/v1/query', data).then(function (response) {\n var arrData = response.data;\n _this5.data = arrData.rows;\n _this5.pageResult = {\n page: arrData.page,\n pageSize: arrData.pageSize,\n total: arrData.total\n };\n });\n },\n loadData: function loadData(param, cb) {\n var _this6 = this;\n // let r = JSON.stringify(param.pageBean)\n // let l = JSON.stringify(this.pageResult)\n // // console.log(r, l)\n // if (r == l) {\n // // console.log('一样')\n // param\n // } else {\n // // console.log('不一样')\n // let query = []\n // let search = {\n // companyId: this.searchForm.companyId,\n // name_: this.searchForm.name\n // }\n // for (let i in search) {\n // if (search[i]) {\n // query.push({\n // group: 'advance',\n // operation: 'LIKE',\n // property: i,\n // relation: 'AND',\n // value: search[i]\n // })\n // }\n // }\n // param.querys = query\n // }\n // this.exportQuery = param\n if (typeof this.topQuery !== 'undefined' && this.topQuery.length !== 0) {\n param.querys = typeof param.querys !== 'undefined' ? param.querys : [];\n this.topQuery.forEach(function (item) {\n param.querys.push(item);\n });\n param.querys = this.uniqueFunc(param.querys, 'property');\n }\n this.$http.post('${yhxt}/assessment/curingAssessmentItem/v1/query', param).then(function (response) {\n var arrData = response.data;\n _this6.data = arrData.rows;\n _this6.pageResult = {\n page: arrData.page,\n pageSize: arrData.pageSize,\n total: arrData.total\n };\n }).finally(function () {\n if (cb) {\n cb();\n }\n });\n }\n }\n};",null]}