style: 格式化代码

This commit is contained in:
zyn
2024-01-18 16:33:51 +08:00
parent 68a7b38731
commit 954af18ed1
5 changed files with 2427 additions and 1791 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -6,12 +6,12 @@
</ProcessHeader> </ProcessHeader>
<div class="headerTabs"> <div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div> <div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" v-if="approvalFlag" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div> <div v-if="approvalFlag" class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
<div class="headerTabsItem" v-else :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">人员信息</div> <div v-else class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">人员信息</div>
</div> </div>
<div class="content" v-show="active === '1'"> <div v-show="active === '1'" class="content">
<div style="flex: auto; overflow: auto"> <div style="flex: auto; overflow: auto">
<!-- <process-title v-if="showFlag">--> <!-- <process-title v-if="showFlag">-->
<process-title> <process-title>
<template slot="title">基础信息</template> <template slot="title">基础信息</template>
</process-title> </process-title>
@@ -22,23 +22,58 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="调整类型" class="add-form-item form-item-disabled"> <el-form-item label="调整类型" class="add-form-item form-item-disabled">
<el-button :disabled="disabledXX" size="small" type="primary" style="margin: 10px;" @click="toggleComName('establish')">立项 <el-button
:disabled="disabledXX"
size="small"
type="primary"
style="margin: 10px;"
@click="toggleComName('establish')"
>
立项
</el-button> </el-button>
<el-button :disabled="disabledXX" size="small" type="primary" style="margin: 10px;" @click="toggleComName('merge')">合并 <el-button
:disabled="disabledXX"
size="small"
type="primary"
style="margin: 10px;"
@click="toggleComName('merge')"
>
合并
</el-button> </el-button>
<el-button :disabled="disabledXX" size="small" type="primary" style="margin: 10px;" @click="toggleComName('delay')">延期 <el-button
:disabled="disabledXX"
size="small"
type="primary"
style="margin: 10px;"
@click="toggleComName('delay')"
>
延期
</el-button> </el-button>
<el-button :disabled="disabledXX" size="small" type="primary" style="margin: 10px;" @click="toggleComName('cancel')">取消 <el-button
:disabled="disabledXX"
size="small"
type="primary"
style="margin: 10px;"
@click="toggleComName('cancel')"
>
取消
</el-button> </el-button>
<el-button :disabled="disabledXX" size="small" type="primary" style="margin: 10px;" @click="toggleComName('rename')">更名 <el-button
:disabled="disabledXX"
size="small"
type="primary"
style="margin: 10px;"
@click="toggleComName('rename')"
>
更名
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<component ref="childForm" v-if="isWrite" :message="qbfsForm" :is="comName"></component> <component :is="comName" v-if="isWrite" ref="childForm" :message="qbfsForm" />
<component ref="childForm" v-else :message="JSON.parse(JSON.stringify(qbfsForm))" :is="comName"></component> <component :is="comName" v-else ref="childForm" :message="JSON.parse(JSON.stringify(qbfsForm))" />
<ReceiptDescription v-model="commentText"></ReceiptDescription> <ReceiptDescription v-model="commentText" />
</div> </div>
<!--<div>--> <!--<div>-->
<!-- <el-collapse accordion>--> <!-- <el-collapse accordion>-->
@@ -57,7 +92,7 @@
<!--</div>--> <!--</div>-->
</div> </div>
<loading :loading="formLoading">数据加载中...</loading> <loading :loading="formLoading">数据加载中...</loading>
<div class="content" v-show="active === '2'"> <div v-show="active === '2'" class="content">
<div class="block" style="padding-top: 20px;"> <div class="block" style="padding-top: 20px;">
<el-timeline> <el-timeline>
<el-form <el-form
@@ -65,35 +100,50 @@
:roleMessage="roleForm" :roleMessage="roleForm"
:model="roleForm" :model="roleForm"
:rules="roleFormRules" :rules="roleFormRules"
class="label-input-form"> class="label-input-form"
>
<el-timeline-item timestamp="起草" placement="top" :color="roleForm.prcCreateUser ? '#66b1ff' : ''"> <el-timeline-item timestamp="起草" placement="top" :color="roleForm.prcCreateUser ? '#66b1ff' : ''">
<el-card> <el-card>
<el-form-item prop="prcCreateUserName" style="margin-bottom: 0"> <el-form-item prop="prcCreateUserName" style="margin-bottom: 0">
<h4>标准立项申请人</h4> <h4>标准立项申请人</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.prcCreateUser" style="display: none;"></el-input> <el-input v-model="roleForm.prcCreateUser" :disabled="disabledXX" style="display: none;" />
<el-input :disabled="disabledXX" v-model="roleForm.prcCreateUserName" placeholder="标准立项申请人" <el-input
disabled></el-input> v-model="roleForm.prcCreateUserName"
:disabled="disabledXX"
placeholder="标准立项申请人"
disabled
/>
</div> </div>
</el-form-item> </el-form-item>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
<el-timeline-item timestamp="审核" placement="top" <el-timeline-item
:color="roleForm.dockUser ? '#66b1ff' : ''"> timestamp="审核"
placement="top"
:color="roleForm.dockUser ? '#66b1ff' : ''"
>
<el-card> <el-card>
<el-form-item prop="dockUserName" style="margin-bottom: 0"> <el-form-item prop="dockUserName" style="margin-bottom: 0">
<h4>标准立项单位整车/系统总工</h4> <h4>标准立项单位整车/系统总工</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.dockUser" style="display: none;"></el-input> <el-input v-model="roleForm.dockUser" :disabled="disabledXX" style="display: none;" />
<el-input :disabled="disabledXX" v-model="roleForm.dockUserName" readonly placeholder="选择标准立项单位整车/系统总工" <el-input
@click.native="choiceZRR('dockUser', '选择标准立项单位整车/系统总工', roleForm.dockUser)"> v-model="roleForm.dockUserName"
</el-input> :disabled="disabledXX"
readonly
placeholder="选择标准立项单位整车/系统总工"
@click.native="choiceZRR('dockUser', '选择标准立项单位整车/系统总工', roleForm.dockUser)"
/>
</div> </div>
</el-form-item> </el-form-item>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
<el-timeline-item timestamp="会签" placement="top" <el-timeline-item
:color="roleForm.countersigner ? '#66b1ff' : ''"> timestamp="会签"
placement="top"
:color="roleForm.countersigner ? '#66b1ff' : ''"
>
<el-card> <el-card>
<el-form-item prop="countersignerName" style="margin-bottom: 0"> <el-form-item prop="countersignerName" style="margin-bottom: 0">
<h4>创新技术委员会成员/标准体系工作组成员(必选)</h4> <h4>创新技术委员会成员/标准体系工作组成员(必选)</h4>
@@ -103,65 +153,83 @@
<h4>采购部相关人员(可选)</h4> <h4>采购部相关人员(可选)</h4>
<h4>海外相关人员(可选)</h4> <h4>海外相关人员(可选)</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.countersigner" style="display: none;"></el-input> <el-input v-model="roleForm.countersigner" :disabled="disabledXX" style="display: none;" />
<el-input :disabled="disabledXX" v-model="roleForm.countersignerName" readonly placeholder="选择会签人员" <el-input
@click.native="choiceZRRS"> v-model="roleForm.countersignerName"
</el-input> :disabled="disabledXX"
readonly
placeholder="选择会签人员"
@click.native="choiceZRRS"
/>
</div> </div>
</el-form-item> </el-form-item>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
<el-timeline-item timestamp="审定" placement="top" <el-timeline-item
:color="roleForm.examine ? '#66b1ff' : ''"> timestamp="审定"
placement="top"
:color="roleForm.examine ? '#66b1ff' : ''"
>
<el-card> <el-card>
<el-form-item prop="examineName" style="margin-bottom: 0"> <el-form-item prop="examineName" style="margin-bottom: 0">
<h4>标准体系工作组组长</h4> <h4>标准体系工作组组长</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.examine" style="display: none;"></el-input> <el-input v-model="roleForm.examine" :disabled="disabledXX" style="display: none;" />
<el-input :disabled="disabledXX" v-model="roleForm.examineName" readonly placeholder="选择标准体系工作组组长" <el-input
@click.native="choiceZRR('examine', '选择标准体系工作组组长', roleForm.examine)"> v-model="roleForm.examineName"
</el-input> :disabled="disabledXX"
readonly
placeholder="选择标准体系工作组组长"
@click.native="choiceZRR('examine', '选择标准体系工作组组长', roleForm.examine)"
/>
</div> </div>
</el-form-item> </el-form-item>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
<el-timeline-item timestamp="批准" placement="top" <el-timeline-item
:color="roleForm.approver ? '#66b1ff' : ''"> timestamp="批准"
placement="top"
:color="roleForm.approver ? '#66b1ff' : ''"
>
<el-card> <el-card>
<el-form-item prop="approverName" style="margin-bottom: 0"> <el-form-item prop="approverName" style="margin-bottom: 0">
<h4>标准法规部高级经理</h4> <h4>标准法规部高级经理</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.approver" style="display: none;"></el-input> <el-input v-model="roleForm.approver" :disabled="disabledXX" style="display: none;" />
<el-input :disabled="disabledXX" v-model="roleForm.approverName" readonly placeholder="选择标准法规部高级经理" <el-input
@click.native="choiceZRR('approver', '选择标准法规部高级经理', roleForm.approver)"> v-model="roleForm.approverName"
</el-input> :disabled="disabledXX"
readonly
placeholder="选择标准法规部高级经理"
@click.native="choiceZRR('approver', '选择标准法规部高级经理', roleForm.approver)"
/>
</div> </div>
</el-form-item> </el-form-item>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
<!-- <el-timeline-item timestamp="抄送" placement="top"--> <!-- <el-timeline-item timestamp="抄送" placement="top"-->
<!-- :color="roleForm.engineer ? '#66b1ff' : ''">--> <!-- :color="roleForm.engineer ? '#66b1ff' : ''">-->
<!-- <el-card>--> <!-- <el-card>-->
<!-- <el-form-item prop="engineerName" style="margin-bottom: 0">--> <!-- <el-form-item prop="engineerName" style="margin-bottom: 0">-->
<!-- <h4>相关单位、工程研究总院标准法规部</h4>--> <!-- <h4>相关单位、工程研究总院标准法规部</h4>-->
<!-- <div style="margin-top: 10px;width: 300px;">--> <!-- <div style="margin-top: 10px;width: 300px;">-->
<!-- <el-input :disabled="disabledXX" v-model="roleForm.engineer" style="display: none;"></el-input>--> <!-- <el-input :disabled="disabledXX" v-model="roleForm.engineer" style="display: none;"></el-input>-->
<!-- <el-input :disabled="disabledXX" v-model="roleForm.engineerName" readonly placeholder="选择相关单位、工程研究总院标准法规部"--> <!-- <el-input :disabled="disabledXX" v-model="roleForm.engineerName" readonly placeholder="选择相关单位、工程研究总院标准法规部"-->
<!-- @click.native="choiceZRR('engineer', '选择相关单位、工程研究总院标准法规部', roleForm.engineer)">--> <!-- @click.native="choiceZRR('engineer', '选择相关单位、工程研究总院标准法规部', roleForm.engineer)">-->
<!-- </el-input>--> <!-- </el-input>-->
<!-- </div>--> <!-- </div>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-card>--> <!-- </el-card>-->
<!-- </el-timeline-item>--> <!-- </el-timeline-item>-->
</el-form> </el-form>
</el-timeline> </el-timeline>
</div> </div>
</div> </div>
<div class="content" v-show="active === '3'"> <div v-show="active === '3'" class="content">
<div class="flow-list" style="height: 100%"> <div class="flow-list" style="height: 100%">
<el-table <el-table
height="100%"
ref="selection" ref="selection"
height="100%"
:data="detailData" :data="detailData"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
@@ -172,30 +240,29 @@
<el-table-column <el-table-column
type="selection" type="selection"
width="55" width="55"
align="center"> align="center"
</el-table-column> />
<el-table-column <el-table-column
type="index" type="index"
width="55" width="55"
label="序号" label="序号"
align="center"> align="center"
</el-table-column> />
<el-table-column <el-table-column
prop="name" prop="name"
label="任务步骤" label="任务步骤"
align="center" align="center"
> />
</el-table-column>
<el-table-column <el-table-column
prop="assignee" prop="assignee"
label="任务受理人" label="任务受理人"
align="center" align="center"
> />
</el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="createTime"
label="创建时间" label="创建时间"
align="center"> align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD") : "" }}</span> <span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD") : "" }}</span>
</template> </template>
@@ -203,7 +270,8 @@
<el-table-column <el-table-column
prop="endTime" prop="endTime"
label="完成时间" label="完成时间"
align="center"> align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format("YYYY-MM-DD") : "" }}</span> <span>{{ scope.row.endTime ? $moment(scope.row.endTime).format("YYYY-MM-DD") : "" }}</span>
</template> </template>
@@ -211,7 +279,8 @@
<el-table-column <el-table-column
prop="comment" prop="comment"
label="流程信息" label="流程信息"
align="center"> align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.commentText }}</span> <span>{{ scope.row.commentText }}</span>
</template> </template>
@@ -219,7 +288,8 @@
<el-table-column <el-table-column
prop="completeFlag" prop="completeFlag"
label="状态" label="状态"
align="center"> align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.endTime ? '已完成' : scope.row.receiveStatus ? '已接收' : '未完成' }}</span> <span>{{ scope.row.endTime ? '已完成' : scope.row.receiveStatus ? '已接收' : '未完成' }}</span>
</template> </template>
@@ -229,48 +299,50 @@
</div> </div>
</div> </div>
<ProcessFooter v-show="!disabledXX" <ProcessFooter
v-show="!disabledXX"
show-save show-save
show-submit show-submit
:submitLoading="isSubmit" :submitLoading="isSubmit"
:saveLoading="saveLoading" :saveLoading="saveLoading"
@save="handleSave" @save="handleSave"
@submit="handleSubmit" @submit="handleSubmit"
> />
</ProcessFooter>
<!-- 多选择责任人--> <!-- 多选择责任人-->
<Role-tree v-if="!disabledXX" <Role-tree
v-if="!disabledXX"
is-title="选择责任部门对接人" is-title="选择责任部门对接人"
:is-visible.sync="modalshowflag2" :is-visible.sync="modalshowflag2"
@checkedRole="checkedRole2"
:nodeList="nodeList2" :nodeList="nodeList2"
></Role-tree> @checkedRole="checkedRole2"
/>
<!-- 单选人--> <!-- 单选人-->
<Role-tree v-if="!disabledXX" <Role-tree
v-if="!disabledXX"
check-box check-box
:is-title="drawerTitle" :is-title="drawerTitle"
:is-visible.sync="modalshowflag" :is-visible.sync="modalshowflag"
@checkedRole="checkedRole"
:nodeList="nodeList" :nodeList="nodeList"
></Role-tree> @checkedRole="checkedRole"
/>
</div> </div>
</template> </template>
<script> <script>
import ProcessHeader from "../../components/ProcessHeader"; import ProcessHeader from '../../components/ProcessHeader';
import ProcessFooter from "../../components/ProcessFooter"; import ProcessFooter from '../../components/ProcessFooter';
import ProcessTitle from "../../components/ProcessTitle"; import ProcessTitle from '../../components/ProcessTitle';
import merge from "process/creatProcess/qbzxdjhgk/component/merge"; import merge from 'process/creatProcess/qbzxdjhgk/component/merge';
import rename from "process/creatProcess/qbzxdjhgk/component/rename"; import rename from 'process/creatProcess/qbzxdjhgk/component/rename';
import establish from "process/creatProcess/qbzxdjhgk/component/establish"; import establish from 'process/creatProcess/qbzxdjhgk/component/establish';
import delay from "process/creatProcess/qbzxdjhgk/component/delay"; import delay from 'process/creatProcess/qbzxdjhgk/component/delay';
import cancel from "process/creatProcess/qbzxdjhgk/component/cancel"; import cancel from 'process/creatProcess/qbzxdjhgk/component/cancel';
import ReceiptDescription from '@/components/hzwlComponents/ReceiptDescription' import ReceiptDescription from '@/components/hzwlComponents/ReceiptDescription'
import axios from "axios"; import axios from 'axios';
import { saveTaskFirst, queryTaskFirst, inboundLiaisonDetail, taskDel, saveTaskForPub } from "api/process"; import { saveTaskFirst, queryTaskFirst, inboundLiaisonDetail, taskDel, saveTaskForPub } from 'api/process';
export default { export default {
name: "qbzxdjhgkStep1", name: 'QbzxdjhgkStep1',
components: { components: {
ProcessHeader, ProcessHeader,
ProcessFooter, ProcessFooter,
@@ -282,25 +354,25 @@ export default {
delay, delay,
cancel cancel
}, },
data() { data () {
return { return {
isWrite:!this.$route.query.taskIds, isWrite: !this.$route.query.taskIds,
disabledXX:!!this.$route.query.disabledXX, disabledXX: !!this.$route.query.disabledXX,
submitFlag: '', submitFlag: '',
toggleType: '5', toggleType: '5',
comFlag: 1, comFlag: 1,
active: "1", active: '1',
commentText: "", commentText: '',
comName: "establish", comName: 'establish',
isTrue:true, isTrue: true,
qbfsForm: {}, qbfsForm: {},
componentKey:1, componentKey: 1,
formLoading: false, formLoading: false,
approvalFlag: false, approvalFlag: false,
showFlag: true, showFlag: true,
taskIds: '', taskIds: '',
bpnId: '', bpnId: '',
drawerTitle: "", drawerTitle: '',
nodeList: [], nodeList: [],
nodeList2: [], nodeList2: [],
detailData: [], detailData: [],
@@ -312,75 +384,75 @@ export default {
roleForm: { roleForm: {
prcCreateUserName: this.$store.getters.userInfo.userName, prcCreateUserName: this.$store.getters.userInfo.userName,
prcCreateUser: this.$store.getters.userInfo.userId, prcCreateUser: this.$store.getters.userInfo.userId,
dockUser: "", dockUser: '',
dockUserName: "", dockUserName: '',
countersigner: "", countersigner: '',
countersignerName: "", countersignerName: '',
approver: "", approver: '',
approverName: "", approverName: '',
engineer: "", engineer: '',
engineerName: "", engineerName: '',
examine: "", examine: '',
examineName: "" examineName: ''
}, },
//必填人员校验规则 // 必填人员校验规则
roleFormRules: { roleFormRules: {
dockUserName: [ dockUserName: [
{ required: true, message: "请选择标准立项单位整车/系统总工", trigger: "change" } { required: true, message: '请选择标准立项单位整车/系统总工', trigger: 'change' }
], ],
countersignerName:[ countersignerName: [
{required: true, message:'请选择会签人员', trigger: "change" } { required: true, message: '请选择会签人员', trigger: 'change' }
], ],
examineName:[ examineName: [
{required: true, message:'请选择标准体系工作组组长', trigger: "change" } { required: true, message: '请选择标准体系工作组组长', trigger: 'change' }
], ],
approverName:[ approverName: [
{required: true, message:'请选择总院技术委员会覆盖领域企业标准:专委会主任/总院技术委员会未覆盖领域企业标准:总院院长或总院主管副院长', trigger: "change" } { required: true, message: '请选择总院技术委员会覆盖领域企业标准:专委会主任/总院技术委员会未覆盖领域企业标准:总院院长或总院主管副院长', trigger: 'change' }
], ],
engineerName:[ engineerName: [
{required: true, message:'请选择相关单位、工程研究总院标准法规部', trigger: "change" } { required: true, message: '请选择相关单位、工程研究总院标准法规部', trigger: 'change' }
], ],
} }
}; };
}, },
mounted() { mounted () {
this.taskIds = this.$route.query.taskIds this.taskIds = this.$route.query.taskIds
this.bpnId = this.$route.query.bpnId this.bpnId = this.$route.query.bpnId
if (this.bpnId !== undefined) { if (this.bpnId !== undefined) {
this.getData() this.getData()
} }
if(this.taskIds){ if(this.taskIds) {
this.approvalFlag = true this.approvalFlag = true
this.processTable() this.processTable()
//被驳回时调用 // 被驳回时调用
this.getHistoryData() this.getHistoryData()
} }
}, },
methods: { methods: {
processTable() { processTable () {
this.$http.get("lawss/activiti/get_list_by_instance", { this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum, prcNum: this.$route.query.prcNum,
sortWord: this.shunxu ? this.paixu : "", sortWord: this.shunxu ? this.paixu : '',
shunxu: this.shunxu shunxu: this.shunxu
}, { }, {
loading: "loading", loading: 'loading',
_this: this _this: this
}, res => { }, res => {
this.detailData = res this.detailData = res
}, e => { }, e => {
}) })
}, },
getData() { getData () {
this.formLoading = true this.formLoading = true
this.showFlag = false this.showFlag = false
queryTaskFirst({ queryTaskFirst({
bpnId: this.$route.query.bpnId bpnId: this.$route.query.bpnId
}).then(res => { }).then(res => {
let mes = JSON.parse(res.mes) const mes = JSON.parse(res.mes)
this.getFormFieldList(mes); this.getFormFieldList(mes);
}); });
}, },
getHistoryData() { getHistoryData () {
this.submitFlag = '重新起草' this.submitFlag = '重新起草'
this.showFlag = false this.showFlag = false
this.formLoading = true this.formLoading = true
@@ -397,52 +469,52 @@ export default {
}) })
}) })
}, },
deepClone(orig) { deepClone (orig) {
var copy = Object.create(Object.getPrototypeOf(orig)) const copy = Object.create(Object.getPrototypeOf(orig))
this.copyOwnPropertiesFrom(copy,orig); this.copyOwnPropertiesFrom(copy, orig);
return copy; return copy;
}, },
copyOwnPropertiesFrom(target, source) { copyOwnPropertiesFrom (target, source) {
Object.getOwnPropertyNames(source) Object.getOwnPropertyNames(source)
.forEach(ele =>{ .forEach(ele => {
// 获取到每个属性的所有描述,然后重新定义对象的属性并返回此对象。 // 获取到每个属性的所有描述,然后重新定义对象的属性并返回此对象。
var desc = Object.getOwnPropertyDescriptor(source,ele); const desc = Object.getOwnPropertyDescriptor(source, ele);
Object.defineProperty(target,ele,desc) Object.defineProperty(target, ele, desc)
}); });
return target; return target;
}, },
getType(target){ getType (target) {
return Object.prototype.toString.call(target).toLowerCase().slice(8,-1) return Object.prototype.toString.call(target).toLowerCase().slice(8, -1)
}, },
/** /**
* @description: 动态表单读取 * @description: 动态表单读取
*/ */
getFormFieldList(item) { getFormFieldList (item) {
console.log(item); console.log(item);
this.toggleType= item.type || item.qbfsForm.type this.toggleType = item.type || item.qbfsForm.type
this.$nextTick(() => { this.$nextTick(() => {
switch (this.toggleType){ switch (this.toggleType) {
case '1': case '1':
this.comName = "merge" this.comName = 'merge'
break break
case '2': case '2':
this.comName = "delay" this.comName = 'delay'
break break
case '3': case '3':
this.comName = "cancel" this.comName = 'cancel'
break break
case '4': case '4':
this.comName = "rename" this.comName = 'rename'
break break
case '5': case '5':
this.comName = "establish" this.comName = 'establish'
break break
} }
this.qbfsForm = item.qbfsForm || item this.qbfsForm = item.qbfsForm || item
if(!this.qbfsForm.LXD || this.qbfsForm.LXD == ''){ if(!this.qbfsForm.LXD || this.qbfsForm.LXD == '') {
this.qbfsForm.LXD = this.qbfsForm.lxd this.qbfsForm.LXD = this.qbfsForm.lxd
} }
if(!this.qbfsForm.LXDName || this.qbfsForm.LXDName == ''){ if(!this.qbfsForm.LXDName || this.qbfsForm.LXDName == '') {
this.qbfsForm.LXDName = this.qbfsForm.lxdName this.qbfsForm.LXDName = this.qbfsForm.lxdName
} }
// this.isTrue = false // this.isTrue = false
@@ -474,7 +546,7 @@ export default {
this.roleForm.dockUserName = item.dockUserName || item.roleForm.dockUserName; this.roleForm.dockUserName = item.dockUserName || item.roleForm.dockUserName;
this.roleForm.countersigner = item.countersigner || item.roleForm.countersigner; this.roleForm.countersigner = item.countersigner || item.roleForm.countersigner;
this.roleForm.countersignerName = item.countersignerName || item.roleForm.countersignerName; this.roleForm.countersignerName = item.countersignerName || item.roleForm.countersignerName;
this.roleForm.approver = item.approver ||item.roleForm.approver; this.roleForm.approver = item.approver || item.roleForm.approver;
this.roleForm.approverName = item.approverName || item.roleForm.approverName; this.roleForm.approverName = item.approverName || item.roleForm.approverName;
this.roleForm.engineer = item.engineer || item.roleForm.engineer; this.roleForm.engineer = item.engineer || item.roleForm.engineer;
this.roleForm.engineerName = item.engineerName || item.roleForm.engineerName; this.roleForm.engineerName = item.engineerName || item.roleForm.engineerName;
@@ -482,39 +554,39 @@ export default {
this.roleForm.examineName = item.examineName || item.roleForm.examineName; this.roleForm.examineName = item.examineName || item.roleForm.examineName;
}); });
}, },
handleTabs(name) { handleTabs (name) {
this.active = name; this.active = name;
this.isWrite = true this.isWrite = true
}, },
toggleComName(name) { toggleComName (name) {
this.qbfsForm = {} this.qbfsForm = {}
this.comName = name; this.comName = name;
if(this.comName === 'merge'){ if(this.comName === 'merge') {
this.toggleType = '1' this.toggleType = '1'
}else if(this.comName === 'delay'){ }else if(this.comName === 'delay') {
this.toggleType = '2' this.toggleType = '2'
}else if(this.comName === 'cancel'){ }else if(this.comName === 'cancel') {
this.toggleType = '3' this.toggleType = '3'
}else if(this.comName === 'rename'){ }else if(this.comName === 'rename') {
this.toggleType = '4' this.toggleType = '4'
}else if(this.comName === 'establish'){ }else if(this.comName === 'establish') {
this.toggleType = '5' this.toggleType = '5'
this.$refs.childForm.saveEditFile() this.$refs.childForm.saveEditFile()
} }
}, },
//流程保存 // 流程保存
handleSave() { handleSave () {
if(this.approvalFlag){ if(this.approvalFlag) {
//被驳回后的保存 // 被驳回后的保存
this.saveLoading = true; this.saveLoading = true;
this.isSubmit = true this.isSubmit = true
let qbzxdFrom = this.$refs["childForm"].qbfsForm; const qbzxdFrom = this.$refs['childForm'].qbfsForm;
qbzxdFrom.type = this.toggleType qbzxdFrom.type = this.toggleType
qbzxdFrom.commentText = this.commentText qbzxdFrom.commentText = this.commentText
this.saveLoading = true this.saveLoading = true
let _formData = new FormData() const _formData = new FormData()
_formData.append("id", this.bpnId || ""); _formData.append('id', this.bpnId || '');
_formData.append("taskIds", this.taskIds); _formData.append('taskIds', this.taskIds);
_formData.append('prcType', '25') _formData.append('prcType', '25')
_formData.append('json', JSON.stringify({ _formData.append('json', JSON.stringify({
roleForm: this.roleForm, roleForm: this.roleForm,
@@ -523,7 +595,7 @@ export default {
})) }))
saveTaskForPub(_formData).then(res => { saveTaskForPub(_formData).then(res => {
this.saveLoading = false; this.saveLoading = false;
this.$message.success("保存成功"); this.$message.success('保存成功');
this.bpnId = res.result; this.bpnId = res.result;
}).catch(e => { }).catch(e => {
this.saveLoading = false; this.saveLoading = false;
@@ -532,13 +604,13 @@ export default {
this.isSubmit = false this.isSubmit = false
}); });
}else{ }else{
//第一次正常保存 // 第一次正常保存
let qbzxdFrom = this.$refs["childForm"].qbfsForm; const qbzxdFrom = this.$refs['childForm'].qbfsForm;
qbzxdFrom.type = this.toggleType qbzxdFrom.type = this.toggleType
this.saveLoading = true this.saveLoading = true
this.isSubmit = true this.isSubmit = true
let _formData = new FormData() const _formData = new FormData()
_formData.append("id", this.bpnId || ""); _formData.append('id', this.bpnId || '');
_formData.append('createUser', this.$store.getters.userInfo.userId) _formData.append('createUser', this.$store.getters.userInfo.userId)
_formData.append('createUserName', this.$store.getters.userInfo.userName) _formData.append('createUserName', this.$store.getters.userInfo.userName)
_formData.append('prcType', '25') _formData.append('prcType', '25')
@@ -559,34 +631,34 @@ export default {
}) })
} }
}, },
addLog(qbzxdFrom){ addLog (qbzxdFrom) {
let json = Object.assign(qbzxdFrom); const json = Object.assign(qbzxdFrom);
this.$http.post("esRevisePlanLog/log/addLog", { this.$http.post('esRevisePlanLog/log/addLog', {
json: JSON.stringify(json) json: JSON.stringify(json)
}, { }, {
_this: this _this: this
}, res => { }, res => {
}); });
}, },
//流程提交 // 流程提交
handleSubmit() { handleSubmit () {
if(!this.$refs["childForm"].qbfsForm.type){ if(!this.$refs['childForm'].qbfsForm.type) {
this.$refs["childForm"].qbfsForm.type = this.toggleType this.$refs['childForm'].qbfsForm.type = this.toggleType
} }
if(this.comFlag === 0){ if(this.comFlag === 0) {
this.$message.warning('企标名称已存在,请更改!') this.$message.warning('企标名称已存在,请更改!')
}else { }else {
if (this.$route.query.prcNum === undefined) { if (this.$route.query.prcNum === undefined) {
this.$refs["childForm"].validateForm(()=>{ this.$refs['childForm'].validateForm(() => {
let qbzxdFrom = this.$refs["childForm"].qbfsForm; const qbzxdFrom = this.$refs['childForm'].qbfsForm;
this.$refs["roleForm"].validate((valid) => { this.$refs['roleForm'].validate((valid) => {
if (valid) { if (valid) {
this.isSubmit = true; this.isSubmit = true;
this.saveLoading = true; this.saveLoading = true;
qbzxdFrom.commentText = this.commentText; qbzxdFrom.commentText = this.commentText;
qbzxdFrom.addFlag = '0' qbzxdFrom.addFlag = '0'
let json = Object.assign(qbzxdFrom, this.roleForm); const json = Object.assign(qbzxdFrom, this.roleForm);
this.$http.post("lawss/activiti/startProcessRollBack", { this.$http.post('lawss/activiti/startProcessRollBack', {
createUser: this.$store.getters.userInfo.userId, createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName, createUserName: this.$store.getters.userInfo.userName,
type: '25', type: '25',
@@ -599,7 +671,7 @@ export default {
_this: this _this: this
}, res => { }, res => {
if (res.ok) { if (res.ok) {
this.$http.post("lawss/activiti/completeTask", { this.$http.post('lawss/activiti/completeTask', {
taskIds: res.data, taskIds: res.data,
userId: this.$store.getters.userInfo.userId, userId: this.$store.getters.userInfo.userId,
json: JSON.stringify(json) json: JSON.stringify(json)
@@ -610,15 +682,15 @@ export default {
this.$message.success(res.message); this.$message.success(res.message);
// this.addLog(qbzxdFrom) // this.addLog(qbzxdFrom)
if (this.bpnId !== '' && this.bpnId !== undefined) { if (this.bpnId !== '' && this.bpnId !== undefined) {
let taskId = { const taskId = {
id: this.bpnId id: this.bpnId
} }
taskDel(taskId).then(res=>{ taskDel(taskId).then(res => {
return res return res
}) })
} }
this.isSubmit = false; this.isSubmit = false;
this.$router.push({ path: "/processCenter?tabsName=ProcessCenter" }); this.$router.push({ path: '/processCenter?tabsName=ProcessCenter' });
} }
this.saveLoading = false; this.saveLoading = false;
this.isSubmit = false; this.isSubmit = false;
@@ -629,10 +701,9 @@ export default {
} }
}); });
} else { } else {
this.$message.warning("请完善人员信息"); this.$message.warning('请完善人员信息');
} }
}); });
}); });
// if (flag) { // if (flag) {
@@ -641,14 +712,14 @@ export default {
// this.$message.warning("请完善基础信息"); // this.$message.warning("请完善基础信息");
// } // }
} else { } else {
let flag = this.$refs["childForm"].validateForm(() => { const flag = this.$refs['childForm'].validateForm(() => {
let qbzxdFrom = this.$refs["childForm"].qbfsForm; const qbzxdFrom = this.$refs['childForm'].qbfsForm;
if(this.$route.query.taskInfo == '重新起草'){ if(this.$route.query.taskInfo == '重新起草') {
this.isSubmit = true; this.isSubmit = true;
this.saveLoading = true; this.saveLoading = true;
qbzxdFrom.commentText = this.commentText; qbzxdFrom.commentText = this.commentText;
qbzxdFrom.addFlag = '0' qbzxdFrom.addFlag = '0'
let json = Object.assign(qbzxdFrom, this.roleForm); const json = Object.assign(qbzxdFrom, this.roleForm);
// this.$http.post("lawss/activiti/startProcessRollBack", { // this.$http.post("lawss/activiti/startProcessRollBack", {
// createUser: this.$store.getters.userInfo.userId, // createUser: this.$store.getters.userInfo.userId,
// createUserName: this.$store.getters.userInfo.userName, // createUserName: this.$store.getters.userInfo.userName,
@@ -662,7 +733,7 @@ export default {
// _this: this // _this: this
// }, res => { // }, res => {
// if (res.ok) { // if (res.ok) {
this.$http.post("lawss/activiti/completeTask", { this.$http.post('lawss/activiti/completeTask', {
taskIds: this.$route.query.taskIds, taskIds: this.$route.query.taskIds,
userId: this.$store.getters.userInfo.userId, userId: this.$store.getters.userInfo.userId,
json: JSON.stringify(json) json: JSON.stringify(json)
@@ -673,16 +744,16 @@ export default {
this.$message.success(res.message); this.$message.success(res.message);
// this.addLog(qbzxdFrom) // this.addLog(qbzxdFrom)
if (this.bpnId !== '' && this.bpnId !== undefined) { if (this.bpnId !== '' && this.bpnId !== undefined) {
let taskId = { const taskId = {
id: this.bpnId id: this.bpnId
} }
taskDel(taskId).then(res=>{ taskDel(taskId).then(res => {
return res return res
}) })
} }
this.isSubmit = false; this.isSubmit = false;
this.$router.push({ path: "/processCenter?tabsName=ProcessCenter" }); this.$router.push({ path: '/processCenter?tabsName=ProcessCenter' });
} }
this.saveLoading = false; this.saveLoading = false;
this.isSubmit = false; this.isSubmit = false;
@@ -690,14 +761,14 @@ export default {
// } // }
// }); // });
}else { }else {
this.$refs["roleForm"].validate((valid) => { this.$refs['roleForm'].validate((valid) => {
if (valid) { if (valid) {
this.isSubmit = true; this.isSubmit = true;
this.saveLoading = true; this.saveLoading = true;
qbzxdFrom.commentText = this.commentText; qbzxdFrom.commentText = this.commentText;
qbzxdFrom.addFlag = '0' qbzxdFrom.addFlag = '0'
var json = Object.assign(qbzxdFrom, this.roleForm); const json = Object.assign(qbzxdFrom, this.roleForm);
this.$http.post("lawss/activiti/completeTask", { this.$http.post('lawss/activiti/completeTask', {
taskIds: this.$route.query.taskIds, taskIds: this.$route.query.taskIds,
userId: this.$store.getters.userInfo.userId, userId: this.$store.getters.userInfo.userId,
json: JSON.stringify(json) json: JSON.stringify(json)
@@ -708,13 +779,13 @@ export default {
this.$message.success(res.message); this.$message.success(res.message);
this.isSubmit = false; this.isSubmit = false;
// this.addLog(qbzxdFrom) // this.addLog(qbzxdFrom)
this.$router.push({ path: "/processCenter?tabsName=ProcessCenter" }); this.$router.push({ path: '/processCenter?tabsName=ProcessCenter' });
} }
this.saveLoading = false; this.saveLoading = false;
this.isSubmit = false; this.isSubmit = false;
}); });
} else { } else {
this.$message.warning("请完善人员信息"); this.$message.warning('请完善人员信息');
} }
}); });
} }
@@ -729,43 +800,43 @@ export default {
} }
}, },
// 流程阶段负责人选择 // 流程阶段负责人选择
choiceZRR(type, title, id) { choiceZRR (type, title, id) {
this.nodeList = []; this.nodeList = [];
this.nodeList.push(id); this.nodeList.push(id);
this.type = type; this.type = type;
this.drawerTitle = title; this.drawerTitle = title;
this.modalshowflag = true; this.modalshowflag = true;
}, },
checkedRole(data) { checkedRole (data) {
if (this.type === "dockUser") { if (this.type === 'dockUser') {
this.roleForm.dockUser = data[0].id; this.roleForm.dockUser = data[0].id;
this.roleForm.dockUserName = data[0].name; this.roleForm.dockUserName = data[0].name;
} else if (this.type === "examine") { } else if (this.type === 'examine') {
this.roleForm.examine = data[0].id; this.roleForm.examine = data[0].id;
this.roleForm.examineName = data[0].name; this.roleForm.examineName = data[0].name;
} else if (this.type === "approver") { } else if (this.type === 'approver') {
this.roleForm.approver = data[0].id; this.roleForm.approver = data[0].id;
this.roleForm.approverName = data[0].name; this.roleForm.approverName = data[0].name;
} else if (this.type === "engineer") { } else if (this.type === 'engineer') {
this.roleForm.engineer = data[0].id; this.roleForm.engineer = data[0].id;
this.roleForm.engineerName = data[0].name; this.roleForm.engineerName = data[0].name;
} }
this.modalshowflag = false; this.modalshowflag = false;
}, },
choiceZRRS() { choiceZRRS () {
this.nodeList2 = []; this.nodeList2 = [];
if (this.roleForm.countersigner.length > 0) { if (this.roleForm.countersigner.length > 0) {
this.nodeList2 = this.roleForm.countersigner.split(","); this.nodeList2 = this.roleForm.countersigner.split(',');
} }
this.modalshowflag2 = true; this.modalshowflag2 = true;
}, },
checkedRole2(data) { checkedRole2 (data) {
var idList = ""; let idList = '';
var nameList = ""; let nameList = '';
data.forEach(item => { data.forEach(item => {
if (nameList.length > 0) { if (nameList.length > 0) {
nameList += ","; nameList += ',';
idList += ","; idList += ',';
} }
idList += item.id; idList += item.id;
nameList += item.name; nameList += item.name;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff