This commit is contained in:
zhutianqi
2021-07-04 18:05:26 +08:00
parent 91aa3554e5
commit bb0f02f730
3 changed files with 217 additions and 402 deletions
@@ -14,6 +14,7 @@
<el-form
ref="qbkwForm"
:model="form"
:rules="formRules"
class="label-input-form"
label-width="210px"
>
@@ -30,10 +31,10 @@
clearable
></el-input>
</el-form-item>
<el-form-item label="完成时间" prop="year" class="add-form-item form-item-disabled">
<el-form-item label="完成时间" prop="date" class="add-form-item form-item-disabled">
<el-date-picker
v-model="form.year"
type="year"
v-model="form.date"
type="date"
placeholder="请选择完成时间">
</el-date-picker>
</el-form-item>
@@ -56,98 +57,86 @@
</el-form>
</div>
<div>
<el-collapse accordion>
<el-collapse-item title="调研描述">
<div style="margin: 10px 0;">
<el-input
type="textarea"
:rows="3"
resize="none"
placeholder="请输入调研描述"
v-model="textarea">
</el-input>
</div>
</el-collapse-item>
</el-collapse>
<!-- <el-collapse accordion>-->
<!-- <el-collapse-item title="调研描述">-->
<!-- <div style="margin: 10px 0;">-->
<!-- <el-input-->
<!-- type="textarea"-->
<!-- :rows="3"-->
<!-- resize="none"-->
<!-- placeholder="请输入调研描述"-->
<!-- v-model="textarea">-->
<!-- </el-input>-->
<!-- </div>-->
<!-- </el-collapse-item>-->
<!-- </el-collapse>-->
</div>
</div>
<div class="content" v-if="active === '2'">
<div class="block" style="padding-top: 20px;">
<el-timeline>
<el-timeline-item timestamp="发起流程" placement="top" :color="user1 ? '#66b1ff' : ''">
<el-card>
<h4>流程发起人</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="user1" placeholder="流程发起人"></el-input>
</div>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="选择责任人" placement="top" :color="user2 ? '#66b1ff' : ''">
<el-card>
<h4>责任对接人</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="user2" placeholder="选择责任人" @click.native="choiceZRR">
</el-input>
</div>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="上传调研结果" placement="top" :color="user3 ? '#66b1ff' : ''">
<el-card>
<h4>责任人</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="user3" placeholder="选择责任人"></el-input>
</div>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="审批" placement="top" :color="user4 ? '#66b1ff' : ''">
<el-card>
<h4>责任对接人</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="user5" placeholder="选择责任对接人"></el-input>
</div>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="调研汇总" placement="top" :color="user5 ? '#66b1ff' : ''">
<el-card>
<h4>标准法规工程师</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="user4" placeholder="选择标准法规工程师"></el-input>
</div>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="会签审核" placement="top" :color="user6 ? '#66b1ff' : ''">
<el-card>
<h4>责任人</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="user5" placeholder="选择责任人"></el-input>
</div>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="会签审核" placement="top" :color="user7 ? '#66b1ff' : ''">
<el-card>
<h4>责任部门领导与标准法规部部长</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="user5" placeholder="选择责任部门领导与标准法规部部长"></el-input>
</div>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="审定" placement="top" :color="user8 ? '#66b1ff' : ''">
<el-card>
<h4>技术管理中心负责人</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="user5" placeholder="选择技术管理中心负责人"></el-input>
</div>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="批准" placement="top" :color="user9 ? '#66b1ff' : ''">
<el-card>
<h4>标准法规业务院级领导</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="user5" placeholder="选择标准法规业务院级领导"></el-input>
</div>
</el-card>
</el-timeline-item>
<el-form
ref="Form"
:model="roleForm"
:rules="roleFormRules"
class="label-input-form">
<el-timeline-item timestamp="发起流程" placement="top" :color="roleForm.startUser ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="startUserName" style="margin-bottom: 0">
<h4>流程发起人</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.startUser" style="display: none;"></el-input>
<el-input v-model="roleForm.startUserName" placeholder="流程发起人"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="选择部门责任人" placement="top" :color="roleForm.dockUser ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="dockUserName" style="margin-bottom: 0">
<h4>责任部门对接</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.dockUser" style="display: none;"></el-input>
<el-input v-model="roleForm.dockUserName" placeholder="选择责任人" @click.native="choiceZRR('dockUser', '选择责任人', roleForm.dockUser)">
</el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="审批" placement="top" :color="roleForm.ministerUser ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="ministerUserName" style="margin-bottom: 0">
<h4>标准法规部部长</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.ministerUser" style="display: none;"></el-input>
<el-input v-model="roleForm.ministerUserName" placeholder="选择标准法规部部长" @click.native="choiceZRR('ministerUser', '选择标准法规部部长', roleForm.ministerUser)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="审定" placement="top" :color="roleForm.directorUser ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="directorUserName" style="margin-bottom: 0">
<h4>技术管理中心主任</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.directorUser" style="display: none;"></el-input>
<el-input v-model="roleForm.directorUserName" placeholder="选择技术管理中心主任" @click.native="choiceZRR('directorUser', '选择技术管理中心主任', roleForm.directorUser)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="批准人" placement="top" :color="roleForm.presidentUser ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="presidentUserName" style="margin-bottom: 0">
<h4>工程研究总院院长</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.presidentUser" style="display: none;"></el-input>
<el-input v-model="roleForm.presidentUserName" placeholder="选择工程研究总院院长" @click.native="choiceZRR('presidentUser', '选择工程研究总院院长', roleForm.presidentUser)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
</el-form>
</el-timeline>
</div>
</div>
@@ -166,10 +155,13 @@
:wrapperClosable="false"
size="800px">
<el-tree
v-if="modalshowflag"
style="height: 100%;"
node-key="id"
class="filter-tree"
:data="treeData"
:props="defaultProps"
:default-checked-keys="nodeList"
highlight-current
check-strictly
@check="drawerCheck"
@@ -178,6 +170,10 @@
show-checkbox
ref="tree">
</el-tree>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveUserInfo">确定</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancleUserInfo">取消</el-button>
</div>
</el-drawer>
</div>
</template>
@@ -191,6 +187,9 @@ export default {
name: "bzdyStep1",
data() {
return {
roleRow: {},
nodeList: [],
type: '',
defaultProps: {
children: 'children',
label: 'name'
@@ -206,20 +205,47 @@ export default {
saveLoading: false,
form: {
title: '', // 调研标题
year: '', // 完成时间
date: '', // 完成时间
model: '', // 上传模板
},
formRules: {
title: [
{ required: true, message: '请输入调研标题', trigger: 'blur' },
],
date: [
{ type: 'date', required: true, message: '请选择完成时间', trigger: 'change' }
]
},
data: [], // 标准列表数据
ListForm: {}, // 新增数据
user1: '',
user2: '',
user3: '',
user4: '',
user5: '',
user6: '',
user7: '',
user8: '',
user9: '',
roleForm: {
startUserName: this.$store.getters.userInfo.account,
startUser: this.$store.getters.userInfo.id,
dockUser: '',
responUserList: '',
ministerUser: '',
directorUser: '',
presidentUser: '',
dockUserName: '',
responUserListName: '',
ministerUserName: '',
directorUserName: '',
presidentUserName: ''
},
roleFormRules: {
dockUserName: [
{ required: true, message: '请输入调研标题', trigger: 'blur' },
],
ministerUserName: [
{ required: true, message: '请输入调研标题', trigger: 'blur' },
],
directorUserName: [
{ required: true, message: '请输入调研标题', trigger: 'blur' },
],
presidentUserName: [
{ required: true, message: '请输入调研标题', trigger: 'blur' },
]
}
}
},
components: {
@@ -228,15 +254,39 @@ export default {
ProcessTitle
},
methods: {
saveUserInfo () {
if (this.type === 'dockUser') {
this.roleForm.dockUser = this.roleRow.id
this.roleForm.dockUserName = this.roleRow.name
} else if (this.type === 'ministerUser') {
this.roleForm.ministerUser = this.roleRow.id
this.roleForm.ministerUserName = this.roleRow.name
} else if (this.type === 'directorUser') {
this.roleForm.directorUser = this.roleRow.id
this.roleForm.directorUserName = this.roleRow.name
} else if (this.type === 'presidentUser') {
this.roleForm.presidentUser = this.roleRow.id
this.roleForm.presidentUserName = this.roleRow.name
}
this.modalshowflag = false
},
cancleUserInfo () {
this.modalshowflag = false
},
drawerCheck (data) {
var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
if(getlist.length == 1) {
this.roleRow = getlist[0]
}else {
this.$refs.tree.setCheckedKeys([data.id]);
this.roleRow = this.$refs.tree.getCheckedNodes()[0]
}
},
choiceZRR () {
this.drawerTitle = '选择责任人'
choiceZRR (type, title, id) {
this.nodeList = []
this.nodeList.push(id)
this.type = type
this.drawerTitle = title
this.modalshowflag = true
},
getTree () {
@@ -263,6 +313,13 @@ export default {
},
handleSave() {},
handleSubmit() {
this.$refs['Form'].validate((valid) => {
if (valid) {
alert('submit!');
} else {
return false;
}
})
}
},
mounted () {