|
|
@@ -308,428 +308,426 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import ProjectDetailDialog from '@/views/BOMmanage/ProjectDetailDialog.vue';
|
|
|
- import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
|
|
|
- import indexSearch from './components/index-search.vue';
|
|
|
- import addOrEditDialog from './components/addOrEditDialog.vue';
|
|
|
- import addPlanDialog from '../planManage/components/addOrEditDialog.vue';
|
|
|
- import detailDialog from './components/detailDialog.vue';
|
|
|
- import {
|
|
|
- projectsDeleteAPI,
|
|
|
- projectsPageAPI,
|
|
|
- submit,
|
|
|
- projectsFinishAPI,
|
|
|
- projectsPauseAPI,
|
|
|
- projectsStartupAPI,
|
|
|
- projectsTerminationAPI,
|
|
|
- getMyProjectsPage
|
|
|
- } from '@/api/project-manage';
|
|
|
- import { reviewStatusEnum } from '@/enum/dict';
|
|
|
- import { mapGetters } from 'vuex';
|
|
|
- import { getByCode } from '@/api/system/dictionary-data';
|
|
|
- import popModal from '@/components/pop-modal/index.vue';
|
|
|
- import AssetTree from '@/components/AssetTree';
|
|
|
- export default {
|
|
|
- name: 'index',
|
|
|
- components: {
|
|
|
- popModal,
|
|
|
- addOrEditDialog,
|
|
|
- detailDialog,
|
|
|
- indexSearch,
|
|
|
- processSubmitDialog,
|
|
|
- addPlanDialog,
|
|
|
- AssetTree,
|
|
|
- ProjectDetailDialog
|
|
|
- },
|
|
|
- computed: {
|
|
|
- ...mapGetters(['getDictValue']),
|
|
|
+import ProjectDetailDialog from '@/views/BOMmanage/ProjectDetailDialog.vue';
|
|
|
+import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
|
|
|
+import indexSearch from './components/index-search.vue';
|
|
|
+import addOrEditDialog from './components/addOrEditDialog.vue';
|
|
|
+import addPlanDialog from '../planManage/components/addOrEditDialog.vue';
|
|
|
+import detailDialog from './components/detailDialog.vue';
|
|
|
+import {
|
|
|
+ projectsDeleteAPI,
|
|
|
+ projectsPageAPI,
|
|
|
+ submit,
|
|
|
+ projectsFinishAPI,
|
|
|
+ projectsPauseAPI,
|
|
|
+ projectsStartupAPI,
|
|
|
+ projectsTerminationAPI,
|
|
|
+ getMyProjectsPage
|
|
|
+} from '@/api/project-manage';
|
|
|
+import { reviewStatusEnum } from '@/enum/dict';
|
|
|
+import { mapGetters } from 'vuex';
|
|
|
+import { getByCode } from '@/api/system/dictionary-data';
|
|
|
+import popModal from '@/components/pop-modal/index.vue';
|
|
|
+import AssetTree from '@/components/AssetTree';
|
|
|
+export default {
|
|
|
+ name: 'index',
|
|
|
+ components: {
|
|
|
+ popModal,
|
|
|
+ addOrEditDialog,
|
|
|
+ detailDialog,
|
|
|
+ indexSearch,
|
|
|
+ processSubmitDialog,
|
|
|
+ addPlanDialog,
|
|
|
+ AssetTree,
|
|
|
+ ProjectDetailDialog
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['getDictValue']),
|
|
|
|
|
|
- columns() {
|
|
|
- return [
|
|
|
- {
|
|
|
- width: 45,
|
|
|
- type: 'selection',
|
|
|
- columnKey: 'selection',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- columnKey: 'index',
|
|
|
- label: '序号',
|
|
|
- type: 'index',
|
|
|
- width: 55,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'typeName',
|
|
|
- label: '项目类型',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 150,
|
|
|
- align: 'center'
|
|
|
- // slot: 'type',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'code',
|
|
|
- label: '项目编码',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 160,
|
|
|
- slot: 'code',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'name',
|
|
|
- label: '项目名称',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 140
|
|
|
- },
|
|
|
+ columns() {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ width: 45,
|
|
|
+ type: 'selection',
|
|
|
+ columnKey: 'selection',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'typeName',
|
|
|
+ label: '项目类型',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 150,
|
|
|
+ align: 'center'
|
|
|
+ // slot: 'type',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ label: '项目编码',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 160,
|
|
|
+ slot: 'code',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '项目名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- prop: 'responsibleDeptName',
|
|
|
- label: '负责部门',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 100
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'responsibleUserName',
|
|
|
- label: '项目经理',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 100
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'teamName',
|
|
|
- label: '项目团队',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 100
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'cycle',
|
|
|
- label: '项目周期',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 100
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'budget',
|
|
|
- label: '项目预算',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110,
|
|
|
- formatter: (_row, _column, cellValue) => {
|
|
|
- return cellValue
|
|
|
- ? cellValue +
|
|
|
- this.getDictV('pro_projects_budget_unit', _row.unit)
|
|
|
- : '';
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'planStartDate',
|
|
|
- label: '计划开始日期',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 120
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'planEndDate',
|
|
|
- label: '计划完成日期',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 120
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'realStartTime',
|
|
|
- label: '实际开始日期',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 120
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'realEndTime',
|
|
|
- label: '实际完成日期',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 120
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'cost',
|
|
|
- label: '费用(元)',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 140
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'status',
|
|
|
- label: '项目状态',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 100,
|
|
|
- slot: 'status'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'processStatus',
|
|
|
- label: '审核状态',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 100,
|
|
|
- formatter: (_row, _column, cellValue) => {
|
|
|
- return reviewStatusEnum[_row.processStatus].label;
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'isOverTime',
|
|
|
- label: '是否超时',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 100,
|
|
|
- slot: 'isOverTime'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'isOverbudget',
|
|
|
- label: '是否超预算',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 100,
|
|
|
- slot: 'isOverbudget'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'speedPercent',
|
|
|
- label: '项目进度',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 150,
|
|
|
- slot: 'speedPercent'
|
|
|
- },
|
|
|
- {
|
|
|
- columnKey: 'action',
|
|
|
- label: '操作',
|
|
|
- width: 280,
|
|
|
- align: 'center',
|
|
|
- resizable: false,
|
|
|
- slot: 'action',
|
|
|
- fixed: 'right'
|
|
|
+ {
|
|
|
+ prop: 'responsibleDeptName',
|
|
|
+ label: '负责部门',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'responsibleUserName',
|
|
|
+ label: '项目经理',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'teamName',
|
|
|
+ label: '项目团队',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'cycle',
|
|
|
+ label: '项目周期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'budget',
|
|
|
+ label: '项目预算',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110,
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return cellValue
|
|
|
+ ? cellValue + this.getDictV('pro_projects_budget_unit', _row.unit)
|
|
|
+ : '';
|
|
|
}
|
|
|
- ];
|
|
|
- }
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- projectsFinishAPI: projectsFinishAPI,
|
|
|
- projectsPauseAPI: projectsPauseAPI,
|
|
|
- projectsStartupAPI: projectsStartupAPI,
|
|
|
- projectsTerminationAPI: projectsTerminationAPI,
|
|
|
- parentId:'',
|
|
|
- selection: [],
|
|
|
- dictList: [],
|
|
|
- // 表格列配置
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'planStartDate',
|
|
|
+ label: '计划开始日期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'planEndDate',
|
|
|
+ label: '计划完成日期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'realStartTime',
|
|
|
+ label: '实际开始日期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'realEndTime',
|
|
|
+ label: '实际完成日期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'cost',
|
|
|
+ label: '费用(元)',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ label: '项目状态',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100,
|
|
|
+ slot: 'status'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'processStatus',
|
|
|
+ label: '审核状态',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100,
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return reviewStatusEnum[_row.processStatus].label;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'isOverTime',
|
|
|
+ label: '是否超时',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100,
|
|
|
+ slot: 'isOverTime'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'isOverbudget',
|
|
|
+ label: '是否超预算',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100,
|
|
|
+ slot: 'isOverbudget'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'speedPercent',
|
|
|
+ label: '项目进度',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 150,
|
|
|
+ slot: 'speedPercent'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 280,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ fixed: 'right'
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ projectsFinishAPI: projectsFinishAPI,
|
|
|
+ projectsPauseAPI: projectsPauseAPI,
|
|
|
+ projectsStartupAPI: projectsStartupAPI,
|
|
|
+ projectsTerminationAPI: projectsTerminationAPI,
|
|
|
+ parentId: '',
|
|
|
+ selection: [],
|
|
|
+ dictList: [],
|
|
|
+ // 表格列配置
|
|
|
|
|
|
- // 是否显示编辑弹窗
|
|
|
- addOrEditDialogFlag: false,
|
|
|
- detailDialogFlag: false,
|
|
|
- processSubmitDialogFlag: false,
|
|
|
- delVisible: false,
|
|
|
- addPlanDialogFLag: false,
|
|
|
- // 全部菜单数据
|
|
|
- menuList: [],
|
|
|
- // 展开折叠
|
|
|
- expandAllFlag: false
|
|
|
- };
|
|
|
+ // 是否显示编辑弹窗
|
|
|
+ addOrEditDialogFlag: false,
|
|
|
+ detailDialogFlag: false,
|
|
|
+ processSubmitDialogFlag: false,
|
|
|
+ delVisible: false,
|
|
|
+ addPlanDialogFLag: false,
|
|
|
+ // 全部菜单数据
|
|
|
+ menuList: [],
|
|
|
+ // 展开折叠
|
|
|
+ expandAllFlag: false
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ console.log(111);
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ $route() {
|
|
|
+ this.reload && this.reload();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getDictV(code, val) {
|
|
|
+ if (!this.dictList[code]) return '';
|
|
|
+ return this.dictList[code].find((item) => item.value == val)?.label;
|
|
|
},
|
|
|
- async created() {
|
|
|
- console.log(111);
|
|
|
+ async getDictList(code) {
|
|
|
+ let { data: res } = await getByCode(code);
|
|
|
+ this.dictList[code] = res.map((item) => {
|
|
|
+ let values = Object.keys(item);
|
|
|
+ return {
|
|
|
+ value: values[0],
|
|
|
+ label: item[values[0]]
|
|
|
+ };
|
|
|
+ });
|
|
|
},
|
|
|
- watch: {
|
|
|
- $route() {
|
|
|
- this.reload && this.reload();
|
|
|
+ handelBOMConstructDetail(row, type = '') {
|
|
|
+ // this.$router.push({
|
|
|
+ // path: '/BOMmanage/details',
|
|
|
+ // query: {
|
|
|
+ // id: row.id,
|
|
|
+ // type
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ localStorage.setItem('projectId', row.id);
|
|
|
+ this.$refs.ProjectDetailDialogFlag.open(row, type);
|
|
|
+ },
|
|
|
+ customColorMethod(percentage) {
|
|
|
+ if (percentage < 30) {
|
|
|
+ return '#909399';
|
|
|
+ } else if (percentage < 70) {
|
|
|
+ return '#e6a23c';
|
|
|
+ } else {
|
|
|
+ return '#67c23a';
|
|
|
}
|
|
|
},
|
|
|
- methods: {
|
|
|
- getDictV(code, val) {
|
|
|
- if (!this.dictList[code]) return '';
|
|
|
- return this.dictList[code].find((item) => item.value == val)?.label;
|
|
|
- },
|
|
|
- async getDictList(code) {
|
|
|
- let { data: res } = await getByCode(code);
|
|
|
- this.dictList[code] = res.map((item) => {
|
|
|
- let values = Object.keys(item);
|
|
|
- return {
|
|
|
- value: values[0],
|
|
|
- label: item[values[0]]
|
|
|
- };
|
|
|
- });
|
|
|
- },
|
|
|
- handelBOMConstructDetail(row, type = '') {
|
|
|
- // this.$router.push({
|
|
|
- // path: '/BOMmanage/details',
|
|
|
- // query: {
|
|
|
- // id: row.id,
|
|
|
- // type
|
|
|
- // }
|
|
|
- // });
|
|
|
- this.$refs.ProjectDetailDialogFlag.open(row, type);
|
|
|
- },
|
|
|
- customColorMethod(percentage) {
|
|
|
- if (percentage < 30) {
|
|
|
- return '#909399';
|
|
|
- } else if (percentage < 70) {
|
|
|
- return '#e6a23c';
|
|
|
- } else {
|
|
|
- return '#67c23a';
|
|
|
- }
|
|
|
- },
|
|
|
- /* 表格数据源 */
|
|
|
- async datasource({ page, limit, where, parent }) {
|
|
|
- await this.getDictList('pro_projects_status');
|
|
|
- await this.getDictList('pro_projects_type');
|
|
|
- await this.getDictList('pro_projects_budget_unit');
|
|
|
- // /project-manage/myProject
|
|
|
- const api =
|
|
|
- this.$route.path == '/project-manage/myProject'
|
|
|
- ? getMyProjectsPage
|
|
|
- : projectsPageAPI;
|
|
|
- return api({
|
|
|
- pageNum: page,
|
|
|
- size: limit,
|
|
|
- parentId: parent?.id ?? '0',
|
|
|
- // parentId:this.parentId,
|
|
|
- ...where,
|
|
|
- type: this.treeId
|
|
|
- });
|
|
|
- },
|
|
|
- onDone(row) {
|
|
|
- console.log(row);
|
|
|
- },
|
|
|
- /* 刷新表格 */
|
|
|
- reload(where) {
|
|
|
- this.$refs.table.reload({ where, size: 1, pageNum: 10, parentId: '0' });
|
|
|
- this.$refs.table.reRenderTable();
|
|
|
- },
|
|
|
- handleNodeClick(data, node) {
|
|
|
- this.parentId=data.parentId
|
|
|
- this.treeId = data.id;
|
|
|
- this.reload();
|
|
|
- },
|
|
|
- /* 显示编辑 */
|
|
|
- openEdit(row = {}, type) {
|
|
|
- this.addOrEditDialogFlag = true;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.addOrEditDialogRef.init(row, type);
|
|
|
- });
|
|
|
- },
|
|
|
- openDetail(row = {}) {
|
|
|
- this.detailDialogFlag = true;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.detailDialogRef.init(row);
|
|
|
- });
|
|
|
- },
|
|
|
- handleAddPlan(row) {
|
|
|
- console.log(row);
|
|
|
- this.addPlanDialogFLag = true;
|
|
|
- this.$nextTick(() => {
|
|
|
- row.projectId = row.id;
|
|
|
- this.$refs.addPlanDialogRef.init(row, 'add');
|
|
|
- });
|
|
|
- },
|
|
|
- async handleStatus(API, msg, row) {
|
|
|
- let message = '确定' + msg + '该项目吗';
|
|
|
- this.$confirm(message, '提示', {
|
|
|
- type: 'warning'
|
|
|
+ /* 表格数据源 */
|
|
|
+ async datasource({ page, limit, where, parent }) {
|
|
|
+ await this.getDictList('pro_projects_status');
|
|
|
+ await this.getDictList('pro_projects_type');
|
|
|
+ await this.getDictList('pro_projects_budget_unit');
|
|
|
+ // /project-manage/myProject
|
|
|
+ const api =
|
|
|
+ this.$route.path == '/project-manage/myProject'
|
|
|
+ ? getMyProjectsPage
|
|
|
+ : projectsPageAPI;
|
|
|
+ return api({
|
|
|
+ pageNum: page,
|
|
|
+ size: limit,
|
|
|
+ parentId: parent?.id ?? '0',
|
|
|
+ // parentId:this.parentId,
|
|
|
+ ...where,
|
|
|
+ type: this.treeId
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onDone(row) {
|
|
|
+ console.log(row);
|
|
|
+ },
|
|
|
+ /* 刷新表格 */
|
|
|
+ reload(where) {
|
|
|
+ this.$refs.table.reload({ where, size: 1, pageNum: 10, parentId: '0' });
|
|
|
+ this.$refs.table.reRenderTable();
|
|
|
+ },
|
|
|
+ handleNodeClick(data, node) {
|
|
|
+ this.parentId = data.parentId;
|
|
|
+ this.treeId = data.id;
|
|
|
+ this.reload();
|
|
|
+ },
|
|
|
+ /* 显示编辑 */
|
|
|
+ openEdit(row = {}, type) {
|
|
|
+ this.addOrEditDialogFlag = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.addOrEditDialogRef.init(row, type);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ openDetail(row = {}) {
|
|
|
+ this.detailDialogFlag = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.detailDialogRef.init(row);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleAddPlan(row) {
|
|
|
+ console.log(row);
|
|
|
+ this.addPlanDialogFLag = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ row.projectId = row.id;
|
|
|
+ this.$refs.addPlanDialogRef.init(row, 'add');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async handleStatus(API, msg, row) {
|
|
|
+ let message = '确定' + msg + '该项目吗';
|
|
|
+ this.$confirm(message, '提示', {
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ await API(row.id);
|
|
|
+ this.$message.success('操作成功');
|
|
|
+ this.reload();
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ //流程提交
|
|
|
+ processSubmit(row) {
|
|
|
+ this.processSubmitDialogFlag = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ let params = {
|
|
|
+ businessId: row.id,
|
|
|
+ businessKey: 'pro_project_approve',
|
|
|
+ formCreateUserId: row.createUserId
|
|
|
+ };
|
|
|
+ this.$refs.processSubmitDialogRef.init(params);
|
|
|
+ });
|
|
|
+ // submit({
|
|
|
+ // projectId: row.id
|
|
|
+ // }).then((res) => {
|
|
|
+ // this.$message.success('提交成功');
|
|
|
+ // this.reload();
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ //批量删除
|
|
|
+ allDelBtn() {
|
|
|
+ if (this.selection.length === 0) return;
|
|
|
+ let flag = this.selection.some((item) =>
|
|
|
+ [1, 2].includes(item.processStatus)
|
|
|
+ );
|
|
|
+ if (flag)
|
|
|
+ return this.$message.warning('抱歉已审核、审核中的数据不能删除,请检查');
|
|
|
+ this.delVisible = true;
|
|
|
+ },
|
|
|
+ //删除弹框确定
|
|
|
+ commitBtn() {
|
|
|
+ const dataId = this.selection.map((v) => v.id);
|
|
|
+ this.remove(dataId);
|
|
|
+ },
|
|
|
+ /* 删除 */
|
|
|
+ remove(ids) {
|
|
|
+ const loading = this.$loading({ lock: true });
|
|
|
+ projectsDeleteAPI(ids)
|
|
|
+ .then((res) => {
|
|
|
+ loading.close();
|
|
|
+ this.$message.success('删除成功');
|
|
|
+ this.reload();
|
|
|
})
|
|
|
- .then(async () => {
|
|
|
- await API(row.id);
|
|
|
- this.$message.success('操作成功');
|
|
|
- this.reload();
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- },
|
|
|
- //流程提交
|
|
|
- processSubmit(row) {
|
|
|
- this.processSubmitDialogFlag = true;
|
|
|
- this.$nextTick(() => {
|
|
|
- let params = {
|
|
|
- businessId: row.id,
|
|
|
- businessKey: 'pro_project_approve',
|
|
|
- formCreateUserId: row.createUserId
|
|
|
- };
|
|
|
- this.$refs.processSubmitDialogRef.init(params);
|
|
|
+ .catch((e) => {
|
|
|
+ loading.close();
|
|
|
+ // this.$message.error(e.message);
|
|
|
});
|
|
|
- // submit({
|
|
|
- // projectId: row.id
|
|
|
- // }).then((res) => {
|
|
|
- // this.$message.success('提交成功');
|
|
|
- // this.reload();
|
|
|
- // });
|
|
|
- },
|
|
|
- //批量删除
|
|
|
- allDelBtn() {
|
|
|
- if (this.selection.length === 0) return;
|
|
|
- let flag = this.selection.some((item) =>
|
|
|
- [1, 2].includes(item.processStatus)
|
|
|
- );
|
|
|
- if (flag)
|
|
|
- return this.$message.warning(
|
|
|
- '抱歉已审核、审核中的数据不能删除,请检查'
|
|
|
- );
|
|
|
- this.delVisible = true;
|
|
|
- },
|
|
|
- //删除弹框确定
|
|
|
- commitBtn() {
|
|
|
- const dataId = this.selection.map((v) => v.id);
|
|
|
- this.remove(dataId);
|
|
|
- },
|
|
|
- /* 删除 */
|
|
|
- remove(ids) {
|
|
|
- const loading = this.$loading({ lock: true });
|
|
|
- projectsDeleteAPI(ids)
|
|
|
- .then((res) => {
|
|
|
- loading.close();
|
|
|
- this.$message.success('删除成功');
|
|
|
- this.reload();
|
|
|
- })
|
|
|
- .catch((e) => {
|
|
|
- loading.close();
|
|
|
- // this.$message.error(e.message);
|
|
|
- });
|
|
|
- },
|
|
|
- /* 展开/折叠全部 */
|
|
|
- expandAll() {
|
|
|
- this.expandAllFlag = !this.expandAllFlag;
|
|
|
- this.$refs.table.toggleRowExpansionAll(this.expandAllFlag);
|
|
|
- }
|
|
|
+ },
|
|
|
+ /* 展开/折叠全部 */
|
|
|
+ expandAll() {
|
|
|
+ this.expandAllFlag = !this.expandAllFlag;
|
|
|
+ this.$refs.table.toggleRowExpansionAll(this.expandAllFlag);
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
- :deep(.el-link--inner) {
|
|
|
- margin-left: 0px !important;
|
|
|
- }
|
|
|
- ::v-deep .el-dropdown-link {
|
|
|
- cursor: pointer;
|
|
|
- color: #188ffd;
|
|
|
- }
|
|
|
- ::v-deep .el-dropdown-menu__item {
|
|
|
- .el-link {
|
|
|
- width: 100%;
|
|
|
- display: flex;
|
|
|
- flex: 1;
|
|
|
- justify-content: flex-start;
|
|
|
- }
|
|
|
- }
|
|
|
- .sys-organization-list {
|
|
|
- height: calc(100vh - 230px);
|
|
|
- box-sizing: border-box;
|
|
|
- border-width: 1px;
|
|
|
- border-style: solid;
|
|
|
- overflow: auto;
|
|
|
+:deep(.el-link--inner) {
|
|
|
+ margin-left: 0px !important;
|
|
|
+}
|
|
|
+::v-deep .el-dropdown-link {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #188ffd;
|
|
|
+}
|
|
|
+::v-deep .el-dropdown-menu__item {
|
|
|
+ .el-link {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex: 1;
|
|
|
+ justify-content: flex-start;
|
|
|
}
|
|
|
+}
|
|
|
+.sys-organization-list {
|
|
|
+ height: calc(100vh - 230px);
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-width: 1px;
|
|
|
+ border-style: solid;
|
|
|
+ overflow: auto;
|
|
|
+}
|
|
|
|
|
|
- .sys-organization-list :deep(.el-tree-node__content) {
|
|
|
- height: 40px;
|
|
|
+.sys-organization-list :deep(.el-tree-node__content) {
|
|
|
+ height: 40px;
|
|
|
|
|
|
- & > .el-tree-node__expand-icon {
|
|
|
- margin-left: 10px;
|
|
|
- }
|
|
|
+ & > .el-tree-node__expand-icon {
|
|
|
+ margin-left: 10px;
|
|
|
}
|
|
|
+}
|
|
|
</style>
|