修改禅道已知问题

This commit is contained in:
qq787203167
2022-03-10 19:13:11 +08:00
parent 7fcd61cbfd
commit ca0e81a9c0
7 changed files with 293 additions and 178 deletions
+4 -2
View File
@@ -532,6 +532,8 @@ module.exports = {
BatchCancelCollection: 'Confirm batch cancel collection?', BatchCancelCollection: 'Confirm batch cancel collection?',
unsubscribeConfirm: 'unsubscribe confirm?', unsubscribeConfirm: 'unsubscribe confirm?',
confirmCancelCollection: 'confirm to cancel collection?', confirmCancelCollection: 'confirm to cancel collection?',
theRelease: 'The release date should not exceed the standard implementation date',
theRelease:'The release date should not exceed the standard implementation date' zoneOfApplication: 'zone of application',
releaseTime: 'release Time',
standardImplementationTime: 'Standard implementation time'
} }
+4 -1
View File
@@ -536,5 +536,8 @@ module.exports = {
BatchCancelCollection:'确认批量取消收藏?', BatchCancelCollection:'确认批量取消收藏?',
unsubscribeConfirm:'确认取消订阅?', unsubscribeConfirm:'确认取消订阅?',
confirmCancelCollection:'确认取消收藏?', confirmCancelCollection:'确认取消收藏?',
theRelease:'发布日期不能大于标准实施日期' theRelease:'发布日期不能大于标准实施日期',
zoneOfApplication:'适用地区',
releaseTime:'发布时间',
standardImplementationTime:'标准实施时间',
} }
@@ -11,7 +11,7 @@
<a-col :span="12" v-if="item.field_show_type === '1' || item.field_show_type === '11'"> <a-col :span="12" v-if="item.field_show_type === '1' || item.field_show_type === '11'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span> <span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
@@ -26,7 +26,7 @@
<a-col :span="12" v-else-if="item.field_show_type === '2'"> <a-col :span="12" v-else-if="item.field_show_type === '2'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span> <span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
@@ -41,7 +41,7 @@
<a-col :span="12" v-else-if="item.field_show_type === '3'"> <a-col :span="12" v-else-if="item.field_show_type === '3'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span> <span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
@@ -58,7 +58,7 @@
<a-col :span="12" v-else-if="item.field_show_type === '4'"> <a-col :span="12" v-else-if="item.field_show_type === '4'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span> <span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
@@ -73,7 +73,7 @@
<a-col :span="12" v-else-if="item.field_show_type === '5'"> <a-col :span="12" v-else-if="item.field_show_type === '5'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span> <span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
@@ -91,7 +91,7 @@
<a-col :span="12" v-else-if="item.field_show_type === '6'"> <a-col :span="12" v-else-if="item.field_show_type === '6'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span> <span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
@@ -106,7 +106,7 @@
<a-col :span="12" v-else-if="item.field_show_type === '7'"> <a-col :span="12" v-else-if="item.field_show_type === '7'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span> <span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
@@ -126,7 +126,7 @@
<a-col :span="24" v-else-if="item.field_show_type === '8'"> <a-col :span="24" v-else-if="item.field_show_type === '8'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span> <span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
@@ -141,7 +141,7 @@
<a-col :span="24" v-else-if="item.field_show_type === '9'"> <a-col :span="24" v-else-if="item.field_show_type === '9'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span> <span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
@@ -155,7 +155,7 @@
<a-col :span="24" v-else-if="item.field_show_type === '10'"> <a-col :span="24" v-else-if="item.field_show_type === '10'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span> <span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
@@ -171,7 +171,7 @@
<a-col :span="12" v-else-if="item.field_show_type === 'RADIO'"> <a-col :span="12" v-else-if="item.field_show_type === 'RADIO'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span> <span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
@@ -187,7 +187,7 @@
<a-col :span="12" v-else-if="item.field_show_type === '0'"> <a-col :span="12" v-else-if="item.field_show_type === '0'">
<div class="box-title-text" :title="item.db_field_txt"> <div class="box-title-text" :title="item.db_field_txt">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
<span class="title-text-text">{{item.db_field_txt}}</span> <span class="title-text-text">{{item.db_field_txt}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
@@ -206,7 +206,7 @@
<a-col :span="12" v-else-if="item.field_show_type === 'CHECKBOX'"> <a-col :span="12" v-else-if="item.field_show_type === 'CHECKBOX'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 0">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span> <span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
@@ -373,7 +373,7 @@
let rules = {} let rules = {}
this.ruleList.forEach((res, index) => { this.ruleList.forEach((res, index) => {
const rule = [] const rule = []
if (res.field_must_input == 0) { if (res.field_must_input == 1) {
if (res.field_show_type === '1') { if (res.field_show_type === '1') {
rule.push({ rule.push({
required: true, required: true,
@@ -158,6 +158,7 @@
this.reconnect() this.reconnect()
}, },
websocketOnmessage: function(e) { websocketOnmessage: function(e) {
console.log(e)
console.log('-----接收消息-------', e.data) console.log('-----接收消息-------', e.data)
var data = eval('(' + e.data + ')') //解析对象 var data = eval('(' + e.data + ')') //解析对象
if (data.cmd == 'topic') { if (data.cmd == 'topic') {
+7 -24
View File
@@ -15,7 +15,7 @@
:remove='remove' :remove='remove'
@change="handleChange"> @change="handleChange">
<p> <p>
<a-icon style="font-size: 67px;color: #c0c4cc;" type="cloud-upload"/> <a-icon class="action-upload" type="cloud-upload"/>
</p> </p>
<p class="ant-upload-text" style="font-size: 14px;line-height: 30px">{{this.$t('clickUpload')}}</p> <p class="ant-upload-text" style="font-size: 14px;line-height: 30px">{{this.$t('clickUpload')}}</p>
</a-upload-dragger> </a-upload-dragger>
@@ -65,6 +65,7 @@
} }
}, },
beforeUpload(file) { beforeUpload(file) {
console.log(file) console.log(file)
// let thisFileType = this.thisFileType.replace(/\s+/g, ""); // let thisFileType = this.thisFileType.replace(/\s+/g, "");
this.fileTypeSatus = true this.fileTypeSatus = true
@@ -92,29 +93,6 @@
remove() { remove() {
this.fileTypeSatus = true this.fileTypeSatus = true
}, },
mydownload(item) {
var fileName = item.fileName
downFile(this.downLoadFileUrl + '/' + item.ext1, {}).then((data) => {
if (!data) {
this.$message.destroy()
this.$message.warning('文件下载失败')
return
}
if (typeof window.navigator.msSaveBlob !== 'undefined') {
window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName)
} else {
let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
let link = document.createElement('a')
link.style.display = 'none'
link.href = url
link.setAttribute('download', fileName)
document.body.appendChild(link)
link.click()
document.body.removeChild(link) //下载完成移除元素
window.URL.revokeObjectURL(url) //释放掉blob对象
}
})
},
mypreview(item) { mypreview(item) {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
window.open(url, '_blank') window.open(url, '_blank')
@@ -221,4 +199,9 @@
.ant-upload-list-item-name { .ant-upload-list-item-name {
color: rgba(0, 0, 0, 0.65) !important; color: rgba(0, 0, 0, 0.65) !important;
} }
.action-upload {
font-size: 67px;
color: #c0c4cc;
}
</style> </style>
+26 -4
View File
@@ -72,14 +72,36 @@ const err = (error) => {
notification.error({ message: '系统提示', description: '网络超时' }) notification.error({ message: '系统提示', description: '网络超时' })
break break
case 401: case 401:
notification.error({ message: '系统提示', description: '未授权,请重新登录', duration: 4 }) if (token && data.message.includes('Token失效')) {
if (token) { Modal.error({
title: '登录已过期',
content: '很抱歉,登录已过期,请重新登录',
okText: '重新登录',
mask: false,
onOk: () => {
store.dispatch('Logout').then(() => { store.dispatch('Logout').then(() => {
setTimeout(() => { Vue.ls.remove(ACCESS_TOKEN)
try {
let path = window.document.location.pathname
console.log('location pathname -> ' + path)
if (path != '/' && path.indexOf('/user/login') == -1) {
window.location.reload() window.location.reload()
}, 1500) }
} catch (e) {
window.location.reload()
}
}) })
} }
})
}
// notification.error({ message: '系统提示', description: '未授权,请重新登录', duration: 4 })
// if (token) {
// store.dispatch('Logout').then(() => {
// setTimeout(() => {
// window.location.reload()
// }, 1500)
// })
// }
break break
default: default:
notification.error({ notification.error({
@@ -40,11 +40,21 @@
ref="table" ref="table"
size="middle" size="middle"
bordered bordered
:scroll="{x: true}"
rowKey="id" rowKey="id"
:data-source="tableData" :data-source="tableData"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns" :columns="columns"
> >
<span slot="operation" slot-scope="record">
<a @click="Collection(record)" class="text-operation">
{{!record.collectFlag || record.collectFlag == 0 ? $t('Collection') :$t('CancelCollection')}}
</a>
<a @click="subscribe(record)" class="text-operation">
{{!record.subscribeFlag || record.subscribeFlag == 0 ? $t('subscribe') :$t('CancelSubscribe')}}
</a>
<a> {{$t('Push')}}</a>
</span>
<!-- 字符串超长截取省略号显示--> <!-- 字符串超长截取省略号显示-->
<!-- <span slot="templateContent" slot-scope="text">--> <!-- <span slot="templateContent" slot-scope="text">-->
<!-- <j-ellipsis :value="text" :length="25"/>--> <!-- <j-ellipsis :value="text" :length="25"/>-->
@@ -85,12 +95,22 @@
</div> </div>
</div> </div>
</div> </div>
<libraryPush
:url="url"
ref="libraryPushRef"
/>
</div> </div>
</template> </template>
<script> <script>
import eventBUs from '../../../../common/event'
import { getAction, postAction } from '@/api/manage'
import libraryPush from '@/components/libraryPush/index'
export default { export default {
name: 'DocumentLibrary', name: 'DocumentLibrary',
components:{
libraryPush
},
data() { data() {
return { return {
searchOption: [ searchOption: [
@@ -201,43 +221,61 @@
} }
], ],
tableData: [], tableData: [],
url:{
pullMessage: 'document/bussDocumentLibraryEO/pullMessage',//推送
},
columns: [ columns: [
{ {
title: '编号', title: this.$t('standard'),
align: 'center', align: 'center',
dataIndex: 'templateCode' dataIndex: 'templateCode'
}, },
{ {
title: '标题', title: this.$t('title'),
align: 'center', align: 'center',
dataIndex: 'templateName' dataIndex: 'templateName'
}, },
{ {
title: '文件名称', title: this.$t('fileName'),
align: 'center', align: 'center',
dataIndex: 'template' dataIndex: 'template'
}, },
{ {
title: '状态', title: this.$t('status'),
align: 'center', align: 'center',
dataIndex: 'templateCon', dataIndex: 'templateCon'
sorter: (a, b) => a.age - b.age
}, },
{ {
title: '适用地区', title: this.$t('zoneOfApplication'),
align: 'center', align: 'center',
dataIndex: 'templateCont', dataIndex: 'templateCont'
sorter: (a, b) => a.age - b.age
}, },
{ {
title: '功能领域', title: this.$t('functionalAreas'),
align: 'center', align: 'center',
dataIndex: 'templateContent1' dataIndex: 'templateContent1'
}, },
{ {
title: '技术领域', title: this.$t('technicalField'),
align: 'center', align: 'center',
dataIndex: 'templateContent2' dataIndex: 'templateContent2'
},
{
title: this.$t('releaseTime'),
align: 'center',
dataIndex: 'releaseTime'
},
{
title: this.$t('standardImplementationTime'),
align: 'center',
dataIndex: 'standardImplementationTime'
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 200,
scopedSlots: { customRender: 'operation' }
} }
], ],
selectedRowKeys: [], selectedRowKeys: [],
@@ -330,11 +368,72 @@
SizeChange(page, pageSize) { SizeChange(page, pageSize) {
this.pageNo = 1 this.pageNo = 1
this.pageSize = pageSize this.pageSize = pageSize
},
//收藏按钮
Collection(val) {
let _this = this
this.$confirm({
content: val.collectFlag == 0 || !val.collectFlag ? _this.$t('ConfirmCollection') : _this.$t('cancelConfirmCollection'),
onOk() {
let url = ''
if (val.collectFlag == 0 || !val.collectFlag) {
url = 'document/bussDocumentLibraryEO/addCollect'
} else {
url = 'document/bussDocumentLibraryEO/cancelCollect'
}
getAction(url, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
//订阅按钮
subscribe(val) {
let _this = this
this.$confirm({
content: val.subscribeFlag == 0 || !val.subscribeFlag ? _this.$t('ConfirmSubscribe') : _this.$t('cancelConfirmSubscribe'),
onOk() {
let url = ''
if (val.subscribeFlag == 0 || !val.subscribeFlag) {
url = 'document/bussDocumentLibraryEO/addSubscribe'
} else {
url = 'document/bussDocumentLibraryEO/cancelSubscribe'
}
getAction(url, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
//推送
handleCompare(val) {
let item = JSON.parse(JSON.stringify(val))
this.$nextTick(() => {
this.$refs.libraryPushRef.visible = true
this.$refs.libraryPushRef.tableKey = item.id.split(',')
})
} }
} }
} }
</script> </script>
<style> <style>
.table .ant-table-column-title {
font-weight: bold;
}
.ant-table td {
white-space: nowrap;
}
.checkbox-left .ant-checkbox-inner { .checkbox-left .ant-checkbox-inner {
width: 18px !important; width: 18px !important;
height: 18px !important; height: 18px !important;
@@ -495,8 +594,13 @@
padding: 0 0 0 8px; padding: 0 0 0 8px;
box-sizing: border-box; box-sizing: border-box;
} }
.page { .page {
text-align: right; text-align: right;
margin-top: 20px; margin-top: 20px;
} }
.text-operation {
margin-right: 8px;
}
</style> </style>