183 lines
7.9 KiB
Vue
183 lines
7.9 KiB
Vue
<template>
|
|
<div class="AddFileDetails">
|
|
<div class="left">
|
|
<iframe name = "iframeMap" id="iframeMapViewComponent" v-bind:src="'/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + $route.query.attId)"
|
|
width="100%" height="100%"
|
|
frameborder="0" scrolling="no" ref="iframeDom"
|
|
></iframe>
|
|
</div>
|
|
<div class="rightDiv">
|
|
<div class="height">
|
|
新增意见
|
|
</div>
|
|
<div class="search-area">
|
|
<el-form style="width: 100%;" :model="opinionContent" ref="formAdd" :rules="opinionContentRules" class="label-input-form">
|
|
<el-form-item label="章节编号" label-width="" prop="partCode" class="add-form-item">
|
|
<el-select filterable v-model="opinionContent.partCode" 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" label-width="" class="add-form-item">
|
|
<el-input v-model="opinionContent.chapterName" autocomplete="off" placeholder="请输入"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="修改前" label-width="" class="add-form-item">
|
|
<div v-html="opinionContent.oldText" style="margin: 56px 0 0 10px;"></div>
|
|
</el-form-item>
|
|
<el-form-item label="修改后" prop="newText" label-width="" class="add-form-item">
|
|
<el-input v-model="opinionContent.newText" autocomplete="off" placeholder="请输入"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="修改理由" prop="reason" label-width="" class="add-form-item">
|
|
<el-input v-model="opinionContent.reason" autocomplete="off" placeholder="请输入修改理由"></el-input>
|
|
</el-form-item>
|
|
<!-- <el-form-item label="原因" prop="cause" label-width="" class="add-form-item">-->
|
|
<!-- <el-input v-model="opinionContent.cause" autocomplete="off" placeholder="请输入原因"></el-input>-->
|
|
<!-- </el-form-item>-->
|
|
</el-form>
|
|
</div>
|
|
<div class="demo-drawer-footer">
|
|
<el-button :loading="isSubmit" size="mini" class="common-button-primary" icon="el-icon-check" type="primary" @click="saveUserInfo">
|
|
提交
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "AddFileDetails",
|
|
data () {
|
|
return {
|
|
options: [],
|
|
opinionContent: { // 抽屉数据
|
|
partCode: '',
|
|
oldText: '',
|
|
newText: '',
|
|
reason: '',
|
|
chapterName: '',
|
|
// cause: '',
|
|
},
|
|
opinionContentRules: {
|
|
partCode: [
|
|
{required: true, message: '请输入章节编号', trigger: 'blur'},
|
|
],
|
|
oldText: [
|
|
{required: true, message: '请输入修改前内容', trigger: 'blur'}
|
|
],
|
|
newText: [
|
|
{required: true, message: '请输入修改后内容', trigger: 'blur'}
|
|
],
|
|
reason: [
|
|
{required: true, message: '请输入修改理由', trigger: 'blur'}
|
|
],
|
|
},
|
|
isSubmit: false,
|
|
}
|
|
},
|
|
methods: {
|
|
saveUserInfo () {
|
|
this.$refs['formAdd'].validate((valid) => {
|
|
if (valid) {
|
|
this.isSubmit = true
|
|
var form = {
|
|
ideaId: this.$route.query.ideaId,
|
|
cid: this.$route.query.cid,
|
|
oldText: this.opinionContent.oldText,
|
|
newText: this.opinionContent.newText,
|
|
reason: this.opinionContent.reason,
|
|
partCode: this.opinionContent.partCode,
|
|
chapterName: this.opinionContent.chapterName,
|
|
// cause: this.opinionContent.cause,
|
|
userId: this.$route.query.userId || '',
|
|
userName: this.$route.query.userName || '',
|
|
deptName: this.$route.query.institutionName || '',
|
|
deptId: this.$route.query.institutionId || '',
|
|
}
|
|
this.$http.post('slrs/sar-public-idea-all/insetStand', form, {
|
|
_this: this
|
|
}, res => {
|
|
if (res.respCode === '200') {
|
|
// 储存变量监听刷新页面
|
|
this.$store.commit('SET_REFRESH_FLAG', true)
|
|
localStorage.setItem('freshClueNum', new Date().getTime())
|
|
this.isSubmit = false
|
|
this.opinionContent.partCode = ''
|
|
this.opinionContent.reason = ''
|
|
this.opinionContent.oldText = ''
|
|
this.opinionContent.newText = ''
|
|
// this.opinionContent.cause = ''
|
|
this.opinionContent.chapterName = ''
|
|
}
|
|
})
|
|
}
|
|
})
|
|
},
|
|
optionsChange (data) {
|
|
for (let a = 0; a < this.options.length; a++) {
|
|
if (data === this.options[a].itemsNum) {
|
|
this.opinionContent.oldText = this.options[a].termsConditions
|
|
this.opinionContent.chapterName = this.options[a].itemsName
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', {
|
|
standId: this.$route.query.standId,
|
|
fileType: this.$route.query.fileType,
|
|
pageSize: 9999,
|
|
page: 1
|
|
}, {}, res => {
|
|
if (res.ok) {
|
|
this.options = res.data.list
|
|
}
|
|
}, e => {
|
|
})
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
@import '~@/assets/styles/mixins';
|
|
@import '~@/assets/styles/style';
|
|
.AddFileDetails {
|
|
height: 100%;
|
|
display: flex;
|
|
.left {
|
|
width: 60%;
|
|
height: 100%;
|
|
}
|
|
.rightDiv {
|
|
background: #fff;
|
|
width: 40%;
|
|
height: 100%;
|
|
.height {
|
|
margin-bottom: 0;
|
|
padding: 10px 20px;
|
|
font-size: 18px;
|
|
font-weight: bold;
|
|
color: #333333;
|
|
border-bottom: 1px solid #e5e5e5;
|
|
}
|
|
.search-area {
|
|
height: calc(~'100% - 90px');
|
|
overflow: auto;
|
|
}
|
|
.demo-drawer-footer {
|
|
width: 100%;
|
|
padding: 0 20px;
|
|
height: 50px;
|
|
line-height: 50px;
|
|
border-top: 1px solid #e8e8e8;
|
|
text-align: right;
|
|
background: #fff;
|
|
z-index: 999;
|
|
}
|
|
}
|
|
}
|
|
</style>
|