添加政策征求意见流程

This commit is contained in:
范强强
2023-10-13 17:46:55 +08:00
parent 6947ebbdc1
commit 259ee5ee47
6 changed files with 1214 additions and 0 deletions
@@ -0,0 +1,84 @@
<template>
<el-table
height="100%"
ref="selection"
:data="histortData"
tooltip-effect="dark"
style="width: 100%"
border
row-key="id"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
<el-table-column
prop="name"
label="任务步骤"
align="center"
>
</el-table-column>
<el-table-column
prop="assignee"
label="任务受理人"
align="center"
>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="endTime"
label="完成时间"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format('YYYY-MM-DD HH:mm:ss') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="comment"
label="流程信息"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.commentText }}</span>
</template>
</el-table-column>
<el-table-column
prop="completeFlag"
label="状态"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? '已完成' : scope.row.receiveStatus ? '已接收' : '未完成' }}</span>
</template>
</el-table-column>
</el-table>
</template>
<script>
export default {
name: "approvalHistory",
data() {
return {
histortData: [],
}
},
mounted() {
this.getHistoryData()
},
methods: {
getHistoryData() {
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum,
}, {}, res => {
this.histortData = res
}, e => {
})
},
},
}
</script>
<style scoped>
</style>
@@ -0,0 +1,186 @@
<template>
<div class="block" style="padding-top: 20px;">
<el-timeline>
<el-form
ref="Form"
:model="roleForm"
:rules="roleFormRules"
class="label-input-form myForm">
<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 :disabled="disabledXX" v-model="roleForm.startUser"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.startUserName" placeholder="流程发起人"
disabled></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="责任对接人任务分发及审核" placement="top"
:color="roleForm.responseDockerId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="responseDockerName" style="margin-bottom: 0">
<h4>责任对接人</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.responseDockerId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.responseDockerName" readonly
placeholder="选择责任对接人"
@click.native="choicePeoPle('responseDockerId', '选择责任对接人', roleForm.responseDockerId)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="法规认证工程师意见汇总并发起会签" placement="top"
:color="roleForm.lawsProveEngineerId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="lawsProveEngineerName" style="margin-bottom: 0">
<h4>法规认证工程师</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveEngineerId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveEngineerName" readonly
placeholder="选择法规认证工程师"
@click.native="choicePeoPle('lawsProveEngineerId', '选择法规认证工程师', roleForm.lawsProveEngineerId)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="法规认证部部长审核" placement="top"
:color="roleForm.lawsProveMinisterId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="lawsProveMinisterName" style="margin-bottom: 0">
<h4>法规认证部部长</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveMinisterId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveMinisterName" readonly
placeholder="选择法规认证部部长"
@click.native="choicePeoPle('lawsProveMinisterId', '选择法规认证部部长', roleForm.lawsProveMinisterId)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="法规认证部副总监审定" placement="top"
:color="roleForm.lawsProveViceChiefId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="lawsProveViceChiefName" style="margin-bottom: 0">
<h4>法规认证部副总监</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveViceChiefId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveViceChiefName" readonly
placeholder="选择法规认证部副总监"
@click.native="choicePeoPle('lawsProveViceChiefId', '选择法规认证部副总监', roleForm.lawsProveViceChiefId)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="法规认证部总监批准" placement="top"
:color="roleForm.lawsProveChiefId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="lawsProveChiefName" style="margin-bottom: 0">
<h4>法规认证部总监</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefName" readonly
placeholder="选择法规认证部总监"
@click.native="choicePeoPle('lawsProveChiefId', '选择法规认证部总监', roleForm.lawsProveChiefId)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
</el-form>
</el-timeline>
<Role-tree v-if="!disabledXX"
check-box
:is-title="drawerTitle"
:is-visible.sync="modalshowflag"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
<script>
export default {
name: "personnelInformation",
data() {
return {
roleForm: {},
// 角色验证
roleFormRules: {
responseDockerName: [
{required: true, message: "请选择责任对接人", trigger: "change"}
],
responseUserName: [
{required: true, message: "请选择责任人", trigger: "change"}
],
lawsProveEngineerName: [
{required: true, message: "请选择法规认证工程师", trigger: "change"}
],
lawsProveMinisterName: [
{required: true, message: "请选择法规认证部部长", trigger: "change"}
],
lawsProveViceChiefName: [
{required: true, message: "请选择法规认证部副总监", trigger: "change"}
],
lawsProveChiefName: [
{required: true, message: "请选择法规认证部总监", trigger: "change"}
],
},
disabledXX: false,
drawerTitle: '',
nodeList: [],
modalshowflag: false,
}
},
methods: {
//选择人
choicePeoPle(type, title, id) {
this.nodeList = [];
this.nodeList.push(id);
this.type = type;
this.drawerTitle = title;
this.modalshowflag = true;
},
//选择人
checkedRole(data) {
if (this.type === "responseDockerId") {
this.roleForm.responseDockerId = data[0].id;
this.roleForm.responseDockerName = data[0].name;
} else if (this.type === "responseUserId") {
this.roleForm.responseUserId = data[0].id;
this.roleForm.responseUserName = data[0].name;
} else if (this.type === "lawsProveEngineerId") {
this.roleForm.lawsProveEngineerId = data[0].id;
this.roleForm.lawsProveEngineerName = data[0].name;
} else if (this.type === "lawsProveMinisterId") {
this.roleForm.lawsProveMinisterId = data[0].id;
this.roleForm.lawsProveMinisterName = data[0].name;
} else if (this.type === "lawsProveViceChiefId") {
this.roleForm.lawsProveViceChiefId = data[0].id;
this.roleForm.lawsProveViceChiefName = data[0].name;
} else if (this.type === "lawsProveChiefId") {
this.roleForm.lawsProveChiefId = data[0].id;
this.roleForm.lawsProveChiefName = data[0].name;
}
this.roleForm = {...this.roleForm}
this.modalshowflag = false;
},
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,287 @@
<template>
<el-drawer ref="standard"
title="征求意见政策"
size="1000px"
:visible.sync="standardDrawer"
direction="rtl"
:before-close="handleReviseDrawerClose">
<div class="standard-content">
<div class="content">
<div class="standard-table-search">
<el-form :model="standardSearchForm" inline class="label-input-form search-area">
<el-form-item label="政策编号" style="margin-right:10px" prop="lawsNumber" class="search-item">
<el-input :disabled="disabledXX"
v-model="standardSearchForm.lawsNumber"
clearable placeholder="根据编号查找"
:maxlength="100"
@keyup.enter.native="handleSearchStandard"/>
</el-form-item>
<el-form-item label="政策名称" style="margin-right:10px" prop="lawsName" class="search-item">
<el-input :disabled="disabledXX"
v-model="standardSearchForm.lawsName"
placeholder="请输入政策名称"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-form-item>
<el-button :disabled="disabledXX"
size="mini"
type="primary"
class="common-button-primary"
@click="handleSearchStandard">
查询
</el-button>
<el-button :disabled="disabledXX"
size="mini"
class="common-button-default"
@click="handleResetSearch">
清空
</el-button>
</el-form-item>
</el-form>
</div>
<div class="standard-table-wrap">
<el-table
ref="reviseDrawerTable"
:data="tableData.standardData"
tooltip-effect="dark"
style="width: 100%;"
:height="tableHeight.standardTableHeight"
border
class="drag-table"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
@selection-change="standSelectChange">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
type="index"
label="序号"
width="80"
align="center"
></el-table-column>
<el-table-column
label="政策编号"
align="center"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" style="color: #409eff;cursor: pointer">{{ scope.row.lawsNumber }}</a>
</template>
</el-table-column>
<el-table-column
prop="lawsName"
label="政策名称"
align="center">
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsName }}</a>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
label="发布日期"
align="center">
<template slot-scope="scope">{{ scope.row.issueTime ? $moment(scope.row.issueTime).format('YYYY-MM-DD') : '' }}</template>
</el-table-column>
<el-table-column
prop="textStatus"
label="政策状态"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.standStatusShow }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="80">
<template slot-scope="scope">
<el-button :disabled="disabledXX"
class="opera-btn"
size="mini"
type="primary"
@click="handlePreview(scope.row)">查看
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
:page="standardSearchForm.page"
:total="standardSearchForm.total"
@pageChange="handleStandardPageChange"
@pageSizeChange="handleStandardPageSizeChange"></pagination>
<loading :loading="loadSarStandard">数据获取中</loading>
</div>
</div>
<div class="demo-drawer-footer">
<!-- <el-button :disabled="disabledXX" -->
<!-- round-->
<!-- class="common-button-primary"-->
<!-- icon="el-icon-check"-->
<!-- type="primary"-->
<!-- @click="handleProcessStandardNext(1)">新增-->
<!-- </el-button>-->
<el-button :disabled="disabledXX"
round
class="common-button-primary"
icon="el-icon-check"
type="primary"
@click="handleProcessStandardNext(2)">带入
</el-button>
<el-button :disabled="disabledXX"
round
class="common-button-default"
icon="el-icon-close"
@click="handleProcessStandardNext(3)">取消
</el-button>
</div>
<loading :loading="dataLoading">正在加载数据</loading>
</el-drawer>
</template>
<script>
export default {
name: "policySolicitingOpinions",
data(){
return{
standardDrawer: false,
standardSearchForm:{
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
},
tableData: {
// 标准表格数据
standardData: [],
// 任务分解单数据
taskTableData: []
},
tableHeight: {
standardTableHeight: null
},
standardCheckedList:[],
disabledXX:false,
dataLoading:false,
}
},
methods:{
handleReviseDrawerClose(done) {
done()
},
handleSearchStandard() {
this.standardDrawer = true
this.$nextTick(() => {
// 动态设置表格高度
this.tableHeight.standardTableHeight = $('.standard-table-wrap').height()
window.onresize = () => {
this.tableHeight.standardTableHeight = $('.standard-table-wrap').height()
}
})
this.getDomesticStandardTable()
},
getDomesticStandardTable() {
this.loadSarStandard = true
this.$http.get('lawss/sarLawsInfo/page', this.standardSearchForm, {}, res => {
this.loadSarStandard = false
if (res.ok) {
this.tableData.standardData = res.data.list
this.standardSearchForm.total = res.data.count
}
}, e => {
this.loadSarStandard = false
})
},
standSelectChange(data) {
this.standardCheckedList = data
},
// 点击查看
handlePreview(item) {
let routeUrl = this.$router.resolve({
name: 'OtherLawsStandDetails',
params: {
id: item.id,
pageType: 'LAWS_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
handleStandardPageChange(page) {
this.standardSearchForm.page = page
this.handleSearchStandard()
},
handleStandardPageSizeChange(pageSize) {
this.standardSearchForm.pageSize = pageSize
this.handleSearchStandard()
},
filterObj(obj){
if(obj && obj !== ''){
if(obj instanceof Array){
return obj;
}else {
return obj.split(",")
}
}
return "";
},
handleProcessStandardNext(status) {
switch (status) {
// 带入
case 2:
if(!this.standardCheckedList.length){
this.$message.warning('请至少选择一条政策信息进行带入')
}else if(this.standardCheckedList.length > 1){
this.$message.warning('您只能选择一条政策信息进行带入')
}else{
this.dataLoading = true
this.standardDrawer = false
this.$http.get('lawss/sarLawsInfo/getStandInfoUpdateById', {id: this.standardCheckedList[0].id}, {
_this: this
}, res => {
if (res && res.data) {
const bringData = res.data
const json = Object.assign(bringData, bringData.attrInfoMap);
this.form = JSON.parse(JSON.stringify(json))
const dateArr = []
if(this.form.commentCycleStart && this.form.commentCycleEnd){
dateArr[0] = this.form.commentCycleStart
dateArr[1] = this.form.commentCycleEnd
this.form.cycleTime = dateArr
}
this.form['lawsSyqy'] = this.filterObj(this.form['lawsSyqy'])
this.form['lawsSycx'] = this.filterObj(this.form['lawsSycx'])
this.form['lawsLabel'] = this.filterObj(this.form['lawsLabel'])
this.form['YYRZLAWS'] = this.filterObj(this.form['YYRZLAWS'])
this.form['NYLXLAWS'] = this.filterObj(this.form['NYLXLAWS'])
this.form['TGRLAWS'] = this.filterObj(this.form['TGRLAWS'])
this.form['ZRBMLAWS'] = this.filterObj(this.form['ZRBMLAWS'])
this.form['TGDWLAWS'] = this.filterObj(this.form['TGDWLAWS'])
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
this.form['id'] = bringData.id
this.dataLoading = false
this.busVsFunc()
this.modelFunc()
this.$forceUpdate()
}
// 遍历对象初始化文件信息
for (const p in this.form) {
if (typeof (this.form[p]) != "function") {
this.initializeFileList(p, this.form[p]);
}
}
console.log("res", res);
})
}
break
// 取消
case 3:
this.standardCheckedList = []
this.standardDrawer = false
break
}
},
},
}
</script>
<style scoped>
</style>
@@ -0,0 +1,139 @@
<template>
<div>
<ProcessTitle>
<template slot="title">征求意见列表</template>
</ProcessTitle>
<div class="action-bar">
<el-button
type="primary"
class="common-button-primary add-button"
@click="addModel"
><i class="el-icon-plus"></i>新增
</el-button>
<el-button
type="primary"
class="common-button-primary add-button"
@click="deleteModel"
><i class="el-icon-plus"></i>批量删除
</el-button>
</div>
<el-table
height="100%"
ref="selection"
:data="histortData"
tooltip-effect="dark"
style="width: 100%"
border
row-key="id"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
<el-table-column
prop="name"
label="序号"
width="80"
align="center"
>
</el-table-column>
<el-table-column
prop="assignee"
label="章节编号"
align="center"
>
</el-table-column>
<el-table-column
prop="createTime"
label="章节条目"
align="center">
</el-table-column>
<el-table-column
prop="endTime"
label="修改前"
align="center">
</el-table-column>
<el-table-column
prop="comment"
label="修改后"
align="center">
</el-table-column>
<el-table-column
prop="completeFlag"
label="修改理由"
align="center">
</el-table-column>
<el-table-column
prop="completeFlag"
label="原因"
align="center">
</el-table-column>
<el-table-column
prop="completeFlag"
label="附件"
align="center">
</el-table-column>
<el-table-column
prop="completeFlag"
label="责任人"
align="center">
</el-table-column>
<el-table-column
prop="completeFlag"
label="提出部门"
align="center">
</el-table-column>
<el-table-column
prop="completeFlag"
label="提出人"
align="center">
</el-table-column>
<el-table-column
prop="completeFlag"
label="处理意见"
align="center">
</el-table-column>
<el-table-column
prop="completeFlag"
label="原因"
align="center">
</el-table-column>
<el-table-column
prop="completeFlag"
label="操作"
align="center">
</el-table-column>
</el-table>
</div>
</template>
<script>
import ProcessTitle from "../../../components/ProcessTitle";
export default {
name: "solicitationList",
components: {
ProcessTitle
},
data() {
return {
histortData:[],
}
},
mounted() {
},
methods: {
addModel() {
},
deleteModel(){
},
},
}
</script>
<style scoped>
.add-button{
font-size: 12px;
padding: 9px 15px;
height: auto;
}
</style>
@@ -0,0 +1,509 @@
<template>
<div class="policyConsultation">
<ProcessHeader toggle>
<template slot="proName">政策征求意见流程</template>
<template slot="proNode">申请人发起流程</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">人员信息</div>
<div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div>
<div class="content" v-show="active === '1'">
<div style="flex: auto; overflow: auto;">
<el-form
ref="zczqyjForm"
:model="dataForm"
:rules="formRules"
class="label-input-form"
label-width="210px"
>
<ProcessTitle>
<template slot="title">基础信息</template>
</ProcessTitle>
<div class="prc-content-border">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="政策编号" prop="lawsNumber" class="add-form-item form-item-disabled">
<el-input :disabled="true"
class="formInput"
v-model="dataForm.lawsNumber"
placeholder="请输入政策编号"
clearable
/>
<div class="addButton" style="padding-left: 10px">
<el-button :disabled="disabledXX" size="small" type="primary"
@click="handleSearchStandard">选择征求意见政策
</el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="政策名称" prop="lawsName" class="add-form-item form-item-disabled">
<el-input :disabled="true"
v-model="dataForm.lawsName"
placeholder="请输入政策名称"
clearable
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="截止时间" prop="endTime" class="add-form-item form-item-disabled">
<el-date-picker :disabled="disabledXX"
v-model="dataForm.endTime"
type="date"
style="width: 100%"
placeholder="请选择截止时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="责任单位截止时间" prop="responsibilityEndTime"
class="add-form-item form-item-disabled">
<el-date-picker :disabled="disabledXX"
v-model="dataForm.responsibilityEndTime"
type="date"
style="width: 100%"
placeholder="请选择责任单位截止时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="政策征求意见周期" prop="cycleTime"
class="add-form-item form-item-disabled">
<el-date-picker :disabled="disabledXX"
v-model="dataForm.cycleTime"
type="daterange"
range-separator=""
align="right"
unlink-panels
style="width: 100%"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="模板"
class="add-form-item form-item-disabled">
<el-input
disabled
style="display: none;"
v-model="dataForm.templateFileNameList"
clearable
></el-input>
<div v-if="dataForm.templateFileList && dataForm.templateFileList.length > 0">
<div v-for="(item, index) in dataForm.templateFileList" :key="index"
style="margin-right: 5px;padding-left: 10px">
<div class="fileClass">
<span @click="handlePreview(item)">{{ item.name }}</span>
<el-button :disabled="disabledXX"
size="small"
@click="clickButtonToUpload(item)"
icon="el-icon-download"
style="height: 32px; margin-left: 5px;"
></el-button>
</div>
</div>
</div>
<div>
<el-button :disabled="disabledXX"
type="primary"
class="common-button-primary"
@click="fileUpload"
size="mini">
点击上传
</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
<solicitationList ref="solicitationListRef"/>
</div>
<el-collapse accordion>
<el-collapse-item title="意见填写">
<div style="margin: 10px 0;">
<el-input :disabled="disabledXX"
type="textarea"
:rows="3"
resize="none"
placeholder="请输入意见"
v-model="commentText">
</el-input>
</div>
</el-collapse-item>
</el-collapse>
</div>
<div class="content" v-show="active === '2'">
<personnelInformation ref="personnelInformationRef"/>
</div>
<div class="content" style="padding-top: 20px" v-show="active === '3'">
<approvalHistory />
</div>
<ProcessFooter show-save
show-submit
:submitLoading="isSubmit"
:saveLoading="saveLoading"
@save="handleSave"
@submit="handleSubmit"
>
</ProcessFooter>
<el-dialog width='400px' :visible.sync="fileMadel" title="上传调研模板">
<el-upload
v-if="fileMadel"
multiple
class="upload-demo"
drag
:action="fileUrl"
ref="importfile"
name="file"
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx"
:before-upload="beginImportFile"
:on-success="importFileSuccess"
:on-remove="importFileRemove"
:show-file-list="true"
:file-list="dataForm.templateFileList"
>
<div style="padding: 20px 0">
<i class="el-icon-upload" style="color: #3399ff"></i>
<p>点击或拖拽上传文件</p>
</div>
</el-upload>
</el-dialog>
</div>
</template>
<script>
import ProcessHeader from "../../components/ProcessHeader";
import ProcessTitle from "../../components/ProcessTitle";
import ProcessFooter from "../../components/ProcessFooter";
import approvalHistory from "./components/approvalHistory";
import personnelInformation from "./components/personnelInformation";
import solicitationList from "./components/solicitationList";
import { queryTaskFirst, saveTaskFirst, taskDel } from "api/process";
export default {
name: "index",
components: {
ProcessHeader,
ProcessTitle,
ProcessFooter,
approvalHistory,
personnelInformation,
solicitationList
},
data() {
return {
active: '1',
disabledXX: false,
formRules: {
lawsNumber: [
{required: true, message: '请输入政策编号', trigger: 'change'},
],
lawsName: [
{required: true, message: '请输入政策名称', trigger: 'change'},
],
endTime: [
{required: true, message: '请选择截止时间', trigger: 'change'},
],
cycleTime: [
{required: true, message: '请选择政策征求意见周期', trigger: 'change'},
],
responsibilityEndTime: [
{required: true, message: '请选择责任单位截止时间', trigger: 'change'},
],
},
dataForm: {},
fileMadel: false,
fileUrl: 'api/att/attFile/uploadNew',
saveLoading: false,
isSubmit: false,
commentText: '',
}
},
methods: {
//基础信息/人员信息
handleTabs(type) {
this.active = type;
},
handleSearchStandard() {
this.standardDrawer = true
this.$nextTick(() => {
// 动态设置表格高度
this.tableHeight.standardTableHeight = $('.standard-table-wrap').height()
window.onresize = () => {
this.tableHeight.standardTableHeight = $('.standard-table-wrap').height()
}
})
this.getDomesticStandardTable()
},
fileUpload() {
this.fileMadel = true
},
clickButtonToUpload(file) {
const attId = file.attId
if (attId) {
window.location.href = '/api/att/attFile/downloadFileForSarNew?fileId=' + attId
} else {
this.$message.warning('文件不存在,下载失败')
}
},
// 导入按钮 上传之前的钩子
beginImportFile(file) {
var filename = file.name
var index1 = filename.lastIndexOf('.')
var index2 = filename.length
var fileSuffix = filename.substring(index1, index2)
// const fileSuffix = file.name.split('.')[1] // 后缀名
// 判断上传文件格式
if (fileSuffix === '.ppt' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.PPT' || fileSuffix === '.xls' || fileSuffix === '.xlsx' || fileSuffix === '.XLS' || fileSuffix === '.XLSX' || fileSuffix === '.pdf' || fileSuffix === '.PDF' || fileSuffix === '.PPTX' || fileSuffix === '.pptx') {
return true
} else {
this.$message.error('文件' + file.name + '格式不正确,请上传PPT,DOCX,XLS,PDF文件')
return false
}
// 判断文件上传大小
// eslint-disable-next-line no-unreachable
if (file.size / 1024 / 1024 <= 200) {
return true
} else {
this.$message.error('文件' + file.name + '大小不超过200M')
return false
}
return true
},
// 导入标准数据成功后执行
importFileSuccess(response, file, fileList) {
if (response.ok) {
this.dataForm.templateFileList = []
let list = []
fileList.forEach(item => {
this.dataForm.templateFileList.push(item)
list.push(item.name)
})
this.dataForm.templateFileNameList = list.join(',')
this.$message({
// showClose: true,
message: response.message,
type: 'success'
})
} else {
this.$message.error('程序异常,上传失败')
}
},
importFileRemove(file, fileList) {
let list = []
this.dataForm.templateFileList = []
fileList.forEach(item => {
this.dataForm.templateFileList.push(item)
list.push(item.name)
})
this.dataForm.templateFileNameList = list.join(',')
},
//保存事件
handleSave() {
this.saveLoading = true;
let _formData = new FormData();
let json = this.form
json.commentText = this.commentText
json.filesId = this.addFjList
json.filesName = this.form.fjListName
_formData.append('id', this.bpnId || '')
_formData.append("createUser", this.$store.getters.userInfo.userId);
_formData.append("createUserName", this.$store.getters.userInfo.userName);
_formData.append("prcType", "laws2");
_formData.append("json", JSON.stringify({
form: json,
roleForm: this.roleForm,
commentText: this.commentText
}));
saveTaskFirst(_formData).then(res => {
this.saveLoading = false;
this.$message.success("保存成功");
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false;
});
},
//提交事件
handleSubmit() {
this.$refs['zczqyjForm'].validate((valid) => {
if (valid) {
this.$refs['Form'].validate((valid) => {
if (valid) {
const json = Object.assign(this.form, this.roleForm);
json.commentText = this.commentText
json.filesId = this.addFjList
json.filesName = this.form.fjListName
this.isSubmit = true
this.saveLoading = true;
this.$http.post('lawss/activiti/startProcessRollBack', {
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: 'laws2',
json: JSON.stringify({
form: json,
roleForm: this.roleForm,
commentText: this.commentText
})
}, {_this: this}, res => {
if (res.ok) {
this.$http.post('lawss/activiti/completeTask', {
json: JSON.stringify(json),
taskId: res.data,
userId: this.$store.getters.userInfo.userId
}, {_this: this}, res => {
if (res.success) {
this.$message.success(res.message);
if (this.bpnId !== '') {
let taskId = {
id: this.bpnId
}
taskDel(taskId).then(res => {
return res
})
}
this.$router.push("/processCenter");
}
this.isSubmit = false;
this.saveLoading = false;
})
} else {
this.$message.warning('流程启动失败')
this.isSubmit = false
this.saveLoading = false;
}
})
} else {
return this.$message.warning('请完善人员信息')
}
})
} else {
return this.$message.warning('请完善基础信息')
}
})
},
}
}
</script>
<style lang="less" scoped>
.policyConsultation {
.myForm {
/deep/ .el-form-item__content {
line-height: 10px;
}
}
.label-input-form .add-form-item .el-form-item__content .el-date-editor {
width: 30%;
}
position: relative;
height: 100%;
.fileClass {
cursor: pointer;
}
.fileClass:hover {
color: #0c91e5;
}
.headerTabs {
height: 52px;
display: flex;
align-items: center;
position: absolute;
top: 0;
right: 10px;
.headerTabsItem {
border: 1px solid #c1c1c1;
padding: 0 5px;
height: 30px;
line-height: 30px;
cursor: pointer;
}
.active {
border: 1px solid #E6A23C;
color: #fff;
background: #E6A23C;
}
}
.content {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(~'100% - 103px');
overflow: auto;
.tableTitle {
margin-bottom: 10px;
height: 30px;
line-height: 30px;
position: relative;
font-size: 13px;
font-weight: bold;
.tableButton {
position: absolute;
right: 0;
top: 0;
}
}
}
.standard-content {
height: 100%;
padding: 10px 0 0;
.content {
height: 100%;
display: flex;
flex-direction: column;
padding: 0 10px;
.standard-table-wrap {
flex: auto;
overflow-y: auto;
}
.pagination {
position: static;
/deep/ .pagination-slot {
padding: 0;
}
}
.search-area {
display: flex;
justify-content: left;
background: #FFF;
padding: 10px 10px 0;
}
}
}
}
.formInput {
display: inline-block;
width: calc(100% - 148px);
}
.addButton {
display: inline-block;
}
</style>
+9
View File
@@ -513,6 +513,15 @@ const routes = [
title: '标准清单发布/更新流程'
}
},
{
path: '/policyConsultation',
name: 'policyConsultation',
component: () => import('@/pages/processCenter/pages/creatProcess/policyConsultation/index.vue'),
meta: {
requireAuth: true,
title: '政策征求意见流程'
}
},
{
path: '/zczqyjStep1',
name: 'zczqyjStep1',