feat: There is no way the, 动态消息库

This commit is contained in:
super_liu
2022-06-02 16:47:18 +08:00
parent 40eb5276e4
commit 7a3afc0975
7 changed files with 227 additions and 73 deletions
+51 -29
View File
@@ -16,7 +16,6 @@
border border
style="cursor:pointer;" style="cursor:pointer;"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"> :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
style="width: 100%">
<el-table-column <el-table-column
label="序号" label="序号"
type="index" type="index"
@@ -26,31 +25,33 @@
<el-table-column <el-table-column
label="标准编号"> label="标准编号">
<template slot-scope="scope"> <template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump" style="color: #333333" <span @click="handlePreview(scope.row)">{{ scope.row.standard }}</span>
@click="handlePreview(scope.row)">{{ scope.row.standSort }} {{
scope.row.standNumber
}}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump" style="color: #333333">
{{ scope.row.standSort }}
{{ scope.row.standNumber }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="standName" prop="standName"
label="标准名称"> label="标准名称">
<template slot-scope="scope"> <template slot-scope="scope">
<span @click="handlePreview(scope.row)">{{ scope.row.standName }}</span> <span @click="handlePreview(scope.row)">{{ scope.row.standardName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="120" width="120"
label="发布时间"> label="发布时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.issueTime ? $moment(scope.row.issueTime).format('YYYY-MM-DD') : '' }}</span> <span>{{scope.row.releaseDate ? $moment(scope.row.releaseDate).format('YYYY-MM-DD') : '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="more" @click="togo">更多 </div> <div class="more" v-if="!pageVerify" @click="togo">更多 </div>
<loading :loading="loading">加载中...</loading>
<pagination
v-if="pageVerify"
style="position: static;"
:page="page"
:total="total"
@pageChange="pageChange"
@pageSizeChange="pageSizeChange"></pagination>
</div> </div>
</template> </template>
@@ -61,8 +62,13 @@ export default {
mixins: [], mixins: [],
data() { data() {
return { return {
putTime: '', loading: false,
standardReleaseList: [], //标准发布数据 pageVerify: false,
page: 1,
pageSize: 10,
total: 0,
putTime: '',
standardReleaseList: [], //标准发布数据
} }
}, },
computed: {}, computed: {},
@@ -73,16 +79,33 @@ export default {
// this.addDate() // this.addDate()
}, },
methods: { methods: {
pageChange(page) {
this.page = page
this.pageSize = this.$store.getters.userInfo.configContent
this.getAdvice()
},
// 分页每页显示数改变后方法
pageSizeChange(pageSize) {
this.pageSize = this.$store.getters.userInfo.configContent
this.getAdvice()
// 此处需要调用接口,修改个人配置
},
togo () { togo () {
this.$router.push('/processCenter') if(this.total && this.total > 10){
this.pageVerify = true
this.pageSize = this.$store.getters.userInfo.configContent
}else {
this.pageVerify = false
}
this.getAdvice()
}, },
// 点击查看 // 点击查看
handlePreview (item) { handlePreview (item) {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails', name: 'OtherStandardDetails',
params: { params: {
id: item.id, id: item.standardId,
pageType: item.standType + '_STAND' pageType: item.resourceType + '_STAND'
} }
}) })
window.open(routeUrl.href, '_blank') window.open(routeUrl.href, '_blank')
@@ -93,22 +116,21 @@ export default {
}, },
//获取数据 //获取数据
getAdvice() { getAdvice() {
let obj = {} this.loading = true
obj.limit = 10 this.$http.get("/lawss/NewsFeed/getNewsFeed", {
this.$http.get("/lawss/NewsFeed/getNewsFeed", {
messageType: 'GNWBZFG', messageType: 'GNWBZFG',
page: 1, page: this.page,
paeSize: 10 pageSize: this.pageSize
}, { }, {
_this: this _this: this,loading: 'loading'
}, res => { }, res => {
let arr = res.data this.standardReleaseList = res.data.records
arr.forEach(item => { this.total = res.data.total
if(item.standName !== ""){ this.loading = false
this.standardReleaseList.push(item)
}
})
}, e => { }, e => {
this.loading = false
this.standardReleaseList = []
this.total = 0
}) })
}, },
}, },
@@ -127,7 +149,7 @@ export default {
/deep/.more { /deep/.more {
position: absolute; position: absolute;
right: 0; right: 0;
bottom: 0; bottom: 2px;
font-size: 12px; font-size: 12px;
float: right; float: right;
color: #4788c0; color: #4788c0;
@@ -16,7 +16,6 @@
border border
style="cursor:pointer;" style="cursor:pointer;"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"> :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
style="width: 100%">
<el-table-column <el-table-column
label="序号" label="序号"
type="index" type="index"
@@ -24,20 +23,35 @@
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="standName" label="标准编号">
label="名称">
<template slot-scope="scope"> <template slot-scope="scope">
<span @click="handlePreview(scope.row)">{{ scope.row.standName }}</span> <span @click="handlePreview(scope.row)">{{ scope.row.standard }}</span>
</template>
</el-table-column>
<el-table-column
prop="standName"
label="标准名称">
<template slot-scope="scope">
<span @click="handlePreview(scope.row)">{{ scope.row.standardName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="120" width="120"
label="发布时间"> label="发布时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.issueTime ? $moment(scope.row.issueTime).format('YYYY-MM-DD') : '' }}</span> <span>{{scope.row.releaseDate ? $moment(scope.row.releaseDate).format('YYYY-MM-DD') : '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="more" v-if="!pageVerify" @click="togo">更多 </div>
<loading :loading="loading">加载中...</loading>
<pagination
v-if="pageVerify"
style="position: static;"
:page="page"
:total="total"
@pageChange="pageChange"
@pageSizeChange="pageSizeChange"></pagination>
</div> </div>
</template> </template>
@@ -48,6 +62,11 @@ export default {
mixins: [], mixins: [],
data() { data() {
return { return {
loading: false,
pageVerify: false,
page: 1,
pageSize: 10,
total: 0,
putTime: '', putTime: '',
standardReleaseList: [], //标准发布数据 standardReleaseList: [], //标准发布数据
} }
@@ -60,12 +79,32 @@ export default {
// this.addDate() // this.addDate()
}, },
methods: { methods: {
pageChange(page) {
this.page = page
this.pageSize = this.$store.getters.userInfo.configContent
this.getAdvice()
},
// 分页每页显示数改变后方法
pageSizeChange(pageSize) {
this.pageSize = this.$store.getters.userInfo.configContent
this.getAdvice()
// 此处需要调用接口,修改个人配置
},
togo () {
if(this.total && this.total > 10){
this.pageVerify = true
this.pageSize = this.$store.getters.userInfo.configContent
}else {
this.pageVerify = false
}
this.getAdvice()
},
// 点击查看 // 点击查看
handlePreview (item) { handlePreview (item) {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
name: 'OtherBussStandardDetails', name: 'OtherBussStandardDetails',
params: { params: {
id: item.id, id: item.standardId,
pageType: 'BUSINESS_STAND' pageType: 'BUSINESS_STAND'
} }
}) })
@@ -77,23 +116,22 @@ export default {
}, },
//获取数据 //获取数据
getAdvice() { getAdvice() {
let obj = {} this.loading = true
obj.limit = 10 this.$http.get("/lawss/NewsFeed/getNewsFeed", {
this.$http.get("/lawss/NewsFeed/getNewsFeed", {
messageType: 'QYBZFB', messageType: 'QYBZFB',
page: 1, page: this.page,
paeSize: 10 pageSize: this.pageSize
}, { }, {
_this: this _this: this,loading: 'loading'
}, res => { }, res => {
let arr = res.data this.standardReleaseList = res.data.records
arr.forEach(item => { this.total = res.data.total
if(item.standName !== ""){ this.loading = false
this.standardReleaseList.push(item) }, e => {
} this.loading = false
this.standardReleaseList = []
this.total = 0
}) })
}, e => {
})
}, },
}, },
@@ -108,6 +146,18 @@ export default {
/deep/.el-table td > .cell{ /deep/.el-table td > .cell{
font-size: 13px; font-size: 13px;
} }
/deep/.more {
position: absolute;
right: 0;
bottom: 2px;
font-size: 12px;
float: right;
color: #4788c0;
&:hover {
color: #3a8ee6;
cursor: pointer;
}
}
width: 100%; width: 100%;
.time-title { .time-title {
margin: 15px; margin: 15px;
+86 -20
View File
@@ -16,7 +16,6 @@
border border
style="cursor:pointer;" style="cursor:pointer;"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"> :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
style="width: 100%">
<el-table-column <el-table-column
label="序号" label="序号"
type="index" type="index"
@@ -24,20 +23,36 @@
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="standName" prop="standard"
label="名称"> label="标准编号">
<template slot-scope="scope"> <template slot-scope="scope">
<span @click="handlePreview(scope.row)">{{ scope.row.standName }}</span> <span @click="handlePreview(scope.row)">{{ scope.row.standard }}</span>
</template>
</el-table-column>
<el-table-column
prop="standardName"
label="标准名称">
<template slot-scope="scope">
<span @click="handlePreview(scope.row)">{{ scope.row.standardName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="120" width="120"
label="发布时间"> label="文本状态">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.issueTime ? $moment(scope.row.issueTime).format('YYYY-MM-DD') : '' }}</span> <span>{{ textStatusMap[scope.row.textState] }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="more" @click="togo">更多 </div>
<loading :loading="loading">加载中...</loading>
<pagination
v-if="pageVerify"
style="position: static;"
:page="page"
:total="total"
@pageChange="pageChange"
@pageSizeChange="pageSizeChange"></pagination>
</div> </div>
</template> </template>
@@ -48,25 +63,65 @@ export default {
mixins: [], mixins: [],
data() { data() {
return { return {
loading: false,
pageVerify: false,
page: 1,
pageSize: 10,
total: 0,
putTime: '', putTime: '',
standardReleaseList: [], //标准发布数据 standardReleaseList: [], //标准发布数据
textStatusMap: {} // 文本状态id与name对应
} }
}, },
computed: {}, computed: {},
watch: {}, watch: {},
mounted() { mounted() {
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
if (res.data.WBZTCLASS !== undefined && res.data.WBZTCLASS !== null){
this.setMap(res.data.WBZTCLASS) // 文本状态
}
}, e => {
})
this.getDate() this.getDate()
this.getAdvice() this.getAdvice()
// this.addDate() // this.addDate()
}, },
methods: { methods: {
pageChange(page) {
this.page = page
this.pageSize = this.$store.getters.userInfo.configContent
this.getAdvice()
},
// 分页每页显示数改变后方法
pageSizeChange(pageSize) {
this.pageSize = this.$store.getters.userInfo.configContent
this.getAdvice()
// 此处需要调用接口,修改个人配置
},
togo () {
if(this.total && this.total > 10){
this.pageVerify = true
this.pageSize = this.$store.getters.userInfo.configContent
}else {
this.pageVerify = false
}
this.getAdvice()
},
// 将文本状态的id与name对应
setMap(data) {
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label)
})
},
// 点击查看 // 点击查看
handlePreview (item) { handlePreview (item) {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails', name: 'OtherStandardDetails',
params: { params: {
id: item.id, id: item.standardId,
pageType: item.standType + '_STAND' pageType: item.resourceType + '_STAND'
} }
}) })
window.open(routeUrl.href, '_blank') window.open(routeUrl.href, '_blank')
@@ -77,23 +132,22 @@ export default {
}, },
//获取数据 //获取数据
getAdvice() { getAdvice() {
let obj = {} this.loading = true
obj.limit = 10
this.$http.get("/lawss/NewsFeed/getNewsFeed", { this.$http.get("/lawss/NewsFeed/getNewsFeed", {
messageType: 'ZYBZFG', messageType: 'ZYBZFG',
page: 1, page: this.page,
paeSize: 10 pageSize: this.pageSize
}, { }, {
_this: this _this: this,loading: 'loading'
}, res => { }, res => {
let arr = res.data this.standardReleaseList = res.data.records
arr.forEach(item => { this.total = res.data.total
if(item.standName !== ""){ this.loading = false
this.standardReleaseList.push(item) }, e => {
} this.loading = false
this.standardReleaseList = []
this.total = 0
}) })
}, e => {
})
}, },
}, },
@@ -108,6 +162,18 @@ export default {
/deep/.el-table td > .cell{ /deep/.el-table td > .cell{
font-size: 13px; font-size: 13px;
} }
/deep/.more {
position: absolute;
right: 0;
bottom: 2px;
font-size: 12px;
float: right;
color: #4788c0;
&:hover {
color: #3a8ee6;
cursor: pointer;
}
}
width: 100%; width: 100%;
.time-title { .time-title {
margin: 15px; margin: 15px;
+4 -4
View File
@@ -15,15 +15,15 @@
<span slot="label"><i class="el-icon-s-order"></i> 标准征求意见</span> <span slot="label"><i class="el-icon-s-order"></i> 标准征求意见</span>
<solicitOpinions></solicitOpinions> <solicitOpinions></solicitOpinions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="release"> <el-tab-pane name="release" style="overflow-y: auto;height: 100%">
<span slot="label"><i class="el-icon-s-promotion"></i> 国内外标准法规入库</span> <span slot="label"><i class="el-icon-s-promotion"></i> 国内外标准法规入库</span>
<release></release> <release></release>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="releaseUs"> <el-tab-pane name="releaseUs" style="overflow-y: auto;height: 100%">
<span slot="label"><i class="el-icon-s-promotion"></i> 在研标准法规入库</span> <span slot="label"><i class="el-icon-s-operation"></i> 在研标准法规入库</span>
<releaseUs></releaseUs> <releaseUs></releaseUs>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="releaseBuss"> <el-tab-pane name="releaseBuss" style="overflow-y: auto;height: 100%">
<span slot="label"><i class="el-icon-s-promotion"></i> 企业标准发布</span> <span slot="label"><i class="el-icon-s-promotion"></i> 企业标准发布</span>
<releaseBuss></releaseBuss> <releaseBuss></releaseBuss>
</el-tab-pane> </el-tab-pane>
@@ -2298,6 +2298,7 @@
// this.sarStandardsInfoEO.country = item.country.split(","); // this.sarStandardsInfoEO.country = item.country.split(",");
// } // }
this.fileInfoHandle() this.fileInfoHandle()
this.isSubmit = true
this.saveLoading = true this.saveLoading = true
let _formData = new FormData() let _formData = new FormData()
_formData.append('id', this.bpnId || '') _formData.append('id', this.bpnId || '')
@@ -2313,10 +2314,12 @@
commentText: this.formTongGuo.commentText commentText: this.formTongGuo.commentText
})) }))
saveTaskForPub(_formData).then(res => { saveTaskForPub(_formData).then(res => {
this.isSubmit = false
this.saveLoading = false this.saveLoading = false
this.$message.success('保存成功') this.$message.success('保存成功')
this.bpnId = res.result this.bpnId = res.result
}).catch(e => { }).catch(e => {
this.isSubmit = false
this.saveLoading = false this.saveLoading = false
}) })
}, },
@@ -2339,6 +2339,7 @@
// } // }
this.fileInfoHandle() this.fileInfoHandle()
this.saveLoading = true this.saveLoading = true
this.isSubmit = true
let _formData = new FormData() let _formData = new FormData()
_formData.append('id', this.bpnId || '') _formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId) _formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -2355,10 +2356,12 @@
})) }))
saveTaskForPub(_formData).then(res => { saveTaskForPub(_formData).then(res => {
this.saveLoading = false this.saveLoading = false
this.isSubmit = false
this.$message.success('保存成功') this.$message.success('保存成功')
this.bpnId = res.result this.bpnId = res.result
}).catch(e => { }).catch(e => {
this.saveLoading = false this.saveLoading = false
this.isSubmit = false
}) })
}, },
fileInfoHandle(){ fileInfoHandle(){
@@ -2475,6 +2478,7 @@
this.$refs['formTongGuo'].validate((valid) => { this.$refs['formTongGuo'].validate((valid) => {
if (valid) { if (valid) {
this.isSubmit = true this.isSubmit = true
this.saveLoading = true
this.form.commentText = this.formTongGuo.commentText this.form.commentText = this.formTongGuo.commentText
this.form.approvalOpinion = this.formTongGuo.approvalOpinion this.form.approvalOpinion = this.formTongGuo.approvalOpinion
this.form.topId = this.pId this.form.topId = this.pId
@@ -2490,7 +2494,7 @@
// this.$message.success(res.message) // this.$message.success(res.message)
// 流程提交之后,应该流转至待办任务页面 // 流程提交之后,应该流转至待办任务页面
this.isSubmit = false this.isSubmit = false
this.submitLoading = false this.saveLoading = false
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
// this.processCreateBuss(json) // this.processCreateBuss(json)
// if(this.formTongGuo.approvalOpinion === '1'){ // if(this.formTongGuo.approvalOpinion === '1'){
@@ -2502,6 +2506,8 @@
// this.processCreateLaws(json) // this.processCreateLaws(json)
// } // }
}else { }else {
this.isSubmit = false
this.saveLoading = false
this.$message.success(res.message) this.$message.success(res.message)
} }
}) })
@@ -2340,6 +2340,7 @@
// this.sarStandardsInfoEO.country = item.country.split(","); // this.sarStandardsInfoEO.country = item.country.split(",");
// } // }
this.fileInfoHandle() this.fileInfoHandle()
this.isSubmit = true
this.saveLoading = true this.saveLoading = true
let _formData = new FormData() let _formData = new FormData()
_formData.append('id', this.bpnId || '') _formData.append('id', this.bpnId || '')
@@ -2356,10 +2357,12 @@
commentText: this.formTongGuo.commentText commentText: this.formTongGuo.commentText
})) }))
saveTaskForPub(_formData).then(res => { saveTaskForPub(_formData).then(res => {
this.isSubmit = false
this.saveLoading = false this.saveLoading = false
this.$message.success('保存成功') this.$message.success('保存成功')
this.bpnId = res.result this.bpnId = res.result
}).catch(e => { }).catch(e => {
this.isSubmit = false
this.saveLoading = false this.saveLoading = false
}) })
}, },
@@ -2479,6 +2482,7 @@
this.$refs['formTongGuo'].validate((valid) => { this.$refs['formTongGuo'].validate((valid) => {
if (valid) { if (valid) {
this.isSubmit = true this.isSubmit = true
this.saveLoading = true
this.form.commentText = this.formTongGuo.commentText this.form.commentText = this.formTongGuo.commentText
this.form.approvalOpinion = this.formTongGuo.approvalOpinion this.form.approvalOpinion = this.formTongGuo.approvalOpinion
this.form.topId = this.pId this.form.topId = this.pId
@@ -2494,6 +2498,7 @@
// this.$message.success(res.message) // this.$message.success(res.message)
// 流程提交之后,应该流转至待办任务页面 // 流程提交之后,应该流转至待办任务页面
this.isSubmit = false this.isSubmit = false
this.saveLoading = false
this.processCreateBuss(json) this.processCreateBuss(json)
// if(this.formTongGuo.approvalOpinion === '1'){ // if(this.formTongGuo.approvalOpinion === '1'){
// this.$message.warning("驳回成功") // this.$message.warning("驳回成功")
@@ -2504,6 +2509,8 @@
// this.processCreateLaws(json) // this.processCreateLaws(json)
// } // }
}else { }else {
this.isSubmit = false
this.saveLoading = false
this.$message.success(res.message) this.$message.success(res.message)
} }
}) })