{"remainingRequest":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\SupplierManagement\\questionsList\\component\\noticeDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\views\\Normal\\SupplierManagement\\questionsList\\component\\noticeDialog.vue","mtime":1720125638808},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport {TableMixin} from '@/mixins/tableMixin'\r\nimport basicData from '@/api/basicData'\r\nexport default {\r\n name: 'CmgtSaftyDangerCheckplanFormDialogTroubleshooting', // 排查计划明细\r\n props: {\r\n useOrgList: Array,\r\n },\r\n data() {\r\n return {\r\n showTroubleshooting: false, // 控制弹层显示与隐藏\r\n multipleSelection: [],\r\n selectedValue: [],\r\n activeName: '1',\r\n url: '',\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'procureOrgId',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'projectNumber',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'noticeTitle',\r\n relation: 'AND',\r\n value: '',\r\n } \r\n ],\r\n queryParam: {\r\n pageBean: {\r\n page: 1,\r\n pageSize: 20,\r\n total: 0,\r\n },\r\n sorter:[{\r\n direction: 'DESC',\r\n property: 'create_time_',\r\n }]\r\n },\r\n currentUser:{},\r\n }\r\n },\r\n mixins: [TableMixin],\r\n created() {\r\n this.currentUser = JSON.parse(sessionStorage.getItem('currentUserDetail'))\r\n this.querys[0].value = this.currentUser.org[0].orgId\r\n },\r\n methods: {\r\n rowKey(row) {\r\n return row.id\r\n },\r\n //搜索\r\n handleSearch() {\r\n this.loadData()\r\n },\r\n //重置\r\n handleReset() {\r\n this.querys[0].value = this.currentUser.org[0].orgId\r\n this.querys[1].value = ''\r\n this.querys[2].value = ''\r\n this.loadData()\r\n },\r\n //显示弹框\r\n add() {\r\n this.showTroubleshooting = true\r\n this.loadData()\r\n this.$nextTick( ()=> {\r\n this.selectedValue = this.useOrgList\r\n this.initTableSelection()\r\n })\r\n },\r\n // 初始化表格行的选中状态\r\n initTableSelection() {\r\n if (this.selectedValue.length) {\r\n this.selectedValue = this.selectedValue.filter((item, index) => {\r\n let selectItem = this.tableData.find((tItem) => tItem.id === item.id)\r\n if (!!selectItem) {\r\n this.$refs.multipleSelection.toggleRowSelection(selectItem, true)\r\n }\r\n return !selectItem\r\n })\r\n }\r\n },\r\n handleClick() {\r\n if (this.activeName == 1) {\r\n this.url = '/matApproval/v1/page'\r\n }\r\n if (this.activeName == 2) {\r\n this.url = '/projectApproval/v1/page'\r\n }\r\n this.loadData()\r\n },\r\n // 获取list\r\n loadData() {\r\n this.loading = true\r\n this.tableData = []\r\n this.queryParam.querys = []\r\n if (this.querys[0].value) {\r\n this.queryParam.querys.push(this.querys[0])\r\n }\r\n if (this.querys[1].value) {\r\n this.queryParam.querys.push(this.querys[1])\r\n }\r\n if (this.querys[2].value) {\r\n this.queryParam.querys.push(this.querys[2])\r\n }\r\n if (this.activeName == 1) {\r\n this.url = '/matApproval/v1/page'\r\n }\r\n if (this.activeName == 2) {\r\n this.url = '/projectApproval/v1/page'\r\n }\r\n this.$http.post('${portal}' + this.url, this.queryParam).then((res) => {\r\n this.loading = false\r\n this.queryParam.pageBean.total = res.data.value.total\r\n this.queryParam.pageBean.page = res.data.value.page\r\n this.queryParam.pageBean.pageSize = res.data.value.pageSize\r\n this.tableData = res.data.value.rows\r\n this.initTableSelection()\r\n })\r\n },\r\n handleSelectionChange(val) {\r\n this.multipleSelection = val\r\n if (this.multipleSelection.length > 1) {\r\n this.$refs.multipleSelection.toggleRowSelection(\r\n this.multipleSelection[0],\r\n false\r\n )\r\n }\r\n },\r\n // 点击关闭按钮\r\n handleClose() {\r\n this.$refs.multipleSelection.clearSelection()\r\n this.showTroubleshooting = false\r\n },\r\n // 保存按钮\r\n handleSave() {\r\n let list = []\r\n list = this.multipleSelection\r\n list.forEach(item=>{\r\n if(this.activeName==1){\r\n item.noticeType = 1\r\n }\r\n if(this.activeName==2){\r\n item.noticeType = 2\r\n }\r\n })\r\n this.$emit('addDetail', list)\r\n this.handleClose()\r\n },\r\n handleCurrentChange(page) {\r\n this.queryParam.pageBean = {...this.queryParam.pageBean, page}\r\n this.loadData()\r\n },\r\n handleSizeChange(pageSize) {\r\n this.queryParam.pageBean = {...this.queryParam.pageBean, pageSize}\r\n this.loadData()\r\n },\r\n },\r\n}\r\n",null]}