| | |
| | | </el-form> |
| | | |
| | | <el-table |
| | | :key="tableKey" |
| | | ref="elTable" |
| | | style="margin-top: 20px" |
| | | v-loading="loading" |
| | | :data="projectInfoList" |
| | | @selection-change="handleSelectionChange" |
| | | height="100%" |
| | | sortable="custom" |
| | | row-key="id" |
| | | border |
| | | default-expand-all |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
| | | :show-overflow-tooltip="true"> |
| | | <el-table-column type="selection" width="55" align="center"/> |
| | | <!-- 动态列 --> |
| | | <el-table-column |
| | | v-for="item in columns" |
| | | :key="item.id" |
| | | v-if="item.visible" |
| | | :prop="item.id" |
| | | :label="item.label" |
| | | :min-width="item.minWidth" |
| | | :show-overflow-tooltip="item.showOverflowTooltip" |
| | | > |
| | | <el-table-column label="项目名称" min-width="250" :show-overflow-tooltip="true" prop="projectName" /> |
| | | <el-table-column label="项目推进类型" align="center" prop="projectType"> |
| | | <template slot-scope="scope"> |
| | | <!-- 使用具名插槽 --> |
| | | <template v-if="item.slotName"> |
| | | <!-- projectStatus插槽 --> |
| | | <template v-if="item.slotName === 'projectStatus'"> |
| | | <dict-tag :options="dict.type.sys_project_status" :value="scope.row.projectStatus"/> |
| | | </template> |
| | | <!-- coding插槽 --> |
| | | <template v-if="item.slotName === 'coding' || item.slotName === 'coding'"> |
| | | <dict-tag :options="dict.type.sys_project_code" :value="scope.row.coding"/> |
| | | </template> |
| | | <!-- projectType插槽 --> |
| | | <template v-if="item.slotName === 'projectType'"> |
| | | <dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/> |
| | | </template> |
| | | <!-- investType插槽 --> |
| | | <template v-if="item.slotName === 'investType'"> |
| | | <dict-tag :options="dict.type.sys_investment_type" :value="scope.row.investType"/> |
| | | </template> |
| | | </template> |
| | | <!-- 默认显示 --> |
| | | <span v-else>{{ scope.row[item.id] }}</span> |
| | | <dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="主管部门" align="center" prop="competentDepartmentName"> |
| | | </el-table-column> |
| | | <el-table-column label="业主单位" align="center" prop="projectOwnerUnitName"> |
| | | </el-table-column> |
| | | <el-table-column label="年份" align="center" prop="year"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.year ? scope.row.year + '年' : '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="投资额(万)" align="center" prop="investmentAmount" /> |
| | | <el-table-column label="开工状态" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_project_status" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | |
| | | :now-process-ins-id="nowProcessInsId" |
| | | :project-info="projectRunFrom" |
| | | :process-list="processList" |
| | | :project-type="projectType" |
| | | @close="closeRunProcess"> |
| | | </RunProcess> |
| | | </div> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | projectType: '', |
| | | projectRunFrom: { |
| | | projectId: null, |
| | | projectName: '' |
| | |
| | | methods: { |
| | | // 查看详情 |
| | | lookProcessDetail(row) { |
| | | sessionStorage.removeItem("projectProDetail") |
| | | this.$router.push({ |
| | | path: '/projectFlow/detail', |
| | | query: { |
| | | projectId: row.id, |
| | | processDefId: row.processDefId, |
| | | processInsId: row.processInsId, |
| | | deployId: row.deployId, |
| | | processName: row.flowableProcessName |
| | | } |
| | | }) |
| | |
| | | } |
| | | this.nowProcessDefId = ""; |
| | | this.nowProcessInsId = ""; |
| | | this.projectType = "" |
| | | this.showRunProcess = false |
| | | this.getList() |
| | | }, |
| | | // 打开流程页面 |
| | | openOpProcess(row) { |
| | | // 拿到流程列表 TODO 根据项目类型做筛选 |
| | | getProcessConfigInfoList().then(response => { |
| | | this.processList = response.data; |
| | | this.nowProcessDefId = row.processDefId ? row.processDefId : ''; |
| | | this.nowProcessInsId = row.processInsId ? row.processInsId : ''; |
| | | // // 防止:id没变不触发监听 |
| | | // this.$refs.runProcess.setSelect(row.flowableProcessId); |
| | | this.projectRunFrom.projectId = row.id; |
| | | this.projectRunFrom.projectName = row.projectName; |
| | | this.nowProcessDefId = row.processDefId ? row.processDefId : ''; |
| | | this.nowProcessInsId = row.processInsId ? row.processInsId : ''; |
| | | const numericPattern = /^\d+(\.\d+)?$/; |
| | | if (numericPattern.test(row.id)) { |
| | | this.projectType = "PROJECT" |
| | | } else { |
| | | this.projectType = "ENGINEERING" |
| | | } |
| | | // // 防止:id没变不触发监听 |
| | | // this.$refs.runProcess.setSelect(row.flowableProcessId); |
| | | this.projectRunFrom.projectId = row.id; |
| | | this.projectRunFrom.projectName = row.projectName; |
| | | |
| | | this.showRunProcess = true; |
| | | }); |
| | | this.showRunProcess = true; |
| | | // 拿到流程列表 TODO 根据项目类型做筛选 |
| | | // getProcessConfigInfoList().then(response => { |
| | | // this.processList = response.data; |
| | | // |
| | | // }); |
| | | }, |
| | | // 重置排序的方法 |
| | | handleResetSort() { |
| | |
| | | this.loading = true; |
| | | getProjectProcess(this.queryParams).then(response => { |
| | | this.projectInfoList = response.data; |
| | | console.log(this.projectInfoList) |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |