{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\satisfactionManagement\\ProjectSatisfactionSurveys.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\satisfactionManagement\\ProjectSatisfactionSurveys.vue","mtime":1688459521329},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 pagination from '@/components/pagination'\r\nimport {TableMixin} from '@/mixins/tableMixin'\r\nimport sat from '@/api/satisfaction/satisfaction'\r\nimport risk from '@/api/risk'\r\nimport moment from 'moment'\r\nimport filePreview from '@/components/FilePreview/filePreview.vue'\r\nimport UploadFile from '@/components/uploadFile/index.vue'\r\nconst portal = window.context.portal\r\nexport default {\r\n name: 'ProjectSatisfactionSurveys',\r\n components: {\r\n pagination,\r\n filePreview,\r\n UploadFile,\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n dialogVisible: false,\r\n dialogImageUrl: '',\r\n tableMaxHeight: 400,\r\n loading: false,\r\n tableLoading: false,\r\n tableData: [],\r\n multipleSelection: [],\r\n params: {\r\n groupRelation: 'AND',\r\n groupTree: {},\r\n pageBean: {\r\n page: 1,\r\n pageSize: 10,\r\n showTotal: true,\r\n },\r\n params: {},\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: '', // 字段名\r\n relation: 'AND',\r\n value: {},\r\n },\r\n ],\r\n sorter: [\r\n {\r\n direction: 'ASC',\r\n property: '',\r\n },\r\n ],\r\n },\r\n pageResult: {\r\n page: 1,\r\n pageSize: 20,\r\n total: 0,\r\n },\r\n searchForm: {\r\n estigationName: '',\r\n scoringDate: '',\r\n }, // 顶部搜索对象\r\n deleteIds: '', // 是否选中列表解锁删除按钮\r\n activeCollapse1: ['1'],\r\n fileList: [], // 文件上传\r\n dialog: {\r\n title: '添加',\r\n visible: false,\r\n },\r\n id: null,\r\n dialogForm: {\r\n estigationName: '',\r\n scoringDate: '',\r\n satisfaction: '',\r\n investigationConclusion: '',\r\n classified: 1, //0:不涉密,1:涉密\r\n projectName: '',\r\n },\r\n disabled: false, // 是否禁止输入输入\r\n rules: {\r\n estigationName: [\r\n {\r\n required: true,\r\n message: '请输入调查名称',\r\n trigger: 'blur',\r\n },\r\n ],\r\n classified: [\r\n {\r\n required: true,\r\n message: '请输入上传文件',\r\n trigger: 'change',\r\n },\r\n ],\r\n scoringDate: [\r\n {\r\n required: true,\r\n message: '请选择调查时间',\r\n trigger: 'change',\r\n },\r\n ],\r\n investigationConclusion: [\r\n {\r\n required: true,\r\n message: '请输入调查结论',\r\n trigger: 'blur',\r\n },\r\n ],\r\n projectName: [\r\n {\r\n required: true,\r\n message: '请选择项目名称',\r\n trigger: 'change',\r\n },\r\n ],\r\n satisfaction: [\r\n {\r\n required: true,\r\n message: '请输入项目分数',\r\n trigger: 'blur',\r\n },\r\n {\r\n pattern: /(^(\\d|[1-9]\\d)(\\.\\d{1,2})?$)|(^100$)g/,\r\n message: '请输入正确分数,最多输入两位小数',\r\n trigger: 'change',\r\n },\r\n ],\r\n },\r\n isDialog: false,\r\n optionData: [],\r\n value: '',\r\n uploadData: {\r\n bizCode: 'mydandfx',\r\n bizId: '',\r\n bizType: '',\r\n },\r\n btnLoading: false,\r\n }\r\n },\r\n\r\n created() {\r\n this.getProjectList(this.params)\r\n this.getNoProjectList()\r\n },\r\n methods: {\r\n openUploade() {\r\n this.$refs.uploadFile.open('ProjectSatisfaction')\r\n },\r\n setFileList(file) {\r\n this.fileList.push(file)\r\n },\r\n beforeRemove(file, fileList) {\r\n console.log(file)\r\n this.$confirm(`确定删除 ${file.name}?`, this.$t('common.tips'), {\r\n confirmButtonText: this.$t('common.confirm'),\r\n cancelButtonText: this.$t('common.cancel'),\r\n type: 'warning',\r\n }).then(() => {\r\n let id = file.fileId\r\n ? file.fileId\r\n : file.id\r\n ? file.id\r\n : file.response.fileId\r\n sat.deleteFileById(id, (res) => {\r\n if (res.state) {\r\n this.$message.success('附件删除成功')\r\n this.fileList = this.fileList.filter((item) => {\r\n let fileId = item.id || item.response.fileId\r\n if (fileId !== id) {\r\n return item\r\n }\r\n })\r\n } else {\r\n this.$message.error('附件删除失败')\r\n }\r\n })\r\n })\r\n },\r\n handlePreview(file) {\r\n let id = file.fileId\r\n ? file.fileId\r\n : file.id\r\n ? file.id\r\n : file.response.fileId\r\n this.dialogImageUrl = this.previewUrl + id\r\n let type = file.fileType || (file.extensionName\r\n ? file.extensionName\r\n : file.name.split('.')[1])\r\n this.$refs.filePreview.previewUrl = this.previewUrl + id\r\n this.$refs.filePreview.open(type)\r\n },\r\n // 文件下载\r\n handleDownloadFile(file) {\r\n console.log(file)\r\n let id = file.fileId\r\n ? file.fileId\r\n : file.id\r\n ? file.id\r\n : file.response.fileId\r\n window.open(portal + `/file/v1/downloadFile?fileId=${id}`, '_self')\r\n },\r\n // 查询所有未结项项目\r\n getNoProjectList() {\r\n let data = JSON.parse(JSON.stringify(this.params))\r\n data.querys = [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'closing_',\r\n relation: 'AND',\r\n value: 1,\r\n },\r\n ]\r\n risk.getNoProjectList(data, (res) => {\r\n this.optionData = res\r\n })\r\n },\r\n // 表单提交保存\r\n submit() {\r\n this.btnLoading = true\r\n this.$refs['form'].validate((valid) => {\r\n if (valid) {\r\n let {\r\n estigationName,\r\n scoringDate,\r\n satisfaction,\r\n investigationConclusion,\r\n classified, //0:不涉密,1:涉密\r\n projectName,\r\n } = this.dialogForm\r\n let time = moment(scoringDate).format('YYYY-MM-DD')\r\n let ids = this.fileList.map((item) => {\r\n return item.id ? item.id : item.response.fileId\r\n })\r\n let data = {\r\n estigationName,\r\n scoringDate: time,\r\n satisfaction,\r\n investigationConclusion,\r\n classified, //0:不涉密,1:涉密\r\n projectName,\r\n ids,\r\n id: this.id,\r\n }\r\n this.$confirm('确认提交?', this.$t('common.tips'), {\r\n confirmButtonText: this.$t('common.confirm'),\r\n cancelButtonText: this.$t('common.cancel'),\r\n type: 'warning',\r\n })\r\n .then(() => {\r\n sat.addProject(data, (res) => {\r\n if (res.state) {\r\n this.btnLoading = false\r\n this.getProjectList(this.params)\r\n this.dialog.visible = false\r\n this.$message.success(\r\n this.id ? '修改成功' : '提交成功'\r\n )\r\n } else {\r\n this.btnLoading = false\r\n this.$message.error(\r\n this.id ? '修改失败' : '提交失败'\r\n )\r\n }\r\n })\r\n })\r\n .catch(() => {\r\n this.btnLoading = false\r\n })\r\n } else {\r\n this.btnLoading = false\r\n }\r\n })\r\n },\r\n // 单击单元格\r\n cellClick(row) {\r\n console.log(row)\r\n },\r\n\r\n // 查看详情 修改\r\n openUpdate(item) {\r\n this.getFileListById(item.id)\r\n this.dialog.visible = true\r\n let {\r\n estigationName,\r\n createTime,\r\n classified, //涉密\r\n investigationConclusion,\r\n projectName,\r\n satisfaction,\r\n id,\r\n } = item\r\n let dialogForm = {\r\n estigationName,\r\n scoringDate: createTime,\r\n projectName,\r\n classified, //涉密\r\n satisfaction,\r\n investigationConclusion,\r\n }\r\n this.id = id\r\n this.dialogForm = dialogForm\r\n },\r\n // 编辑\r\n openEdit(item) {\r\n this.disabled = false\r\n this.openUpdate(item)\r\n },\r\n // 查看详情\r\n handleDetils(item) {\r\n this.disabled = true\r\n this.openUpdate(item)\r\n },\r\n // 分页查询所有数据\r\n getProjectList(data) {\r\n this.tableLoading = true\r\n sat.getProjectList(data, (res) => {\r\n this.tableData = res.rows\r\n this.tableLoading = false\r\n })\r\n },\r\n //添加\r\n handleAdd() {\r\n this.disabled = false\r\n this.dialog.visible = true\r\n this.id = null\r\n },\r\n // 根据id查询附件信息\r\n getFileListById(id) {\r\n let data = JSON.parse(JSON.stringify(this.params))\r\n data.querys = [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'biz_id_',\r\n relation: 'AND',\r\n value: id,\r\n },\r\n ]\r\n sat.getFileListById(data, (res) => {\r\n res.rows.forEach((item) => {\r\n let {id, fileName, extensionName} = item\r\n let url = `${portal}/file/onlinePreviewController/v1/getFileById_${id}`\r\n let obj = {\r\n id,\r\n name: `${fileName}.${extensionName}`,\r\n url,\r\n fileType: extensionName,\r\n }\r\n this.fileList.push(obj)\r\n })\r\n })\r\n },\r\n // 删除\r\n handleDelete() {\r\n this.$confirm('确认删除?', this.$t('common.tips'), {\r\n confirmButtonText: this.$t('common.confirm'),\r\n cancelButtonText: this.$t('common.cancel'),\r\n type: 'warning',\r\n }).then(() => {\r\n sat.deleteProject(this.deleteIds, (res) => {\r\n if (res.state) {\r\n this.$message.success('删除成功')\r\n this.getProjectList(this.params)\r\n } else {\r\n this.$message.error('删除失败')\r\n }\r\n })\r\n })\r\n },\r\n // 顶部搜索\r\n handleSearch() {\r\n // this.tableLoading = true\r\n let {estigationName, scoringDate} = this.searchForm\r\n let time = scoringDate\r\n ? moment(scoringDate).format('YYYY-MM-DD')\r\n : scoringDate\r\n let data = [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'estigationName', // 字段名\r\n relation: 'AND',\r\n value: estigationName,\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'scoringDate', // 字段名\r\n relation: 'AND',\r\n value: time,\r\n },\r\n ]\r\n this.params.querys = data\r\n console.log(this.params)\r\n this.getProjectList(this.params)\r\n },\r\n // 弹层关闭\r\n handleDialogClose() {\r\n this.dialog.visible = false\r\n ;(this.dialogForm = {\r\n estigationName: '',\r\n scoringDate: '',\r\n satisfaction: '',\r\n investigationConclusion: '',\r\n classified: 0, //0:不涉密,1:涉密\r\n projectName: '',\r\n ids: [],\r\n }),\r\n this.$refs['form'].resetFields()\r\n this.fileList = []\r\n },\r\n\r\n handleSelectionChange(currentData) {\r\n if (currentData.length === 0) return (this.deleteIds = '')\r\n let ids = []\r\n currentData.forEach((item) => {\r\n ids.push(item.id)\r\n })\r\n this.deleteIds = ids.join(',')\r\n console.log(this.deleteIds)\r\n },\r\n handleCurrentChange(page) {\r\n this.params.pageBean = {...this.params.pageBean, page}\r\n this.loadData(this.params)\r\n },\r\n handleSizeChange(pageSize) {\r\n this.params.pageBean = {...this.params.pageBean, pageSize}\r\n this.loadData(this.params)\r\n },\r\n },\r\n}\r\n",null]}