This commit is contained in:
zhutianqi
2021-12-14 14:40:39 +08:00
parent d41aa6f0f8
commit 2dbbb452d5
5 changed files with 241 additions and 6 deletions
@@ -3,7 +3,7 @@
<!-- 标准调研流程-->
<ProcessHeader toggle>
<template slot="proName">标准征求意见流程</template>
<template slot="proNode">责任部门对接人汇总并选择审批人</template>
<template slot="proNode">审批人审批</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
@@ -3,7 +3,7 @@
<!-- 标准调研流程-->
<ProcessHeader toggle>
<template slot="proName">标准征求意见流程</template>
<template slot="proNode">责任部门对接人汇总并选择审批人</template>
<template slot="proNode">标准法规工程师分线审核</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
@@ -77,6 +77,20 @@
<ProcessTitle>
<template slot="title">征求意见列表</template>
</ProcessTitle>
<div class="button-list">
<el-button type="primary"
class="common-button-primary add-button"
:disabled="acceptShow"
@click="addModal"
size="mini">新增
</el-button>
<el-button type="primary"
class="common-button-primary add-button"
:disabled="acceptShow"
@click="addDelete"
size="mini">删除
</el-button>
</div>
<el-table
ref="multipleTable"
:data="data"
@@ -86,7 +100,13 @@
class="drag-table"
:default-sort = "{prop: 'chapterNumber', order: 'ascending'}"
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}">
fontWeight: 'bold', height: '48px'}"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
type="index"
label="序号"
@@ -139,6 +159,14 @@
align="center"
label="提出人">
</el-table-column>
<el-table-column
label="操作"
width="100"
align="center">
<template slot-scope="scope">
<el-button class="common-button-primary" size="mini" type="primary" @click="itemEdit(scope.row)">编辑</el-button>
</template>
</el-table-column>
</el-table>
</div>
<el-collapse accordion>
@@ -245,6 +273,54 @@
@checkedRole="checkedRole2"
:nodeList="nodeList"
></Role-tree>
<el-drawer
title="编辑"
:visible.sync="modalshowflag2"
:wrapperClosable="false"
size="800px">
<div class="demo-drawer-content">
<el-form :model="editForm" class="label-input-form" ref="plForm" label-width=150>
<el-form-item label="章节编号" prop="chapterNumber" class="add-form-item" >
<el-select filterable v-model="editForm.chapterNumber" placeholder="请选择条款章节" @change="optionsChange">
<el-option
v-for="(item,index) in options"
:key="index"
:label="item.itemsNum"
:value="item.itemsNum"></el-option>
</el-select>
</el-form-item>
<el-form-item label="章节名称" prop="chapterName" class="add-form-item">
<el-input
v-model="editForm.chapterName"
placeholder="请输入章节名称"
maxlength="500"
disabled
></el-input>
</el-form-item>
<el-form-item label="修改前" prop="oldText" class="add-form-item">
<div v-html="editForm.oldText" style="margin: 56px 0 0 10px;"></div>
</el-form-item>
<el-form-item label="修改后" prop="newText" class="add-form-item" >
<el-input
v-model="editForm.newText"
placeholder="请输入修改后内容"
maxlength="500"
></el-input>
</el-form-item>
<el-form-item label="修改理由" prop="reason" class="add-form-item" >
<el-input
v-model="editForm.reason"
placeholder="请输入修改理由"
maxlength="500"
></el-input>
</el-form-item>
</el-form>
</div>
<div id="roleFormButton3" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveUserInfo2">确定</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancleUserInfo2">取消</el-button>
</div>
</el-drawer>
</div>
</template>
@@ -259,6 +335,18 @@ export default {
name: "bzzqyjStep4",
data() {
return {
acceptShow: false,
idList: [],
options: [],
itemId: '',
modalshowflag2: false,
editForm: {
chapterNumber: '',
chapterName: '',
oldText: '',
newText: '',
reason: '',
},
itermsConditionsFlag: false,
itermsConditionsTitle: '',
drawerModal: false,
@@ -308,6 +396,107 @@ export default {
ProcessTitle
},
methods: {
handleSelectionChange(val) {
this.idList = []
val.forEach(item => {
this.idList.push(item.id)
})
},
addDelete() {
if (this.idList.length > 0) {
this.$confirm('删除选中数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
for (let a = 0; a < this.data.length; a++) {
this.idList.forEach(item => {
if (this.data[a].id === item) {
this.data.splice(a, 1)
}
})
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
} else {
this.$message.warning('请选择要删除的数据')
}
},
addModal() {
var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
var json = {
chapterNumber: '',
chapterName: '',
commentText: '',
oldText: '',
newText: '',
reason: '',
id: id,
department: this.$store.getters.userInfo.upDeptName,
responUserName: this.$store.getters.userInfo.userName,
}
this.data.push(json)
this.itemId = id
this.editForm = {
chapterNumber: '',
chapterName: '',
oldText: '',
newText: '',
reason: '',
}
this.modalshowflag2 = true
},
getItemList (standId, fileType) { // 查询分解单条款数据
this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', {
standId: standId,
fileType: fileType,
pageSize: 9999,
page: 1
}, {}, res => {
if (res.ok) {
this.options = res.data.list
}
}, e => {
})
},
optionsChange (data) {
for (let a = 0; a < this.options.length; a++) {
if (data === this.options[a].itemsNum) {
this.editForm.chapterName = this.options[a].itemsName
this.editForm.oldText = this.options[a].termsConditions
}
}
},
saveUserInfo2 () {
for( let a = 0; a < this.data.length; a++) {
if (this.data[a].id === this.itemId) {
this.data[a].chapterNumber = this.editForm.chapterNumber
this.data[a].chapterName = this.editForm.chapterName
this.data[a].oldText = this.editForm.oldText
this.data[a].newText = this.editForm.newText
this.data[a].reason = this.editForm.reason
}
}
this.modalshowflag2 = false
},
cancleUserInfo2 () {
this.modalshowflag2 = false
},
itemEdit (row) {
this.itemId = row.id
this.modalshowflag2 = true
this.editForm = {
chapterNumber: row.chapterNumber,
chapterName: row.chapterName,
oldText: row.oldText,
newText: row.newText,
reason: row.reason,
}
},
checkedRole2(data) {
this.form.spId = data[0].id
this.form.spName = data[0].name
@@ -429,6 +618,14 @@ export default {
pId: this.pId
}).then(res => {
let data = JSON.parse(res.mesg)
let commitStatus = res.commitStatus
if(commitStatus && commitStatus > 0){
this.acceptShow = true
this.submitShow = false
}else {
this.acceptShow = false
this.submitShow = true
}
this.form.fjList = data.fjList || data.form.fjList
if (data.fjListId === '') {
this.form.fjListId = ''
@@ -444,6 +641,7 @@ export default {
this.form.spId = data.spId || ''
this.form.spName = data.spName || ''
this.json = data
this.getItemList(data.standId,this.form.textValue)
this.data = data.info || data.data
}).catch(e => {
})
@@ -103,7 +103,7 @@
align="center"
label="修改意见内容(包括理由或依据)">
<el-table-column
prop="name"
prop="oldText"
align="center"
label="修改前">
<template slot-scope="scope">
@@ -111,12 +111,12 @@
</template>
</el-table-column>
<el-table-column
prop="name"
prop="newText"
align="center"
label="修改后">
</el-table-column>
<el-table-column
prop="name"
prop="reason"
align="center"
label="修改理由">
</el-table-column>
@@ -52,6 +52,16 @@
</div>
</div>
</el-form-item>
<el-form-item label="其他附件" prop="model" class="add-form-item form-item-disabled">
<div v-if="form.modelList.length > 0" style="display: flex;">
<div v-for="(item, index) in form.modelList" class="fileClass" :key="index" style="margin-right: 5px;" @click="updataFj(item)">
{{ item.name }}
</div>
</div>
<div v-else>
- -
</div>
</el-form-item>
</el-col>
</el-row>
</div>
@@ -108,6 +118,9 @@
prop="oldText"
align="center"
label="修改前">
<template slot-scope="scope">
<el-button size="mini" type="primary" :disabled="scope.row.chapterNumber.length === 0" @click="itermsConditionsOpen(scope.row.oldText)" class="common-button-primary">查看修改前内容</el-button>
</template>
</el-table-column>
<el-table-column
prop="newText"
@@ -233,6 +246,15 @@
:is-visible.sync="drawerModal"
@checkedRole="checkedRole"
></Role-tree>
<el-dialog
title="查看修改前内容"
:visible.sync="itermsConditionsFlag"
size="800px">
<div style="height: 500px;overflow: auto;" v-html="itermsConditionsTitle"></div>
<div slot="footer">
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="itermsConditionsClose">关闭</el-button>
</div>
</el-dialog>
</div>
</template>
@@ -247,6 +269,8 @@ export default {
name: "bzzqyjStep6",
data() {
return {
itermsConditionsFlag: false,
itermsConditionsTitle: '',
drawerModal: false,
histortData: [],
oldData: [],
@@ -278,6 +302,9 @@ export default {
cname: "", // 名称
fjList: [],
fjListId: '',
textType: '',
modelList: [],
modelNameList: '',
},
formRules: {
responUserList: [
@@ -293,6 +320,13 @@ export default {
ProcessTitle
},
methods: {
itermsConditionsClose () {
this.itermsConditionsFlag = false
},
itermsConditionsOpen (row) {
this.itermsConditionsFlag = true
this.itermsConditionsTitle = row
},
downloadFile (attId) {
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
},
@@ -453,6 +487,9 @@ export default {
}
})
this.json = data
this.form.textType = data.textType
this.form.modelList = data.modelList
this.form.modelNameList = data.modelNameList
this.data = arr
this.oldData = data.oldinfo
}).catch(e => {