commit
This commit is contained in:
@@ -1,114 +1,113 @@
|
||||
<!--征求意见详情-->
|
||||
<template>
|
||||
<div class="consultationDetails">
|
||||
<div class="contentTitle">
|
||||
<div class="back" title="返回" @click="back">
|
||||
<i class="el-icon-back"></i>
|
||||
<div class="consultationDetails">
|
||||
<div class="contentTitle">
|
||||
<div class="back" title="返回" @click="back">
|
||||
<i class="el-icon-back"></i>
|
||||
</div>
|
||||
<div class="title">征求意见详情<i class="el-icon-s-order" @click="heightShow = !heightShow"></i></div>
|
||||
</div>
|
||||
<div class="title">征求意见详情<i class="el-icon-s-order" @click="heightShow = !heightShow"></i></div>
|
||||
</div>
|
||||
<transition name="el-zoom-in-top">
|
||||
<div v-show="heightShow" class="transition-box">
|
||||
<p class="transition-box-p">
|
||||
<label class="transition-box-label">标准号:</label>
|
||||
<span class="transition-box-span">{{ this.$route.query.item.categorg }}</span>
|
||||
</p>
|
||||
<p class="transition-box-p">
|
||||
<label class="transition-box-label">标准名称:</label>
|
||||
<span class="transition-box-span">{{ this.$route.query.item.cname || '-' }}</span>
|
||||
</p>
|
||||
<p class="transition-box-p">
|
||||
<label class="transition-box-label">上传时间:</label>
|
||||
<span class="transition-box-span">{{ this.$route.query.item.starttime || '-' }}</span>
|
||||
</p> <p class="transition-box-p">
|
||||
<label class="transition-box-label">征求意见周期:</label>
|
||||
<span class="transition-box-span">{{ this.$route.query.item.endtime || '-' }}</span>
|
||||
</p>
|
||||
<transition name="el-zoom-in-top">
|
||||
<div v-show="heightShow" class="transition-box">
|
||||
<p class="transition-box-p">
|
||||
<label class="transition-box-label">标准号:</label>
|
||||
<span class="transition-box-span">{{ this.$route.query.item.categorg }}</span>
|
||||
</p>
|
||||
<p class="transition-box-p">
|
||||
<label class="transition-box-label">标准名称:</label>
|
||||
<span class="transition-box-span">{{ this.$route.query.item.cname || '-' }}</span>
|
||||
</p>
|
||||
<p class="transition-box-p">
|
||||
<label class="transition-box-label">上传时间:</label>
|
||||
<span class="transition-box-span">{{ this.$route.query.item.starttime || '-' }}</span>
|
||||
</p> <p class="transition-box-p">
|
||||
<label class="transition-box-label">征求意见周期:</label>
|
||||
<span class="transition-box-span">{{ this.$route.query.item.endtime || '-' }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</transition>
|
||||
<div class="effect">
|
||||
<el-button type="primary" class="common-button-primary" size="mini" @click="selectStandardPro('add')">添加</el-button>
|
||||
<el-button type="primary" class="common-button-primary" size="mini" @click="exportAll">导出</el-button>
|
||||
</div>
|
||||
</transition>
|
||||
<div class="effect">
|
||||
<el-button type="primary" class="common-button-primary" size="mini" @click="addModel">添加</el-button>
|
||||
</div>
|
||||
<div class="container" style="position:relative;">
|
||||
<div style="position: absolute;top: 0;left: 0;bottom: 0;right: 0;">
|
||||
<el-table
|
||||
:data="standinfoList"
|
||||
height="100%"
|
||||
border
|
||||
style="width: 100%"
|
||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||||
<div class="container" style="position:relative;">
|
||||
<div style="position: absolute;top: 0;left: 0;bottom: 0;right: 0;">
|
||||
<el-table
|
||||
:data="standinfoList"
|
||||
height="100%"
|
||||
border
|
||||
style="width: 100%"
|
||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||||
fontWeight: 'bold', height: '48px'}">
|
||||
<el-table-column
|
||||
prop="partCode"
|
||||
label="章节编号"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="countent"
|
||||
label="修改意见内容(包括理由或依据)"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="department"
|
||||
label="提出部门"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="user"
|
||||
label="提出人"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="50" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<div @click.stop style="display: inline-block">
|
||||
<el-dropdown trigger="click" @command="handleCommand">
|
||||
<i v-if="scope.row.user === $store.getters.userInfo.userId" class="iconfont"></i>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-if="scope.row.user === $store.getters.userInfo.userId" :command="[scope.row, '编辑']">编辑</el-dropdown-item>
|
||||
<el-dropdown-item v-if="" :command="[scope.row, '删除']">删除</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table-column
|
||||
prop="partCode"
|
||||
label="章节编号"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="content"
|
||||
label="修改意见内容(包括理由或依据)"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="deptName"
|
||||
label="提出部门"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="userName"
|
||||
label="提出人"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="50" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<div @click.stop style="display: inline-block">
|
||||
<el-dropdown trigger="click" @command="handleCommand">
|
||||
<i v-if="scope.row.userId === $store.getters.userInfo.userId" class="iconfont"></i>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-if="scope.row.userId === $store.getters.userInfo.userId" :command="[scope.row, '编辑']">编辑</el-dropdown-item>
|
||||
<el-dropdown-item :command="[scope.row, '删除']">删除</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<pagination
|
||||
style="position: static;"
|
||||
style="position: static;width: 100%;"
|
||||
:page="form.page"
|
||||
:total="total"
|
||||
@pageChange="handlePageChange"
|
||||
@pageSizeChange="handlePageSizeChange"></pagination>
|
||||
<el-drawer
|
||||
:title=opiniontitle
|
||||
:visible.sync="isDialog"
|
||||
:wrapperClosable="false"
|
||||
size="1050px"
|
||||
destroy-on-close
|
||||
:before-close="closeDrawer"
|
||||
>
|
||||
<div class="demo-drawer-content add-demo">
|
||||
<div class="search-area">
|
||||
<el-form :model="opinionContent" class="label-input-form">
|
||||
<el-form-item label="章节编号" label-width="80px" class="add-form-item">
|
||||
<el-input v-model="opinionContent.partCode" autocomplete="off" placeholder="请输入章节编号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="修改意见内容(包括理由或依据)" label-width="" class="add-form-item">
|
||||
<el-input :autosize="{ minRows: 2, maxRows: 8}" type="textarea" v-model="opinionContent.content" autocomplete="off" placeholder="请输入修改意见内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="demo-drawer-footer">
|
||||
<el-button :loading="isSubmit" class="common-button-primary" icon="el-icon-check" type="primary" @click="saveUserInfo">提交</el-button>
|
||||
<el-button class="common-button-default" icon="el-icon-close" @click="closeDrawer">取消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<loading :loading="spinShow">数据加载中……</loading>
|
||||
</div>
|
||||
<el-drawer
|
||||
:title=opiniontitle
|
||||
:visible.sync="isDialog"
|
||||
:wrapperClosable="false"
|
||||
size="1050px"
|
||||
destroy-on-close
|
||||
:before-close="closeDrawer"
|
||||
>
|
||||
<div class="demo-drawer-content add-demo">
|
||||
<div class="search-area">
|
||||
<el-form :model="opinionContent" class="label-input-form">
|
||||
<el-form-item label="章节编号" label-width="80px" class="add-form-item">
|
||||
<el-input v-model="opinionContent.number" autocomplete="off" placeholder="请输入章节编号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="修改意见内容(包括理由或依据)" label-width="" class="add-form-item">
|
||||
<el-input :autosize="{ minRows: 2, maxRows: 8}" type="textarea" v-model="opinionContent.content" autocomplete="off" placeholder="请输入修改意见内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="demo-drawer-footer">
|
||||
<el-button :loading="isSubmit" class="common-button-primary" icon="el-icon-check" type="primary" @click="saveUserInfo">提交</el-button>
|
||||
<el-button class="common-button-default" icon="el-icon-close" @click="closeDrawer">取消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<loading :loading="spinShow">数据加载中……</loading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -116,99 +115,144 @@ export default {
|
||||
name: 'consultationDetails',
|
||||
data () {
|
||||
return {
|
||||
spinShow: false,
|
||||
total: 0,
|
||||
opiniontitle: '新增意见',
|
||||
isDialog: false, //新增抽屉状态
|
||||
heightShow: true,
|
||||
isSubmit: false,
|
||||
opinionContent: {
|
||||
number:'',
|
||||
content: '',
|
||||
},
|
||||
standinfoList: [],
|
||||
form: {
|
||||
cid: this.$route.query.item.cid,
|
||||
page: 1,
|
||||
size: this.$store.getters.userInfo.configContent
|
||||
}
|
||||
id: '', // 选中id
|
||||
type: '', // 选中状态
|
||||
spinShow: false,
|
||||
total: 0, // 总数
|
||||
opiniontitle: '新增意见', // 抽屉标题
|
||||
isDialog: false, //新增抽屉状态
|
||||
heightShow: true, // 高度
|
||||
isSubmit: false,
|
||||
opinionContent: { // 抽屉数据
|
||||
partCode: '',
|
||||
content: '',
|
||||
},
|
||||
standinfoList: [], // 详情列表
|
||||
form: {
|
||||
cid: this.$route.query.item.cid,
|
||||
page: 1,
|
||||
size: this.$store.getters.userInfo.configContent
|
||||
} // 详情数据
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.spinShow = true
|
||||
this.$http.get('sys/sar-public-idea-all/getallStand', this.form, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.standinfoList = res.data.records
|
||||
this.total = res.data.total
|
||||
this.spinShow = false
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
//分页数据改变
|
||||
handlePageChange(page) {
|
||||
this.form.page = page
|
||||
this.getList()
|
||||
},
|
||||
handlePageSizeChange(pageSize) {
|
||||
this.$store.getters.userInfo.configContent = pageSize
|
||||
this.form.size = pageSize
|
||||
this.getList()
|
||||
},
|
||||
back (){
|
||||
this.$router.push({
|
||||
name:'standardForComments'
|
||||
})
|
||||
},
|
||||
// 更多
|
||||
handleCommand (command) {
|
||||
switch (command[1]) {
|
||||
case '编辑':
|
||||
this.selectStandardPro(command[0], 'edit')
|
||||
break
|
||||
case '删除':
|
||||
this.deleteStand(1, command[0].id)
|
||||
break
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
selectStandardPro(){
|
||||
this.opiniontitle = '编辑意见内容'
|
||||
this.isDialog = true
|
||||
},
|
||||
//删除
|
||||
deleteStand(flag,itemid){
|
||||
if(flag === 1){
|
||||
(
|
||||
this.$confirm('确认删除这些意见?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
roundButton: false
|
||||
}).then(() => {
|
||||
//确认事件
|
||||
}).catch(() => {
|
||||
//取消事件
|
||||
exportAll () {
|
||||
window.open('/api/slrs/sar-public-idea-all/tuallStand?cid=' + this.$route.query.item.cid)
|
||||
},
|
||||
// 获取详情信息列表
|
||||
getList() {
|
||||
this.spinShow = true
|
||||
this.$http.get('slrs/sar-public-idea-all/getAllStand', this.form, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.standinfoList = res.data.records
|
||||
this.total = res.data.total
|
||||
this.spinShow = false
|
||||
}, e => {
|
||||
})
|
||||
)
|
||||
}
|
||||
},
|
||||
//新增意见模态窗
|
||||
addModel() {
|
||||
this.opiniontitle = '新增意见'
|
||||
this.isDialog = true
|
||||
},
|
||||
//点击抽屉按钮提交事件
|
||||
saveUserInfo() {
|
||||
this.isDialog = false
|
||||
},
|
||||
//点击抽屉按钮取消事件
|
||||
closeDrawer() {
|
||||
this.isDialog = false
|
||||
},
|
||||
|
||||
},
|
||||
//分页数据改变
|
||||
handlePageChange(page) {
|
||||
this.form.page = page
|
||||
this.getList()
|
||||
},
|
||||
handlePageSizeChange(pageSize) {
|
||||
this.$store.getters.userInfo.configContent = pageSize
|
||||
this.form.size = pageSize
|
||||
this.getList()
|
||||
},
|
||||
back (){
|
||||
this.$router.push({
|
||||
name:'standardForComments'
|
||||
})
|
||||
},
|
||||
// 更多
|
||||
handleCommand (command) {
|
||||
switch (command[1]) {
|
||||
case '编辑':
|
||||
this.selectStandardPro('edit', command[0])
|
||||
break
|
||||
case '删除':
|
||||
this.deleteStand(command[0].id)
|
||||
break
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
selectStandardPro(type, row){
|
||||
this.type = type
|
||||
if (type === 'edit') {
|
||||
this.id = row.id
|
||||
this.opiniontitle = '编辑意见内容'
|
||||
this.opinionContent.partCode = row.partCode
|
||||
this.opinionContent.content = row.content
|
||||
} else {
|
||||
this.id = ''
|
||||
this.opiniontitle = '新增意见'
|
||||
this.opinionContent.partCode = ''
|
||||
this.opinionContent.content = ''
|
||||
}
|
||||
this.isDialog = true
|
||||
},
|
||||
//删除
|
||||
deleteStand(id){
|
||||
this.$confirm('确认删除这些意见?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
roundButton: false
|
||||
}).then(() => {
|
||||
var form = {
|
||||
id: id,
|
||||
autUserId: this.$store.getters.userInfo.userId,
|
||||
userId: this.$store.getters.userInfo.userId
|
||||
}
|
||||
this.$http.get('slrs/sar-public-idea-all/deleteStand', form, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.$message.warning(res.message)
|
||||
this.form.page = 1
|
||||
this.getList()
|
||||
})
|
||||
//确认事件
|
||||
}).catch(() => {
|
||||
this.$message.warning('取消删除')
|
||||
//取消事件
|
||||
})
|
||||
},
|
||||
//点击抽屉按钮提交事件
|
||||
saveUserInfo() {
|
||||
var url = ''
|
||||
var form = {
|
||||
cid: this.$route.query.item.cid,
|
||||
content: this.opinionContent.content,
|
||||
partCode: this.opinionContent.partCode,
|
||||
userId: this.$store.getters.userInfo.userId,
|
||||
userName: this.$store.getters.userInfo.account,
|
||||
deptName: this.$store.getters.userInfo.orgName,
|
||||
deptId: this.$store.getters.userInfo.orgId
|
||||
}
|
||||
if (this.type === 'edit') {
|
||||
form.id = this.id
|
||||
form.autUserId = this.$store.getters.userInfo.userId
|
||||
url = 'slrs/sar-public-idea-all/updateStand'
|
||||
} else {
|
||||
url = 'slrs/sar-public-idea-all/insetStand'
|
||||
}
|
||||
this.$http.post(url, form, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.respCode === '200') {
|
||||
this.form.page = 1
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
this.isDialog = false
|
||||
},
|
||||
//点击抽屉按钮取消事件
|
||||
closeDrawer() {
|
||||
this.isDialog = false
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.getList()
|
||||
@@ -296,14 +340,13 @@ export default {
|
||||
}
|
||||
}
|
||||
.effect {
|
||||
margin-left: 10px;
|
||||
margin-bottom: 10px;
|
||||
margin: 10px 10px 0 0;
|
||||
}
|
||||
.container {
|
||||
height: calc(~'100% - 52px - 55px - 50px');
|
||||
flex: auto;
|
||||
display: flex;
|
||||
margin:10px;
|
||||
margin:10px 0;
|
||||
flex-direction: column;
|
||||
.el-tabs{
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user