This commit is contained in:
宋伟佳
2021-06-08 10:07:27 +08:00
4 changed files with 237 additions and 560 deletions
@@ -49,11 +49,11 @@
border border
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"> :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
<el-table-column <el-table-column
prop="categorg" prop="category"
label="标准" label="标准"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.categorg }}</a> <a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.category }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -137,7 +137,7 @@ export default {
sarStandCompareHis () { sarStandCompareHis () {
this.spinShow = true this.spinShow = true
var form = this.standCommonlySearch var form = this.standCommonlySearch
this.$http.get('sys/sar-public-idea/SelectAllP', form, { this.$http.get('slrs/sar-public-idea/SelectAllPage', form, {
_this: this _this: this
}, res => { }, res => {
this.standInfoList = res.data.records this.standInfoList = res.data.records
@@ -1,353 +0,0 @@
<!--管理征求意见详情-->
<template>
<div class="consultationDetails v-class">
<div class="contentTitle">
<div class="back" title="返回" @click="back">
<i class="el-icon-back"></i>
</div>
<div class="title">{{opinionList.standardName }}<i class="el-icon-s-order" @click="heightShow = !heightShow"></i></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">{{ opinionList.standardNumber }}</span>
</p>
<p class="transition-box-p">
<label class="transition-box-label">标准名称</label>
<span class="transition-box-span">{{ opinionList.standardName || '-' }}</span>
</p>
<p class="transition-box-p">
<label class="transition-box-label">上传时间</label>
<span class="transition-box-span">{{ opinionList.uploadTime || '-' }}</span>
</p> <p class="transition-box-p">
<label class="transition-box-label">征求意见周期</label>
<span class="transition-box-span">{{ opinionList.opinionCycle || '-' }}</span>
</p>
</div>
</transition>
<div class="effect">
<el-button type="primary" class="common-button-primary" size="mini" @click="exportStandard" title="不勾选时默认导出所有筛选项;勾选时仅导出勾选项">导出</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',
fontWeight: 'bold', height: '48px'}">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="date"
label="章节编号"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="修改意见内容(包括理由或依据)"
>
</el-table-column>
<el-table-column
prop="department"
label="提出部门"
width="300"
>
</el-table-column>
<el-table-column
prop="proposer"
label="提出人"
width="170">
</el-table-column>
</el-table>
</div>
</div>
<div>
<pagination
style="position: static;"
:page="newModelPageConfig.page"
:total="newModelPageConfig.total"
@pageChange="page => handlePageChange('newModel', page)"
@pageSizeChange="pageSize => handlePageSizeChange('newModel', pageSize)"></pagination>
</div>
<!--导出文件改名字模态框-->
<el-dialog :visible.sync="exportModelFlag" class="export-dialog" title="导出文件" width="300px">
<el-form :inline="true" class="label-input-form search-area">
<el-form-item label="导出名称" class="search-item">
<el-input v-model="exportName" placeholder="请输入导出文件名称" :maxlength="30" clearable label="导出名称"/>
</el-form-item>
</el-form>
<span slot="footer" class="demo-drawer-footer">
<el-button size="mini" class="common-button-default" icon="el-icon-close" @click="cancal">取消</el-button>
<el-button size="mini" type="primary" class="common-button-primary" icon="el-icon-check" @click="exportTestItem">提交</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'categoryDetails',
data () {
return {
exportName:'',
exportModelFlag: false, //导出模态窗状态
heightShow: true,
isSubmit: false,
opinionList: {
standardNumber: 'GB 121-12',
standardName: '机动车安全运行条件',
uploadTime: '2002-11-23',
opinionCycle: '2001-02-21到 2012-02-02'
},
personShareEO:{},
opinionContent: {
number:'',
content: '',
},
standinfoList: [{
date: '1.1.2',
name: '文章内容不清晰',
department: '事业部',
proposer: '徐磊',
}, {
date: '1.2.3.1',
name: '标准有错误',
department: '标准法规部',
proposer: '汪重阳',
}, {
date: '1.21.1',
name: '标准延时',
department: '政策部',
proposer: '吕毅',
}, {
date: '1.21.1',
name: '实用性不高',
department: '技术部',
proposer: '王浩宇',
}, {
date: '1.2.31',
name: '不贴合国家标准',
department: '事业部',
proposer: '胡佳硕',
}, ],
newModelPageConfig: {
page: 1,
total: 0
},
selectedList: [], //标准选中的数据
}
},
methods: {
//分页数据改变
handlePageChange(field, page) {
switch (field) {
case "newModel":
break;
case "":
break;
}
},
handlePageSizeChange(field, pageSize) {
switch (field) {
case "newModel":
break;
case "":
break;
}
},
back (){
this.$router.push({
name:'standardForComments'
})
},
exportStandard () {
// 区别是选择导出还是全部导出
if (this.selectedList.length > 0) {
this.saveExportType = 'apart'
} else {
this.saveExportType = 'all'
}
this.exportName = ''
this.exportModelFlag = true
},
cancal () {
this.exportModelFlag = false
},
// 导出确定功能
exportTestItem() {
this.exportModelFlag = false
},
},
mounted () {}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/mixins';
@import '~@/assets/styles/style';
.consultationDetails{
height: 100%;
display: flex;
flex-direction: column;
.iconClass{
width: 18px;
height: 18px;
}
.contentTitle {
display: flex;
align-items: center;
padding: 0 10px;
height: 50px;
background: #ffffff;
.title{
flex: 1;
font-weight: bold;
font-size: 20px;
margin-left: 15px;
.el-icon-s-order{
font-size: 22px;
color: #4498F0;
cursor: pointer;
}
}
}
.transition-box{
padding: 0 10px;
background: #ffffff;
font-size: 14px;
.transition-box-p{
line-height: 35px;
.transition-box-label{
display: inline-block;
width: 100px;
vertical-align: top;
}
.transition-box-span{
display: inline-block;
width: calc(~'100% - 100px');
}
.file-box{
display: inline-block;
width: calc(~'100% - 100px');
.transition-box-span{
display: inline;
width: 100%;
cursor: pointer;
color: #4498f0;
}
p{
& > a{
cursor: pointer;
}
& > i{
display: inline-block;
margin-left: 3px;
width: 18px;
height: 16px;
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: center center;
vertical-align: sub;
cursor: pointer;
}
.icon-download{
background-image: url("~assets/images/shangqi/img/download.png");
}
.icon-download2{
background-image: url("~assets/images/shangqi/img/download2.png");
}
}
}
}
}
.effect {
margin-left: 10px;
margin-bottom: 10px;
}
.container {
//height: calc(~'100% - 52px - 55px - 50px');
flex: auto;
display: flex;
flex-direction: column;
.el-tabs{
height: 100%;
display: flex;
flex-direction: column;
flex: auto;
/deep/.el-tabs__content{
//height: calc(~'100% - 55px');
overflow-y: auto;
flex: auto;
display: flex;
flex-direction: column;
.el-tab-pane{
height: 100%;
flex: auto;
display: flex;
flex-direction: column;
}
}
}
}
/deep/.relateClass{
& > button{
height: 30px;
line-height: 30px;
font-size: 14px;
padding: 0 10px;
font-family: 'Microsoft Yahei', '\5FAE\8F6F\96C5\9ED1', Arial, sans-serif !important;
}
& i{
display: inline-block;
margin-right: 3px;
width: 18px;
height: 18px;
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: center center;
vertical-align: text-bottom;
}
.relation-btn{
color: #409EFF;
border: 1px solid #409EFF;
background: rgba(64, 158, 255, 0.1);
.icon-relation{
background-image: url("~assets/images/shangqi/standardDetails/relation.png");
}
}
}
.iconClass{
width: 18px;
height: 18px;
}
.iconClassDia{
width: 30px;
height: 30px;
}
.picBorder{
border: 1px solid #409eff;
}
.add-border{
/*width: 80px;*/
height: 80px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer
}
}
.relateClass{
.el-dialog__body {
max-height: 460px;
overflow-y: auto;
}
}
</style>
@@ -1,114 +1,113 @@
<!--征求意见详情--> <!--征求意见详情-->
<template> <template>
<div class="consultationDetails"> <div class="consultationDetails">
<div class="contentTitle"> <div class="contentTitle">
<div class="back" title="返回" @click="back"> <div class="back" title="返回" @click="back">
<i class="el-icon-back"></i> <i class="el-icon-back"></i>
</div>
<div class="title">征求意见详情<i class="el-icon-s-order" @click="heightShow = !heightShow"></i></div>
</div> </div>
<div class="title">征求意见详情<i class="el-icon-s-order" @click="heightShow = !heightShow"></i></div> <transition name="el-zoom-in-top">
</div> <div v-show="heightShow" class="transition-box">
<transition name="el-zoom-in-top"> <p class="transition-box-p">
<div v-show="heightShow" class="transition-box"> <label class="transition-box-label">标准号</label>
<p class="transition-box-p"> <span class="transition-box-span">{{ this.$route.query.item.categorg }}</span>
<label class="transition-box-label">标准号</label> </p>
<span class="transition-box-span">{{ this.$route.query.item.categorg }}</span> <p class="transition-box-p">
</p> <label class="transition-box-label">标准名称</label>
<p class="transition-box-p"> <span class="transition-box-span">{{ this.$route.query.item.cname || '-' }}</span>
<label class="transition-box-label">标准名称</label> </p>
<span class="transition-box-span">{{ this.$route.query.item.cname || '-' }}</span> <p class="transition-box-p">
</p> <label class="transition-box-label">上传时间</label>
<p class="transition-box-p"> <span class="transition-box-span">{{ this.$route.query.item.starttime || '-' }}</span>
<label class="transition-box-label">上传时间</label> </p> <p class="transition-box-p">
<span class="transition-box-span">{{ this.$route.query.item.starttime || '-' }}</span> <label class="transition-box-label">征求意见周期</label>
</p> <p class="transition-box-p"> <span class="transition-box-span">{{ this.$route.query.item.endtime || '-' }}</span>
<label class="transition-box-label">征求意见周期</label> </p>
<span class="transition-box-span">{{ this.$route.query.item.endtime || '-' }}</span> </div>
</p> </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> </div>
</transition> <div class="container" style="position:relative;">
<div class="effect"> <div style="position: absolute;top: 0;left: 0;bottom: 0;right: 0;">
<el-button type="primary" class="common-button-primary" size="mini" @click="addModel">添加</el-button> <el-table
</div> :data="standinfoList"
<div class="container" style="position:relative;"> height="100%"
<div style="position: absolute;top: 0;left: 0;bottom: 0;right: 0;"> border
<el-table style="width: 100%"
:data="standinfoList" :header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
height="100%"
border
style="width: 100%"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"> fontWeight: 'bold', height: '48px'}">
<el-table-column <el-table-column
prop="partCode" prop="partCode"
label="章节编号" label="章节编号"
width="180"> width="180">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="countent" prop="content"
label="修改意见内容(包括理由或依据)" label="修改意见内容(包括理由或依据)"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="department" prop="deptName"
label="提出部门" label="提出部门"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="user" prop="userName"
label="提出人" label="提出人"
> >
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right"> <el-table-column label="操作" align="center" width="50" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<div @click.stop style="display: inline-block"> <div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand"> <el-dropdown trigger="click" @command="handleCommand">
<i v-if="scope.row.user === $store.getters.userInfo.userId" class="iconfont">&#xe61e;</i> <i v-if="scope.row.userId === $store.getters.userInfo.userId" class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown"> <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="scope.row.userId === $store.getters.userInfo.userId" :command="[scope.row, '编辑']">编辑</el-dropdown-item>
<el-dropdown-item v-if="" :command="[scope.row, '删除']">删除</el-dropdown-item> <el-dropdown-item :command="[scope.row, '删除']">删除</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div>
</div> </div>
</div>
<div>
<pagination <pagination
style="position: static;" style="position: static;width: 100%;"
:page="form.page" :page="form.page"
:total="total" :total="total"
@pageChange="handlePageChange" @pageChange="handlePageChange"
@pageSizeChange="handlePageSizeChange"></pagination> @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> </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> </template>
<script> <script>
@@ -116,99 +115,144 @@ export default {
name: 'consultationDetails', name: 'consultationDetails',
data () { data () {
return { return {
spinShow: false, id: '', // 选中id
total: 0, type: '', // 选中状态
opiniontitle: '新增意见', spinShow: false,
isDialog: false, //新增抽屉状态 total: 0, // 总数
heightShow: true, opiniontitle: '新增意见', // 抽屉标题
isSubmit: false, isDialog: false, //新增抽屉状态
opinionContent: { heightShow: true, // 高度
number:'', isSubmit: false,
content: '', opinionContent: { // 抽屉数据
}, partCode: '',
standinfoList: [], content: '',
form: { },
cid: this.$route.query.item.cid, standinfoList: [], // 详情列表
page: 1, form: {
size: this.$store.getters.userInfo.configContent cid: this.$route.query.item.cid,
} page: 1,
size: this.$store.getters.userInfo.configContent
} // 详情数据
} }
}, },
methods: { methods: {
getList() { exportAll () {
this.spinShow = true window.open('/api/slrs/sar-public-idea-all/tuallStand?cid=' + this.$route.query.item.cid)
this.$http.get('sys/sar-public-idea-all/getallStand', this.form, { },
_this: this // 获取详情信息列表
}, res => { getList() {
this.standinfoList = res.data.records this.spinShow = true
this.total = res.data.total this.$http.get('slrs/sar-public-idea-all/getAllStand', this.form, {
this.spinShow = false _this: this
}, e => { }, res => {
}) this.standinfoList = res.data.records
}, this.total = res.data.total
//分页数据改变 this.spinShow = false
handlePageChange(page) { }, e => {
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(() => {
//取消事件
}) })
) },
} //分页数据改变
}, handlePageChange(page) {
//新增意见模态窗 this.form.page = page
addModel() { this.getList()
this.opiniontitle = '新增意见' },
this.isDialog = true handlePageSizeChange(pageSize) {
}, this.$store.getters.userInfo.configContent = pageSize
//点击抽屉按钮提交事件 this.form.size = pageSize
saveUserInfo() { this.getList()
this.isDialog = false },
}, back (){
//点击抽屉按钮取消事件 this.$router.push({
closeDrawer() { name:'standardForComments'
this.isDialog = false })
}, },
// 更多
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 () { mounted () {
this.getList() this.getList()
@@ -296,14 +340,13 @@ export default {
} }
} }
.effect { .effect {
margin-left: 10px; margin: 10px 10px 0 0;
margin-bottom: 10px;
} }
.container { .container {
height: calc(~'100% - 52px - 55px - 50px'); height: calc(~'100% - 52px - 55px - 50px');
flex: auto; flex: auto;
display: flex; display: flex;
margin:10px; margin:10px 0;
flex-direction: column; flex-direction: column;
.el-tabs{ .el-tabs{
height: 100%; height: 100%;
-13
View File
@@ -2375,19 +2375,6 @@ const routes = [
}, },
// 详情页 // 详情页
// ************************** 其他详情页 ******************************* // // ************************** 其他详情页 ******************************* //
{
path: '/categoryDetails/:id',
name: 'categoryDetails',
component: () =>
import('@/pages/regulatoryRepository/standardForComments/pags/categoryDetails'),
meta: {
requireAuth: true,
parentPath: '/standardForComments',
title: '管理征求意见',
// isBoolean: true,
// menuId: ''
}
},
{ {
path: '/consultationDetails/:id/:pageType', path: '/consultationDetails/:id/:pageType',
name: 'consultationDetails', name: 'consultationDetails',