523 lines
15 KiB
Vue
523 lines
15 KiB
Vue
<template>
|
|
<div class="bzdyStep9">
|
|
<!-- 标准调研流程-->
|
|
<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>
|
|
<div class="content" v-show="active === '1'">
|
|
<div style="flex: auto; overflow: auto;">
|
|
<el-form
|
|
ref="bzzqyjForm"
|
|
:model="form"
|
|
: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="24">
|
|
<el-form-item label="标准编号/名称" prop="cid" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
disabled
|
|
v-model="form.cid"
|
|
placeholder="请输入标准编号"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="征求意见结束日期" prop="endTime" class="add-form-item form-item-disabled">
|
|
<el-date-picker
|
|
disabled
|
|
v-model="form.endTime"
|
|
type="date"
|
|
placeholder="请选择结束日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="标准附件" prop="fjListId" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
v-model="form.fjListId"
|
|
style="display: none;"
|
|
></el-input>
|
|
<div style="display: flex;">
|
|
<div class="table-jump" @click="updataFj(item)" style="margin-right: 15px;padding-left: 10px" v-for="(item, index) in form.fjList" :key="index">
|
|
{{ item.fileName }}
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</div>
|
|
</el-form>
|
|
<ProcessTitle>
|
|
<template slot="title">征求意见列表</template>
|
|
</ProcessTitle>
|
|
<div class="button-list">
|
|
<el-button type="primary"
|
|
class="common-button-primary add-button"
|
|
@click="upload(data, '汇总单.xls')"
|
|
size="mini">导出汇总单
|
|
</el-button>
|
|
<el-button type="primary"
|
|
class="common-button-primary add-button"
|
|
@click="upload(oldData, '征求意见搞.xls')"
|
|
size="mini">导出征求意见搞
|
|
</el-button>
|
|
</div>
|
|
<el-table
|
|
ref="multipleTable"
|
|
:data="data"
|
|
tooltip-effect="dark"
|
|
border
|
|
style="width: 100%; flex: auto;"
|
|
class="drag-table"
|
|
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
|
|
fontWeight: 'bold', height: '48px'}">
|
|
<el-table-column
|
|
type="index"
|
|
label="序号"
|
|
width="55"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="chapterNumber"
|
|
align="center"
|
|
sortable
|
|
label="章条编号"
|
|
width="170px">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="chapterName"
|
|
align="center"
|
|
label="章节名称">
|
|
</el-table-column>
|
|
<el-table-column
|
|
align="center"
|
|
prop="commentText"
|
|
label="修改意见内容(包括理由或依据)">
|
|
<el-table-column
|
|
prop="oldText"
|
|
align="center"
|
|
label="修改前">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="newText"
|
|
align="center"
|
|
label="修改后">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="reason"
|
|
align="center"
|
|
label="修改理由">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="department"
|
|
align="center"
|
|
label="提出部门">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="responUserName"
|
|
align="center"
|
|
label="提出人">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="state"
|
|
align="center"
|
|
label="处理意见">
|
|
<template slot-scope="scope">
|
|
<div>{{ stateText(scope.row.state) }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<el-collapse accordion>
|
|
<el-collapse-item title="意见填写">
|
|
<div style="margin: 10px 0;">
|
|
<el-input
|
|
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'">
|
|
<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"
|
|
sortable="custom"
|
|
>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="assignee"
|
|
label="任务受理人"
|
|
align="center"
|
|
sortable="custom"
|
|
>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="createTime"
|
|
label="创建时间"
|
|
sortable="custom"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD") : "" }}</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") : "" }}</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 ? "已完成" : "未完成" }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<ProcessFooter
|
|
show-submit
|
|
:submitLoading="isSubmit"
|
|
:saveLoading="saveLoading"
|
|
@save="handleSave"
|
|
@submit="handleSubmit"
|
|
show-back
|
|
@back="handleSubmitNo"
|
|
approval
|
|
submitBTNText="同意"
|
|
show-transfer
|
|
@transfer="handleTransfer"
|
|
>
|
|
</ProcessFooter>
|
|
<Role-tree
|
|
check-box
|
|
is-title="转办处理人"
|
|
:is-visible.sync="drawerModal"
|
|
@checkedRole="checkedRole"
|
|
></Role-tree>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import ProcessHeader from "../../components/ProcessHeader";
|
|
import ProcessFooter from "../../components/ProcessFooter";
|
|
import ProcessTitle from "../../components/ProcessTitle";
|
|
import { inboundLiaisonDetail, processCreateStand, changeAssigneeNew } from "api/process";
|
|
import axios from "axios";
|
|
|
|
export default {
|
|
name: "bzzqyjStep9",
|
|
data() {
|
|
return {
|
|
drawerModal: false,
|
|
histortData: [],
|
|
oldData: [],
|
|
data: [],
|
|
commentText: "",
|
|
taskIds: this.$route.query.taskIds,
|
|
pId: this.$route.query.prcId,
|
|
roleRow: {},
|
|
nodeList: [],
|
|
type: "",
|
|
defaultProps: {
|
|
children: "children",
|
|
label: "name"
|
|
},
|
|
treeData: [], // 人员数据
|
|
modalshowflag: false, // drawer开关
|
|
drawerTitle: "", //drawer标题
|
|
textarea: "", // 意见
|
|
ListModel: false, // 新增编辑抽屉开关
|
|
active: "1", // 默认显示
|
|
isSubmit: false,
|
|
saveLoading: false,
|
|
form: {
|
|
cid: "", // 编号
|
|
endTime: "", // 结束日期
|
|
cname: "", // 名称
|
|
fjList: [],
|
|
fjListId: '',
|
|
},
|
|
formRules: {
|
|
responUserList: [
|
|
{required: true, message: "请选择责任人", trigger: "change"}
|
|
]
|
|
},
|
|
json: {}
|
|
};
|
|
},
|
|
components: {
|
|
ProcessHeader,
|
|
ProcessFooter,
|
|
ProcessTitle
|
|
},
|
|
methods: {
|
|
handleTransfer() {
|
|
this.drawerModal = true
|
|
},
|
|
checkedRole (data) {
|
|
changeAssigneeNew({
|
|
taskId: this.$route.query.taskIds, // 任务id
|
|
userId:this.$store.getters.userInfo.userId, // 委托人
|
|
assignee: data[0].id, // 被委托人
|
|
pId: this.$route.query.prcId, // 流程实例
|
|
}).then(res => {
|
|
if (res.success) {
|
|
this.drawerModal = false
|
|
this.$message.success('调整成功')
|
|
this.processNum()
|
|
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
|
|
} else {
|
|
this.$message.warning(res.message)
|
|
}
|
|
})
|
|
},
|
|
// 请求转换流程图
|
|
processNum (row) {
|
|
axios.request({
|
|
url: '/api/lawss/activiti/getImg?_t=' + new Date().getTime(),
|
|
responseType: 'blob',
|
|
method: 'get',
|
|
params: {
|
|
prcNum: this.$route.query.prcNum
|
|
}
|
|
}).then(res => {
|
|
this.processStep = window.URL.createObjectURL(res.data)
|
|
})
|
|
},
|
|
updataFj(item) {
|
|
let id
|
|
let type = item.fileName.split('.')
|
|
if (type[1] === 'pdf') {
|
|
id = item.attId
|
|
} else {
|
|
id = item.oriAttId
|
|
}
|
|
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + id))
|
|
},
|
|
getHistoryData() {
|
|
this.$http.get("lawss/activiti/get_list_by_instance", {
|
|
prcNum: this.$route.query.prcNum
|
|
}, {}, res => {
|
|
this.histortData = res;
|
|
}, e => {
|
|
});
|
|
},
|
|
upload(row, title) {
|
|
var params = {
|
|
columnName: {
|
|
chapterNumber: "章条编号",
|
|
chapterName: "章节名称",
|
|
commentText: "修改意见内容(包括理由或依据)",
|
|
department: "提出部门",
|
|
responUserName: "提出人",
|
|
stateText: "处理意见"
|
|
},
|
|
dataList: []
|
|
};
|
|
params.dataList = JSON.parse(JSON.stringify(row));
|
|
params.dataList.forEach(item => {
|
|
if (item.state === "1") {
|
|
item.stateText = "上报";
|
|
} else if (item.state === "2") {
|
|
item.stateText = "处理后上报";
|
|
} else {
|
|
item.stateText = "不上报";
|
|
}
|
|
});
|
|
this.$http.downloadFile("/api/lawss/activiti/export_excel", params, title, res => {
|
|
});
|
|
},
|
|
stateText(row) {
|
|
if (row === "1") {
|
|
return "上报";
|
|
} else if (row === "2") {
|
|
return "处理后上报";
|
|
}
|
|
},
|
|
handleTabs(name) {
|
|
this.active = name;
|
|
},
|
|
handleSave() {
|
|
},
|
|
handleSubmit() {
|
|
if (this.data.length < 1) {
|
|
this.$message.warning("请输入征求意见搞");
|
|
} else {
|
|
this.isSubmit = true;
|
|
var json = this.json;
|
|
json.actionFlag = 0;
|
|
json.commentText = this.commentText;
|
|
this.$http.post("lawss/activiti/completeTask", {
|
|
json: JSON.stringify(json),
|
|
taskId: this.taskIds,
|
|
userId: this.$store.getters.userInfo.userId
|
|
}, {}, res => {
|
|
if (res.success) {
|
|
this.$message.success("提交成功");
|
|
this.$router.push("/processCenter");
|
|
}
|
|
this.isSubmit = false;
|
|
});
|
|
}
|
|
},
|
|
handleSubmitNo() {
|
|
if (this.commentText) {
|
|
this.isSubmit = true;
|
|
var json = this.json;
|
|
json.actionFlag = 1;
|
|
json.commentText = this.commentText;
|
|
this.$http.post("lawss/activiti/completeTask", {
|
|
json: JSON.stringify(json),
|
|
taskIds: this.taskIds,
|
|
userId: this.$store.getters.userInfo.userId
|
|
}, {}, res => {
|
|
if (res.success) {
|
|
this.$message.success("驳回成功");
|
|
this.$router.push("/processCenter");
|
|
}
|
|
this.isSubmit = false;
|
|
});
|
|
} else {
|
|
this.$message.warning("请输入反馈意见");
|
|
}
|
|
},
|
|
getData() {
|
|
return new Promise((resolve, reject) => {
|
|
inboundLiaisonDetail({
|
|
taskIds: this.taskIds,
|
|
pId: this.pId
|
|
}).then(res => {
|
|
let data = JSON.parse(res.mesg)
|
|
this.form.fjList = data.fjList || data.form.fjList
|
|
this.form.fjListId = data.fjListId || data.form.fjListId
|
|
this.form.cid = data.cid || data.form.cid;
|
|
this.form.endTime = data.endTime || data.form.endTime;
|
|
this.form.cname = data.cname || data.form.cname;
|
|
this.oldData = JSON.parse(JSON.stringify(data.info))
|
|
var arr = []
|
|
data.info.forEach(item => {
|
|
if (item.state != '3') {
|
|
arr.push(item)
|
|
}
|
|
})
|
|
this.json = data
|
|
this.data = arr
|
|
this.oldData = data.oldinfo
|
|
}).catch(e => {
|
|
});
|
|
});
|
|
}
|
|
},
|
|
mounted() {
|
|
this.getHistoryData();
|
|
this.getData();
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
@import '~@/assets/styles/style';
|
|
|
|
.bzdyStep9 {
|
|
/deep/ .el-drawer__container {
|
|
.prc-content-border {
|
|
border: none;
|
|
padding: 0 20px 0;
|
|
}
|
|
}
|
|
|
|
.fileClass {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.fileClass:hover {
|
|
color: #0c91e5;
|
|
}
|
|
|
|
position: relative;
|
|
height: 100%;
|
|
|
|
.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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|