1.07部分问题修复
continuous-integration/drone/push Build is running Details

uat_us
wangxiaoshuang 2025-01-08 14:01:26 +08:00
parent 3c664e9ba6
commit e5a17d20b1
5 changed files with 138 additions and 63 deletions

View File

@ -47,6 +47,7 @@ const getters = {
language: state => state.lang.language,
TotalNeedSignSystemDocCount: state => state.user.TotalNeedSignSystemDocCount,
TotalNeedSignTrialDocCount: state => state.user.TotalNeedSignTrialDocCount,
IsFirstSysDocNeedSign: state => state.user.IsFirstSysDocNeedSign,
TrialStatusStr: state => state.user.TrialStatusStr
}
export default getters

View File

@ -18,6 +18,7 @@ const getDefaultState = () => {
/* eslint-disable */
TotalNeedSignSystemDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0,
TotalNeedSignTrialDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0,
IsFirstSysDocNeedSign: false,
TrialStatusStr: null,
isTestUser: false,
roles: []
@ -65,6 +66,10 @@ const mutations = {
SET_ISTESTUSER: (state, isTestUser) => {
state.isTestUser = eval(isTestUser)
},
SET_IS_FIRST_SYSTEM_DOC_SIGN: (state, IsFirstSysDocNeedSign) => {
zzSessionStorage.setItem('IsFirstSysDocNeedSign', IsFirstSysDocNeedSign)
state.IsFirstSysDocNeedSign = IsFirstSysDocNeedSign
},
SET_NEED_SIGN_SYSTEM_DOC_COUNT: (state, TotalNeedSignSystemDocCount) => {
/* eslint-disable */
if (eval(process.env.VUE_APP_WORD_FOR_PERMISSION) && !state.isTestUser) {
@ -216,6 +221,9 @@ const actions = {
setTotalNeedSignSystemDocCount({ commit }, TotalNeedSignSystemDocCount) {
commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', TotalNeedSignSystemDocCount)
},
setIsFirstSysDocNeedSign({ commit }, IsFirstSysDocNeedSign) {
commit('SET_IS_FIRST_SYSTEM_DOC_SIGN', IsFirstSysDocNeedSign)
},
setTotalNeedSignTrialDocCount({ commit }, TotalNeedSignTrialDocCount) {
commit('SET_NEED_SIGN_TRIALS_DOC_COUNT', TotalNeedSignTrialDocCount)
},
@ -238,6 +246,7 @@ const actions = {
commit('SET_USERNAME', zzSessionStorage.getItem('userName'))
commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignSystemDocCount')))
commit('SET_NEED_SIGN_TRIALS_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignTrialDocCount')))
commit('SET_IS_FIRST_SYSTEM_DOC_SIGN', zzSessionStorage.getItem('IsFirstSysDocNeedSign'))
// console.log(zzSessionStorage.getItem('TotalNeedSignSystemDocCount'))
// console.log(zzSessionStorage.getItem('TotalNeedSignTrialDocCount'))
zzSessionStorage.setItem('userName', user.name)

View File

@ -172,7 +172,7 @@
:model="permission"
:rules="permissionRole"
ref="permissionForm"
label-width="140px"
label-width="230px"
class="demo-ruleForm"
>
<el-form-item

View File

@ -3,12 +3,33 @@
<el-row>
<el-col :span="12">
<!-- 待签署的系统文件 -->
<h3>{{ !isSigned ? $t('trials:workbench:title:sysDocBeSigned') : $t('trials:workbench:title:sysDocSigned') }}</h3>
</el-col>
<el-col :span="12" style="text-align:right;">
<h3>
<Pagination class="page" :total="total" :page.sync="listQuery.pageIndex" :limit.sync="listQuery.pageSize" layout="total, sizes, prev, pager, next" :background="false" style="display: inline-block;" @pagination="getList" />
<el-button icon="el-icon-refresh-left" size="small" circle :title="$t('common:button:reset')" @click="handleReset" />
{{
!isSigned
? $t('trials:workbench:title:sysDocBeSigned')
: $t('trials:workbench:title:sysDocSigned')
}}
</h3>
</el-col>
<el-col :span="12" style="text-align: right">
<h3>
<Pagination
class="page"
:total="total"
:page.sync="listQuery.pageIndex"
:limit.sync="listQuery.pageSize"
layout="total, sizes, prev, pager, next"
:background="false"
style="display: inline-block"
@pagination="getList"
/>
<el-button
icon="el-icon-refresh-left"
size="small"
circle
:title="$t('common:button:reset')"
@click="handleReset"
/>
</h3>
</el-col>
</el-row>
@ -18,10 +39,10 @@
v-loading="listLoading"
:data="list"
:show-header="true"
v-adaptive="{bottomOffset:45}"
v-adaptive="{ bottomOffset: 45 }"
height="100"
@sort-change="handleSortByColumn"
:default-sort ="{prop: 'UpdateTime', order: 'descending'}"
:default-sort="{ prop: 'UpdateTime', order: 'descending' }"
>
<el-table-column type="index" width="40" />
<el-table-column
@ -42,10 +63,7 @@
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
:label="$t('common:action:action')"
width="140"
>
<el-table-column :label="$t('common:action:action')" width="140">
<template slot-scope="scope">
<!-- 预览 -->
<el-button
@ -59,6 +77,7 @@
icon="el-icon-edit-outline"
circle
v-if="!isSigned"
:disabled="IsFirstSysDocNeedSign && !~scope.row.DocTypeCode"
:title="$t('trials:needSignSysDoc:action:sign')"
@click="handleSign(scope.row)"
/>
@ -75,11 +94,16 @@
append-to-body
custom-class="base-dialog-wrapper"
>
<span v-if="!currentIsConfirm" style="position: fixed;right: 75px;top: 14px;">
<span style="color:red;margin-right:10px;">
<span
v-if="!currentIsConfirm"
style="position: fixed; right: 75px; top: 14px"
>
<span style="color: red; margin-right: 10px">
<!-- 请仔细阅读文件并签名确认 -->
{{ $t('common:message:signTip') }}
<span v-show="duration < currentMinMinutes * 60">{{ `(${currentMinMinutes * 60 - duration}s)` }}</span>
<span v-show="duration < currentMinMinutes * 60">{{
`(${currentMinMinutes * 60 - duration}s)`
}}</span>
</span>
<el-button
@ -93,8 +117,16 @@
</el-button>
</span>
<div class="base-modal-body" style="border:2px solid #ccc;padding: 10px">
<PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" @getList="getList" />
<div
class="base-modal-body"
style="border: 2px solid #ccc; padding: 10px"
>
<PreviewFile
v-if="previewVisible"
:file-path="currentPath"
:file-type="currentType"
@getList="getList"
/>
</div>
</el-dialog>
@ -107,24 +139,36 @@
append-to-body
>
<div slot="title">
<span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${ currentUser })` }}</span>
<span style="font-size: 18px">{{ $t('common:dialogTitle:sign') }}</span>
<span style="font-size: 12px; margin-left: 5px">{{
`(${$t('common:label:sign')}${currentUser})`
}}</span>
</div>
<SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName" @closeDialog="closeSignDialog" />
<SignForm
:is-system-doc="currentRow.IsSystemDoc"
:document-id="currentRow.Id"
:file-name="fileName"
@closeDialog="closeSignDialog"
/>
</el-dialog>
</div>
</template>
<script>
import { getWaitSignSysDocList,getNextUnSignDocument, setSystemDocFirstViewTime } from '@/api/trials'
import {
getWaitSignSysDocList,
getNextUnSignDocument,
setSystemDocFirstViewTime,
} from '@/api/trials'
import Pagination from '@/components/Pagination'
import PreviewFile from '@/components/PreviewFile/index'
import SignForm from '@/views/trials/trials-panel/attachments/self-attachment/components/SignForm'
import { mapGetters } from 'vuex'
const searchDataDefault = () => {
return {
pageIndex: 1,
pageSize: 20,
asc: false,
sortField: 'UpdateTime'
sortField: 'UpdateTime',
}
}
export default {
@ -133,8 +177,10 @@ export default {
props: {
isSigned: {
type: Boolean,
default() { return false }
}
default() {
return false
},
},
},
data() {
return {
@ -153,7 +199,7 @@ export default {
currentType: '',
currentIsConfirm: false,
currentUser: zzSessionStorage.getItem('userName'),
currentRow: {}
currentRow: {},
}
},
mounted() {
@ -164,13 +210,18 @@ export default {
this.stopTimer()
}
},
computed: {
...mapGetters(['IsFirstSysDocNeedSign']),
},
methods: {
//
handlePreview(row) {
this.currentRow = { ...row }
const { Name, FullFilePath, SignViewMinimumMinutes } = row
this.currentPath = FullFilePath
this.currentType = row.Name ? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase() : ''
this.currentType = row.Name
? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase()
: ''
this.currentMinMinutes = SignViewMinimumMinutes
this.currentIsConfirm = true
this.title = Name
@ -178,32 +229,40 @@ export default {
},
getList() {
this.listQuery.IsSigned = this.isSigned
getWaitSignSysDocList(this.listQuery).then(res => {
this.listLoading = false
this.total = res.Result.TotalCount
this.list = res.Result.CurrentPageData
}).catch(() => { this.listLoading = false })
getWaitSignSysDocList(this.listQuery)
.then((res) => {
this.listLoading = false
this.total = res.Result.TotalCount
this.list = res.Result.CurrentPageData
})
.catch(() => {
this.listLoading = false
})
},
handleSign(row) {
this.currentRow = { ...row }
const { Name, FullFilePath, SignViewMinimumMinutes } = row
this.currentPath = FullFilePath
this.currentType = row.Name ? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase() : ''
this.currentType = row.Name
? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase()
: ''
this.currentMinMinutes = SignViewMinimumMinutes
this.currentIsConfirm = false
this.title = Name
this.fileName = Name.slice(0, Name.lastIndexOf('.'))
this.listLoading = true
setSystemDocFirstViewTime(row.Id).then(res => {
this.listLoading = false
this.previewVisible = true
const _this = this
setTimeout(() => {
_this.initTimer()
}, 1000)
}).catch(() => {
this.listLoading = false
})
setSystemDocFirstViewTime(row.Id)
.then((res) => {
this.listLoading = false
this.previewVisible = true
const _this = this
setTimeout(() => {
_this.initTimer()
}, 1000)
})
.catch(() => {
this.listLoading = false
})
},
//
handleSortByColumn(column) {
@ -233,24 +292,29 @@ export default {
this.currentIsConfirm = true
// this.getList()
// this.$emit('refreshStats')
this.$confirm(this.$t('trials:self-attachment:message:nextDocument')).then(res => {
getNextUnSignDocument({}).then(res => {
if (!res.Result) {
//
this.$confirm(this.$t('trials:self-attachment:message:closeDocument')).then(() => {
this.previewVisible = false
}).catch(()=>{})
} else {
this.handleSign(res.Result)
}
this.getList()
this.$emit('refreshStats')
this.$confirm(this.$t('trials:self-attachment:message:nextDocument'))
.then((res) => {
getNextUnSignDocument({}).then((res) => {
if (!res.Result) {
//
this.$confirm(
this.$t('trials:self-attachment:message:closeDocument')
)
.then(() => {
this.previewVisible = false
})
.catch(() => {})
} else {
this.handleSign(res.Result)
}
this.getList()
this.$emit('refreshStats')
})
})
.catch(() => {
this.currentIsConfirm = true
this.getList()
})
}).catch(() => {
this.currentIsConfirm = true
this.getList()
})
}
},
// ,
@ -276,14 +340,13 @@ export default {
stopTimer() {
clearInterval(this.timer)
this.timer = null
}
}
},
},
}
</script>
<style lang="scss" scoped>
.needSignSys-wrapper{
.needSignSys-wrapper {
height: 100%;
}
</style>

View File

@ -530,7 +530,9 @@ export default {
getUserTobeDoneRecord() {
getUserTobeDoneRecord().then(async res => {
this.tabList = res.Result
this.isSignSystemDoc = this.tabList.IsFirstSysDocNeedSign
await store.dispatch('user/setTotalNeedSignSystemDocCount', this.tabList.SysWaitSignDocCount)
await store.dispatch('user/setIsFirstSysDocNeedSign', this.tabList.IsFirstSysDocNeedSign)
})
}
}