{"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\\patrolTask\\TaskConfiguration.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\patrolTask\\TaskConfiguration.vue","mtime":1667326395169},{"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":315532800000},{"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/es6.object.keys\";\nimport \"core-js/modules/es6.regexp.split\";\nimport _typeof from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/typeof\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.map\";\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//\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 basicData from '@/api/basicData.js';\nimport sctionInfoSelector from '@/components/selector/sctionInfoSelector.vue';\nimport eipUserSelector from '@/components/eipControl/selector/EipUserSelector.vue';\nimport companyInfoSelector from '@/components/selector/companyInfoSelector.vue';\nimport CascaderCompany from '@/components/selector/CascaderCompany.vue';\nexport default {\n components: {\n sctionInfoSelector: sctionInfoSelector,\n // companyInfoSelector,\n eipUserSelector: eipUserSelector,\n CascaderCompany: CascaderCompany\n },\n data: function data() {\n return {\n taskTypesele: [{\n label: '按月',\n value: 1\n }, {\n label: '按天',\n value: 2\n }],\n typeOp: [{\n label: '日巡检',\n value: 1\n }, {\n label: '夜巡检',\n value: 2\n }],\n company: [],\n searchForm: {},\n companyOptions: [],\n data: [],\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n permission: 'b',\n title: '',\n dialogVisble: false,\n rules: {\n manageUnitName: [{\n required: true,\n message: '请选择管理中心',\n trigger: 'blur'\n }],\n companyName: [{\n required: true,\n message: '请选择公司',\n trigger: 'blur'\n }],\n type: [{\n required: true,\n message: '请输入巡检类型',\n trigger: 'blur'\n }],\n taskType: [{\n required: true,\n message: '请输入任务类型',\n trigger: 'blur'\n }],\n frequency: [{\n required: true,\n message: '请输入任务频率',\n trigger: 'blur'\n }],\n rummagerAccount: [{\n required: true,\n message: '请输入巡检人',\n trigger: 'blur'\n }],\n roadSegmentName: [{\n required: true,\n message: '请输入所属路段',\n trigger: 'blur'\n }],\n patrolDate: [{\n required: true,\n message: '请输入开始日期',\n trigger: 'blur'\n }],\n startTime: [{\n required: true,\n message: '请输入开始时间',\n trigger: 'blur'\n }],\n endTime: [{\n required: true,\n message: '请输入结束时间',\n trigger: 'blur'\n }],\n content: [{\n required: true,\n message: '请输入巡检内容',\n trigger: 'blur'\n }],\n problem: [{\n required: true,\n message: '请输入巡检情况',\n trigger: 'blur'\n }]\n },\n form: {\n type: 1,\n taskType: 1,\n Time: []\n },\n selecter: {}\n };\n },\n created: function created() {\n this.company = this.getCompany();\n },\n methods: {\n afterDelete: function afterDelete() {\n this.$refs.htTable.load();\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 findinfo: function findinfo() {\n var _this = this;\n\n typeof this.$refs.filterTable !== 'undefined' && this.$refs.filterTable.clearFilter();\n var query = [];\n var search = {\n company_id_: this.searchForm.companyIds,\n taskType: this.searchForm.taskType,\n type: this.searchForm.type\n };\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 {\n query.push({\n group: 'advance',\n operation: 'LIKE',\n property: i,\n relation: 'AND',\n value: search[i]\n });\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('${form}/inspectionTaskConfig/v1/getJson', data).then(function (res) {\n console.log(res, '11');\n _this.data = res.data.rows;\n _this.pageResult = {\n page: res.data.page,\n pageSize: res.data.pageSize,\n total: res.data.total\n };\n });\n },\n getCompany: function getCompany() {\n var _this2 = this;\n\n this.$http.post('${yhxt}/Company/v1/getCompany').then(function (res) {\n res.data.forEach(function (item) {\n _this2.companyOptions.push({\n id: item.id,\n name: item.name\n });\n });\n });\n },\n //深层拷贝回去公司名称\n deepClone: function deepClone(obj) {\n var objClone = Array.isArray(obj) ? [] : {};\n\n if (obj && _typeof(obj) === 'object') {\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n //判断ojb子元素是否为对象,如果是,递归复制\n if (obj[key] && _typeof(obj[key]) === 'object') {\n objClone[key] = this.deepClone(obj[key]);\n } else {\n if (obj[key] == obj.name) {\n this.companyOptions.push({\n id: obj.id,\n name: obj.name\n });\n } //如果不是,简单复制\n\n\n objClone[key] = obj[key];\n }\n }\n }\n }\n },\n loadData: function loadData(param, cb) {\n var _this3 = this;\n\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 // company_id_: this.searchForm.companyId,\n // taskType: this.searchForm.taskType,\n // type: this.searchForm.type\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 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\n this.$http.post('${form}/inspectionTaskConfig/v1/getJson', param).then(function (resp) {\n var res = resp.data;\n _this3.data = res.rows;\n _this3.pageResult = {\n page: res.page,\n pageSize: res.pageSize,\n total: res.total\n };\n }, function (error) {\n reject(error);\n }).finally(function () {\n if (cb) {\n cb();\n }\n });\n },\n handleClose: function handleClose(done) {\n //清空表单\n this.$refs.htTable.load();\n done();\n },\n datachange: function datachange(val) {\n console.log(val);\n this.form.Time = [val[0], val[1]];\n },\n handleEdit: function handleEdit(row) {\n this.$set(row, 'Time', [row.startTime, row.endTime]);\n this.dialogVisble = true;\n this.form = row;\n this.title = '【修改任务配置】';\n },\n handleCancel: function handleCancel() {\n this.form = {\n companyName: ''\n };\n this.dialogVisble = false;\n this.titles = '';\n this.$refs.htTable.load();\n },\n showDialog: function showDialog() {\n this.dialogVisble = true;\n this.title = '【添加任务配置】';\n this.form = {\n type: 1,\n taskType: 1\n };\n },\n handleSubmit: function handleSubmit() {\n var _this4 = this;\n\n console.log(this.form); //验证表单是否填写完\n\n this.$refs.form.validate(function (bool) {\n if (bool) {\n var data = _this4.form;\n data.startTime = data.Time[0];\n data.endTime = data.Time[1];\n console.log(data); //请求保存提交\n\n _this4.$http.post('${form}/inspectionTaskConfig/v1/saveInspectionTaskConfigSpecial', data).then(function (res) {\n if (res.status == 200) {\n _this4.dialogVisble = false;\n\n _this4.$message({\n message: res.data.message,\n type: 'success'\n });\n\n _this4.$refs.htTable.load();\n }\n\n _this4.form = {\n type: 1,\n taskType: 1,\n Time: []\n }; //清空表单\n });\n }\n });\n },\n //路段信息赋值\n changed: function changed(obj) {\n console.log(obj);\n this.form.roadSegmentName = obj.name;\n this.form.roadSegmentId = obj.id;\n this.form.companyName = obj.companyName;\n this.form.companyId = obj.companyId;\n this.form.routeName = obj.routeName;\n this.form.routeId = obj.routeId;\n },\n //默认赋值为第一条数据的值\n value: function value(obj) {\n console.log(obj);\n\n if (this.title == '【添加任务配置】') {\n this.form.roadSegmentName = obj.name;\n this.form.roadSegmentId = obj.id;\n this.form.companyName = obj.companyName;\n this.form.companyId = obj.companyId;\n this.form.routeName = obj.routeName;\n this.form.routeId = obj.routeId;\n }\n },\n //公司赋值\n handleChanged: function handleChanged(obj) {\n // console.log(obj.valueInfo.join(','))\n this.form.companyIds = JSON.stringify(obj.valueInfo);\n this.form.companyName = obj.name;\n this.form.companyId = obj.id;\n },\n companyValue: function companyValue(obj) {\n // console.log(obj)\n this.form.companyName = obj.name;\n this.form.companyId = obj.id;\n this.form.companyIds = JSON.stringify(obj.id.split(' ')); //必须是空格\n },\n switchChange: function switchChange(row) {\n var _this5 = this;\n\n console.log(row);\n\n if (row.id) {\n row = {\n ids: row.id,\n status: row.status\n };\n }\n\n var formData = new FormData();\n Object.keys(row).forEach(function (key) {\n formData.append(key, row[key]);\n });\n this.$http.post('${form}/inspectionTaskConfig/v1/updateStatus', formData).then(function (res) {\n _this5.$message.success(res.data.message);\n\n _this5.$refs.htTable.load();\n });\n },\n handleTableSelect: function handleTableSelect(sel) {\n var arr = [];\n arr = sel.map(function (item) {\n return item.id;\n });\n this.selecter.ids = arr.join(',');\n },\n staChange: function staChange(num) {\n if (num == 0) {\n this.selecter.status = '0';\n } else if (num == 1) {\n this.selecter.status = '1';\n }\n\n this.switchChange(this.selecter);\n }\n }\n};",null]}