Merge branch 'develop' into 'test'

Develop

See merge request LAWS/laws-system-front-FOTON!135
This commit is contained in:
王夏晖
2021-09-09 19:23:27 +08:00
17 changed files with 1366 additions and 1250 deletions
@@ -836,7 +836,7 @@
<label class="see-drawer-name" title="新车型实施日期">新车型实施日期</label>
<span class="see-drawer-val"
:title="standShowItemEO.xcxssrq">{{
standShowItemEO.xcxssrq ? $moment(standShowItemEO.xcxssrq).format('YYYY-MM-DD') : ''
standShowItemEO.xcxssrq ? $moment(standShowItemEO.xccssrq).format('YYYY-MM-DD') : ''
}}</span>
</div>
<div class="see-drawer-div">
@@ -51,10 +51,10 @@ export default {
label: '海外标准法规', // value没改
value: 'bussstand'
},
{
label: '国内外政策',
value: 'laws'
},
// {
// label: '国内外政策',
// value: 'laws'
// },
{
label: '企业标准',
value: 'enterprise'
+53 -48
View File
@@ -8,52 +8,58 @@
<!-- <el-tabs v-model="activeName" @tab-click="handleClick">-->
<!-- <el-tab-pane label="标准预警" name="STANDARD">-->
<div class="dynamic-content">
<h5>实施预警</h5>
<div class="more">
<el-form :inline="true" :model="dynamic" class="demo-form-inline">
<el-form-item label="标准编号">
<el-input clearable size="small"
v-model="dynamic.standCode"
placeholder="根据标准编号查找">
</el-input>
</el-form-item>
<el-form-item label="标准名称">
<el-input clearable size="small"
v-model="dynamic.standName"
placeholder="根据标准名称查找">
</el-input>
</el-form-item>
<el-form-item label="实施日期" class="choose-time-area">
<el-datePicker
clearable size="small"
v-model="dynamic.putTime"
value-format="yyyy-MM-dd"
placeholder="根据实施日期查找">
</el-datePicker>
</el-form-item>
<el-form-item label="适用车型">
<el-input clearable size="small"
v-model="dynamic.applyType"
placeholder="根据适用车型查找">
</el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
size="small"
@click="searchBtnClick"
class="common-button-primary">
查询
</el-button>
<el-button
size="small"
@click="clearBtnClick"
class="common-button-primary">
清空
</el-button>
</el-form-item>
</el-form>
</div>
<el-row>
<el-col>
<h5>实施预警</h5>
</el-col>
<el-col>
<div class="more">
<el-form :inline="true" :model="dynamic" class="demo-form-inline">
<el-form-item label="标准编号">
<el-input clearable size="small"
v-model="dynamic.standCode"
placeholder="根据标准编号查找">
</el-input>
</el-form-item>
<el-form-item label="标准名称">
<el-input clearable size="small"
v-model="dynamic.standName"
placeholder="根据标准名称查找">
</el-input>
</el-form-item>
<el-form-item label="实施日期" style="margin-right: -40px" class="choose-time-area">
<el-datePicker
clearable size="small"
v-model="dynamic.putTime"
value-format="yyyy-MM-dd"
placeholder="根据实施日期查找">
</el-datePicker>
</el-form-item>
<el-form-item label="适用车型">
<el-input clearable size="small"
v-model="dynamic.applyType"
placeholder="根据适用车型查找">
</el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
size="small"
@click="searchBtnClick"
class="common-button-primary">
查询
</el-button>
<el-button
size="small"
@click="clearBtnClick"
class="common-button-primary">
清空
</el-button>
</el-form-item>
</el-form>
</div>
</el-col>
</el-row>
<div class="content" style="height: 100%; padding-top: 5px; ">
<el-divider content-position="left" class="dynamic-child-title">新车型实施日期预警</el-divider>
<el-table
@@ -1081,14 +1087,13 @@ export default {
}
.more {
/deep/ .el-input__inner {
width: 155px;
}
.choose-time-area {
/deep/ .el-input__inner {
width: 220px;
width: 170px;
}
}
@@ -20,7 +20,6 @@
<ProcessTitle style="float: left">
<template slot="title">基础信息</template>
</ProcessTitle>
<el-button style="margin-left: 20px;margin-top: 5px;margin-bottom: 5px" @click="foldForm" size="mini" type="primary">{{foldFormFlag?'展开基础信息':'隐藏基础信息'}}</el-button>
<div class="prc-content-border" v-if="foldFormFlag === false">
<el-row :gutter="24">
<el-col :span="24">
@@ -76,6 +75,8 @@
</el-col>
</el-row>
</div>
<el-button v-if="foldFormFlag === false" style="width: 100%" icon="el-icon-caret-top" @click="foldForm">隐藏基础信息</el-button>
<el-button v-if="foldFormFlag === true" style="width: 100%" icon="el-icon-caret-bottom" @click="foldForm">展开基础信息</el-button>
<div class="prc-content-border" v-if="foldFormFlag === true" style="display: none">
<el-row :gutter="24">
<el-col :span="24">
@@ -20,7 +20,6 @@
<ProcessTitle style="float: left">
<template slot="title">基础信息</template>
</ProcessTitle>
<el-button style="margin-left: 20px;margin-top: 5px;margin-bottom: 5px" @click="foldForm" size="mini" type="primary">{{foldFormFlag?'展开基础信息':'隐藏基础信息'}}</el-button>
<div class="prc-content-border" v-if="foldFormFlag === false">
<el-row :gutter="24">
<el-col :span="24">
@@ -71,6 +70,8 @@
</el-col>
</el-row>
</div>
<el-button v-if="foldFormFlag === false" style="width: 100%" icon="el-icon-caret-top" @click="foldForm">隐藏基础信息</el-button>
<el-button v-if="foldFormFlag === true" style="width: 100%" icon="el-icon-caret-bottom" @click="foldForm">展开基础信息</el-button>
<div class="prc-content-border" v-if="foldFormFlag === true" style="display: none">
<el-row :gutter="24">
<el-col :span="24">
@@ -21,7 +21,6 @@
<ProcessTitle style="float: left">
<template slot="title">基础信息</template>
</ProcessTitle>
<el-button style="margin-left: 20px;margin-top: 5px;margin-bottom: 5px" @click="foldForm" size="mini" type="primary">{{foldFormFlag?'展开基础信息':'隐藏基础信息'}}</el-button>
<div class="prc-content-border" v-if="foldFormFlag === false">
<el-row :gutter="24">
<el-col :span="24">
@@ -77,6 +76,8 @@
</el-col>
</el-row>
</div>
<el-button v-if="foldFormFlag === false" style="width: 100%" icon="el-icon-caret-top" @click="foldForm">隐藏基础信息</el-button>
<el-button v-if="foldFormFlag === true" style="width: 100%" icon="el-icon-caret-bottom" @click="foldForm">展开基础信息</el-button>
<div class="prc-content-border" v-if="foldFormFlag === true" style="display: none">
<el-row :gutter="24">
<el-col :span="24">
@@ -20,7 +20,6 @@
<ProcessTitle style="float: left">
<template slot="title">基础信息</template>
</ProcessTitle>
<el-button style="margin-left: 20px;margin-top: 5px;margin-bottom: 5px" @click="foldForm" size="mini" type="primary">{{foldFormFlag?'展开基础信息':'隐藏基础信息'}}</el-button>
<div class="prc-content-border" v-if="foldFormFlag === false">
<el-row :gutter="24">
<el-col :span="24">
@@ -71,6 +70,8 @@
</el-col>
</el-row>
</div>
<el-button v-if="foldFormFlag === false" style="width: 100%" icon="el-icon-caret-top" @click="foldForm">隐藏基础信息</el-button>
<el-button v-if="foldFormFlag === true" style="width: 100%" icon="el-icon-caret-bottom" @click="foldForm">展开基础信息</el-button>
<div class="prc-content-border" v-if="foldFormFlag === true" style="display: none">
<el-row :gutter="24">
<el-col :span="24">
@@ -20,7 +20,6 @@
<ProcessTitle style="float: left">
<template slot="title">基础信息</template>
</ProcessTitle>
<el-button style="margin-left: 20px;margin-top: 5px;margin-bottom: 5px" @click="foldForm" size="mini" type="primary">{{foldFormFlag?'展开基础信息':'隐藏基础信息'}}</el-button>
<div class="prc-content-border" v-if="foldFormFlag === false">
<el-row :gutter="24">
<el-col :span="24">
@@ -71,6 +70,8 @@
</el-col>
</el-row>
</div>
<el-button v-if="foldFormFlag === false" style="width: 100%" icon="el-icon-caret-top" @click="foldForm">隐藏基础信息</el-button>
<el-button v-if="foldFormFlag === true" style="width: 100%" icon="el-icon-caret-bottom" @click="foldForm">展开基础信息</el-button>
<div class="prc-content-border" v-if="foldFormFlag === true" style="display: none">
<el-row :gutter="24">
<el-col :span="24">
@@ -20,7 +20,6 @@
<ProcessTitle style="float: left">
<template slot="title">基础信息</template>
</ProcessTitle>
<el-button style="margin-left: 20px;margin-top: 5px;margin-bottom: 5px" @click="foldForm" size="mini" type="primary">{{foldFormFlag?'展开基础信息':'隐藏基础信息'}}</el-button>
<div class="prc-content-border" v-if="foldFormFlag === false">
<el-row :gutter="24">
<el-col :span="24">
@@ -71,6 +70,8 @@
</el-col>
</el-row>
</div>
<el-button v-if="foldFormFlag === false" style="width: 100%" icon="el-icon-caret-top" @click="foldForm">隐藏基础信息</el-button>
<el-button v-if="foldFormFlag === true" style="width: 100%" icon="el-icon-caret-bottom" @click="foldForm">展开基础信息</el-button>
<div class="prc-content-border" v-if="foldFormFlag === true" style="display: none">
<el-row :gutter="24">
<el-col :span="24">
@@ -20,7 +20,6 @@
<ProcessTitle style="float: left">
<template slot="title">基础信息</template>
</ProcessTitle>
<el-button style="margin-left: 20px;margin-top: 5px;margin-bottom: 5px" @click="foldForm" size="mini" type="primary">{{foldFormFlag?'展开基础信息':'隐藏基础信息'}}</el-button>
<div class="prc-content-border" v-if="foldFormFlag === false">
<el-row :gutter="24">
<el-col :span="24">
@@ -71,6 +70,8 @@
</el-col>
</el-row>
</div>
<el-button v-if="foldFormFlag === false" style="width: 100%" icon="el-icon-caret-top" @click="foldForm">隐藏基础信息</el-button>
<el-button v-if="foldFormFlag === true" style="width: 100%" icon="el-icon-caret-bottom" @click="foldForm">展开基础信息</el-button>
<div class="prc-content-border" v-if="foldFormFlag === true" style="display: none">
<el-row :gutter="24">
<el-col :span="24">
@@ -20,7 +20,6 @@
<ProcessTitle style="float: left">
<template slot="title">基础信息</template>
</ProcessTitle>
<el-button style="margin-left: 20px;margin-top: 5px;margin-bottom: 5px" @click="foldForm" size="mini" type="primary">{{foldFormFlag?'展开基础信息':'隐藏基础信息'}}</el-button>
<div class="prc-content-border" v-if="foldFormFlag === false">
<el-row :gutter="24">
<el-col :span="24">
@@ -71,6 +70,8 @@
</el-col>
</el-row>
</div>
<el-button v-if="foldFormFlag === false" style="width: 100%" icon="el-icon-caret-top" @click="foldForm">隐藏基础信息</el-button>
<el-button v-if="foldFormFlag === true" style="width: 100%" icon="el-icon-caret-bottom" @click="foldForm">展开基础信息</el-button>
<div class="prc-content-border" v-if="foldFormFlag === true" style="display: none">
<el-row :gutter="24">
<el-col :span="24">
File diff suppressed because it is too large Load Diff
@@ -334,6 +334,7 @@ export default {
standType: '',
standId: '',
fjList: [],
fjListName: '',
fjListId: ''
},
formRules: {
@@ -438,7 +439,11 @@ export default {
this.fzlistModel = true
},
handleSelection2 (data) {
this.addFjList = data
if(data.length > 5) {
this.$message.warning('最多选择5条附件')
} else {
this.addFjList = data
}
},
closeDrawer2 () {
this.fzlistModel = false
@@ -447,11 +452,14 @@ export default {
enterDrawer2 () {
this.fzlistModel = false
this.form.fjList = this.addFjList
let idList
this.addFjList.forEach( item => {
idList += item.id + ','
let idList = []
let nameList = []
this.addFjList.forEach(item => {
idList.push(item.id)
nameList.push(item.fileName)
})
this.form.fjListId = idList
this.form.fjListName = nameList.join(',')
this.form.fjListId = idList.join(',')
},
// 点击查看
handlePreview (item) {
@@ -633,6 +641,8 @@ export default {
if (res.ok) {
var json = Object.assign(this.form, this.roleForm)
json.commentText = this.commentText
json.filesId = this.addFjList
json.filesName = this.form.fjListName
this.$http.post('lawss/activiti/completeTask', {
json: JSON.stringify(json),
taskId: res.data,
@@ -2790,7 +2790,7 @@ export default {
this.selectChildMenu(data)
this.productModal = true
// 取消所有的选中效果
this.productTitle = '编辑信息'
this.productTitle = '编辑体系'
// const newChild = { id: this.id++, label: 'testtest', children: [] };
// if (!data.children) {
// this.$set(data, 'children', []);
@@ -2803,7 +2803,7 @@ export default {
this.selectChildMenu(data)
this.productModal = true
// 取消所有的选中效果
this.productTitle = '新增下级菜单信息'
this.productTitle = '新增体系'
this.productModelAdd.dicTypeCode = ''
// const newChild = { id: this.id++, label: 'testtest', children: [] };
// if (!data.children) {
@@ -2042,8 +2042,9 @@ export default {
},
// 查询二级菜单
selectMenuList () {
this.$http.get('sarResource/ts-resource', {
sorDivide: 'BUSINESS_STAND'
this.$http.get('sarResource/ts-resource/getList', {
sorDivide: 'BUSINESS_STAND',
userId: this.$store.getters.userInfo.userId
}, {}, res => {
if (res.ok) {
this.treeList = res.data
@@ -2082,7 +2083,7 @@ export default {
this.modalType = 2
this.selectChildMenu(data)
this.productModal = true
this.productTitle = '编辑信息'
this.productTitle = '编辑体系'
// const newChild = { id: this.id++, label: 'testtest', children: [] };
// if (!data.children) {
// this.$set(data, 'children', []);
@@ -2094,7 +2095,7 @@ export default {
this.modalType = 1
this.selectChildMenu(data)
this.productModal = true
this.productTitle = '新增下级菜单信息'
this.productTitle = '新增体系'
this.productModelAdd.dicTypeCode = ''
// const newChild = { id: this.id++, label: 'testtest', children: [] };
// if (!data.children) {
@@ -2383,6 +2384,7 @@ export default {
this.personCollect.collectResId = item.id
this.personCollect.collectTitle = item.standName + ' ( 编号:' + item.standSort + ' ' + item.standCode + ' )'
this.personCollect.collectType = 'BUSINESS_STAND'
this.personCollect.userId = this.$store.getters.userInfo.userId
this.$http.postData('person/personCollect', this.personCollect, {
_this: this
}, res => {
@@ -3410,8 +3412,8 @@ export default {
}
// 处理我的收藏和个性化标签传参
if (this.selectSarMenu.id === 'qbwdsc') {
this.sarBussionessSearch.menuId = undefined
this.sarBussionessSearch.labelMenuId = undefined
this.sarBussionessSearch.menuId = 'qbwdsc'
this.sarBussionessSearch.collectMenuId = 'qbwdsc'
} else if (this.selectSarMenu.id === 'gxhbq' || this.selectSarMenu.pId === 'gxhbq') {
this.sarBussionessSearch.menuId = undefined
@@ -139,11 +139,18 @@ export default {
this.splitInfoPage = 1;
this.sarStandCompareHis();
},
// getTime(time){
// let date = new Date(time + 8 * 3600 * 1000); // 增加8小时
// console.log(date.toJSON().substr(0, 19).replace('T', ' '));
// return date.toJSON().substr(0, 19).replace('T', ' ');
// },
// 查询表格
sarStandCompareHis() {
this.spinShow = true;
this.standCommonlySearch.start = new Date(this.standCommonlySearch.start).getTime() //转换为毫秒时间戳
this.standCommonlySearch.type = 1;
var form = this.standCommonlySearch;
console.log(form);
this.$http.get("slrs/sar-public-idea/SelectAllPage", form, {
_this: this
}, res => {
@@ -1,480 +1,537 @@
<!--征求意见详情-->
<template>
<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>
<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 table-jump"
@click="handlePreview(itemData)"
>
<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>
<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 table-jump"
@click="handlePreview(itemData)"
>
{{ this.$route.query.item.cid }}
</span>
</p>
<p class="transition-box-p">
<label class="transition-box-label">标准名称</label>
<span class="transition-box-span table-jump"
@click="handlePreview(itemData)"
>
</p>
<p class="transition-box-p">
<label class="transition-box-label">标准名称</label>
<span class="transition-box-span table-jump"
@click="handlePreview(itemData)"
>
{{ 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" v-if="this.$route.query.item.startTime && this.$route.query.item.endTime">{{ this.$route.query.item.startTime + ' ~ ' + this.$route.query.item.endTime}}</span>
<span class="transition-box-span" v-else>-</span>
</p>
</div>
</transition>
<div class="effect">
<el-button v-if="ideaKey" 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 class="container">
<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="index"
label="序号"
align="center"
width="50">
</el-table-column>
<el-table-column
prop="partCode"
label="章节编号"
sortable
align="center"
width="180">
</el-table-column>
<el-table-column
prop="content"
align="center"
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="deptName"
align="center"
label="提出部门"
>
</el-table-column>
<el-table-column
prop="userName"
align="center"
label="提出人"
>
</el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right" v-if="ideaKey">
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</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 v-if="scope.row.userId === $store.getters.userInfo.userId" :command="[scope.row, '删除']">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
</el-table>
</div>
<pagination
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 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-input v-model="opinionContent.partCode" autocomplete="off" placeholder="请输入章节编号"></el-input>
</el-form-item>
<el-form-item label="修改前" prop="oldText" label-width="" class="add-form-item">
<el-input v-model="opinionContent.oldText" autocomplete="off" placeholder="请输入"></el-input>
</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>
</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>
<el-button size="mini" class="common-button-default" icon="el-icon-close" @click="closeDrawer">取消</el-button>
</div>
</div>
</el-drawer>
<loading :loading="spinShow">数据加载中</loading>
</p>
<p class="transition-box-p">
<label class="transition-box-label">附件</label>
<span class="file-box" v-if="fileInfoList.length > 0">
<span v-for="(file,item) in fileInfoList"
target="_blank"
class="transition-box-span table-jump"
@click="handleQueryPdf(file)"
:key="item">
{{ file.name }}
</span>
</span>
<span class="transition-box-span" v-else>-</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" v-if="this.$route.query.item.startTime && this.$route.query.item.endTime">{{ this.$route.query.item.startTime + ' ~ ' + this.$route.query.item.endTime }}</span>
<span class="transition-box-span" v-else>-</span>
</p>
</div>
</transition>
<div class="effect">
<el-button v-if="ideaKey" 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 class="container">
<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="index"
label="序号"
align="center"
width="50">
</el-table-column>
<el-table-column
prop="partCode"
label="章节编号"
sortable
align="center"
width="180">
</el-table-column>
<el-table-column
prop="content"
align="center"
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="deptName"
align="center"
label="提出部门"
>
</el-table-column>
<el-table-column
prop="userName"
align="center"
label="提出人"
>
</el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right" v-if="ideaKey">
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</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 v-if="scope.row.userId === $store.getters.userInfo.userId" :command="[scope.row, '删除']">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
</el-table>
</div>
<pagination
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 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-input v-model="opinionContent.partCode" autocomplete="off" placeholder="请输入章节编号"></el-input>
</el-form-item>
<el-form-item label="修改前" prop="oldText" label-width="" class="add-form-item">
<el-input v-model="opinionContent.oldText" autocomplete="off" placeholder="请输入"></el-input>
</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>
</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>
<el-button size="mini" class="common-button-default" icon="el-icon-close" @click="closeDrawer">取消</el-button>
</div>
</div>
</el-drawer>
<loading :loading="spinShow">数据加载中</loading>
</div>
</template>
<script>
export default {
name: 'consultationDetails',
data () {
return {
itemData: this.$route.query.item,
id: '', // 选中id
type: '', // 选中状态
spinShow: false,
total: 0, // 总数
opiniontitle: '新增意见', // 抽屉标题
isDialog: false, //新增抽屉状态
heightShow: true, // 高度
isSubmit: false,
opinionContent: { // 抽屉数据
partCode: '',
oldText: '',
newText: '',
reason: ''
},
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' }
],
},
standinfoList: [], // 详情列表
form: {
ideaId: this.$route.query.item.id,
cid: this.$route.query.item.cid,
page: 1,
size: this.$store.getters.userInfo.configContent,
userId: this.$store.getters.userInfo.userId,
endTime: this.$route.query.item.endTime
}, // 详情数据
ideaKey: false
}
},
methods: {
// 点击查看
handlePreview (item) {
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.standId,
pageType: 'INLAND_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
exportAll () {
window.open('/api/slrs/sar-public-idea-all/tuallStand?cid=' + this.$route.query.item.cid)
},
getIdeaKey () {
this.$http.get('slrs/sar-public-idea-all/checkIsShow', {
endTime: this.form.endTime
}, {}, res => {
if (res.message === '1') {
this.ideaKey = false
} else {
this.ideaKey = true
}
})
},
// 获取详情信息列表
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 => {
})
},
//分页数据改变
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.reason = row.reason
this.opinionContent.oldText = row.oldText
this.opinionContent.newText = row.newText
} else {
this.id = ''
this.opiniontitle = '新增意见'
this.opinionContent.partCode = ''
this.opinionContent.reason = ''
this.opinionContent.oldText = ''
this.opinionContent.newText = ''
}
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() {
this.$refs['formAdd'].validate((valid) => {
if (valid) {
var url = ''
var form = {
ideaId: this.$route.query.item.id,
cid: this.$route.query.item.cid,
content: this.opinionContent.content,
oldText: this.opinionContent.oldText,
newText: this.opinionContent.newText,
reason: this.opinionContent.reason,
partCode: this.opinionContent.partCode,
userId: this.$store.getters.userInfo.userId || '',
userName: this.$store.getters.userInfo.userName || '',
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()
this.getIdeaKey()
}
export default {
name: 'consultationDetails',
data() {
return {
fileInfoList: [],
itemData: this.$route.query.item,
id: '', // 选中id
type: '', // 选中状态
spinShow: false,
total: 0, // 总数
opiniontitle: '新增意见', // 抽屉标题
isDialog: false, //新增抽屉状态
heightShow: true, // 高度
isSubmit: false,
opinionContent: { // 抽屉数据
partCode: '',
oldText: '',
newText: '',
reason: ''
},
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'}
],
},
standinfoList: [], // 详情列表
form: {
ideaId: this.$route.query.item.id,
cid: this.$route.query.item.cid,
page: 1,
size: this.$store.getters.userInfo.configContent,
userId: this.$store.getters.userInfo.userId,
endTime: this.$route.query.item.endTime
}, // 详情数据
ideaKey: false
}
},
methods: {
// 点击查看
handlePreview(item) {
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.standId,
pageType: 'INLAND_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
exportAll() {
window.open('/api/slrs/sar-public-idea-all/tuallStand?cid=' + this.$route.query.item.cid)
},
getIdeaKey() {
this.$http.get('slrs/sar-public-idea-all/checkIsShow', {
endTime: this.form.endTime
}, {}, res => {
if (res.message === '1') {
this.ideaKey = false
} else {
this.ideaKey = true
}
})
},
// 获取详情信息列表
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 => {
})
},
//分页数据改变
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.reason = row.reason
this.opinionContent.oldText = row.oldText
this.opinionContent.newText = row.newText
} else {
this.id = ''
this.opiniontitle = '新增意见'
this.opinionContent.partCode = ''
this.opinionContent.reason = ''
this.opinionContent.oldText = ''
this.opinionContent.newText = ''
}
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() {
this.$refs['formAdd'].validate((valid) => {
if (valid) {
var url = ''
var form = {
ideaId: this.$route.query.item.id,
cid: this.$route.query.item.cid,
content: this.opinionContent.content,
oldText: this.opinionContent.oldText,
newText: this.opinionContent.newText,
reason: this.opinionContent.reason,
partCode: this.opinionContent.partCode,
userId: this.$store.getters.userInfo.userId || '',
userName: this.$store.getters.userInfo.userName || '',
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
},
getFileInfo() {
JSON.parse(this.$route.query.item.files).forEach(item=>{
this.fileInfoList.push({
attId: item.attId,
id: item.id,
name: item.fileName
})
})
},
handleQueryPdf(file){
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + file.id))
}
},
mounted() {
this.getList()
this.getIdeaKey()
this.getFileInfo()
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/mixins';
@import '~@/assets/styles/style';
.consultationDetails {
height: 100%;
@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: 10px 10px 0 0;
}
.container {
height: calc(~'100% - 52px - 55px - 50px');
flex: auto;
display: flex;
margin: 10px 0;
flex-direction: column;
padding: 0;
.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;
.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: 10px 10px 0 0;
}
.container {
height: calc(~'100% - 52px - 55px - 50px');
flex: auto;
display: flex;
margin:10px 0;
flex-direction: column;
padding: 0;
.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;
}
}
}
}
.add-demo {
.search-area {
height: 100%;
}
::v-deep .el-textarea__inner {
width: 1000px;
}
.el-tab-pane {
height: 100%;
flex: auto;
display: flex;
flex-direction: column;
}
}
}
}
.add-demo {
.search-area {
height: 100%;
}
::v-deep .el-textarea__inner {
width: 1000px;
}
}
}
</style>