Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is running Details

uat_us
caiyiling 2025-01-08 15:58:56 +08:00
commit 05cf250c21
10 changed files with 161 additions and 79 deletions

View File

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

View File

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

View File

@ -76,7 +76,7 @@
style="width: 120px" style="width: 120px"
> >
<el-option <el-option
v-for="i of $d.YesOrNo" v-for="i of $d.TrainingStatusEnum"
:key="'IsConfirmed' + i.label" :key="'IsConfirmed' + i.label"
:value="i.value" :value="i.value"
:label="i.label" :label="i.label"
@ -90,7 +90,7 @@
style="width: 120px" style="width: 120px"
> >
<el-option <el-option
v-for="i of $d.YesOrNo" v-for="i of $d.TrainingStatus"
:key="'IsDeleted' + i.label" :key="'IsDeleted' + i.label"
:value="i.value" :value="i.value"
:label="i.label" :label="i.label"
@ -176,10 +176,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ <el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd('YesOrNo', scope.row.IsDeleted) $fd('TrainingStatus', scope.row.IsDeleted)
}}</el-tag> }}</el-tag>
<el-tag v-else type="primary">{{ <el-tag v-else type="primary">{{
$fd('YesOrNo', scope.row.IsDeleted) $fd('TrainingStatus', scope.row.IsDeleted)
}}</el-tag> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -199,11 +199,11 @@
sortable="custom" sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="!scope.row.IsConfirmed" type="primary">{{ <el-tag v-if="scope.row.IsConfirmed" type="primary">{{
$fd('YesOrNo', scope.row.IsConfirmed) $fd('TrainingStatusEnum', scope.row.IsConfirmed)
}}</el-tag> }}</el-tag>
<el-tag v-else type="danger">{{ <el-tag v-else type="danger">{{
$fd('YesOrNo', scope.row.IsConfirmed) $fd('TrainingStatusEnum', scope.row.IsConfirmed)
}}</el-tag> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -25,7 +25,7 @@
<!-- 是否签署 --> <!-- 是否签署 -->
<el-form-item :label="$t('trials:self-attachment:table:isSign')"> <el-form-item :label="$t('trials:self-attachment:table:isSign')">
<el-select v-model="searchData.IsSign" clearable style="width:120px;"> <el-select v-model="searchData.IsSign" clearable style="width:120px;">
<template v-for="item of $d.YesOrNo"> <template v-for="item of $d.TrainingStatusEnum">
<el-option v-if="item.raw.ValueCN !== ''" :label="item.label" :value="item.value" :key="item.id"/> <el-option v-if="item.raw.ValueCN !== ''" :label="item.label" :value="item.value" :key="item.id"/>
</template> </template>
</el-select> </el-select>
@ -77,8 +77,8 @@
sortable="custom" sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag> <el-tag v-if="scope.row.IsDeleted" type="danger">{{ $fd('TrainingStatus', scope.row.IsDeleted) }}</el-tag>
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag> <el-tag v-else type="primary">{{ $fd('TrainingStatus', scope.row.IsDeleted) }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 上传时间 --> <!-- 上传时间 -->
@ -96,8 +96,8 @@
sortable="custom" sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsConfirmed" type="primary">{{ $fd('YesOrNo', scope.row.IsConfirmed) }}</el-tag> <el-tag v-if="scope.row.IsConfirmed" type="primary">{{ $fd('TrainingStatusEnum', scope.row.IsConfirmed) }}</el-tag>
<el-tag v-else type="danger">{{ $fd('YesOrNo', scope.row.IsConfirmed) }}</el-tag> <el-tag v-else type="danger">{{ $fd('TrainingStatusEnum', scope.row.IsConfirmed) }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 签署时间 --> <!-- 签署时间 -->

View File

@ -33,7 +33,7 @@
v-for="item of $d.TrainingStatus" v-for="item of $d.TrainingStatus"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="!item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -136,10 +136,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ <el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd('TrainingStatus', !scope.row.IsDeleted) $fd('TrainingStatus', scope.row.IsDeleted)
}}</el-tag> }}</el-tag>
<el-tag v-else type="primary">{{ <el-tag v-else type="primary">{{
$fd('TrainingStatus', !scope.row.IsDeleted) $fd('TrainingStatus', scope.row.IsDeleted)
}}</el-tag> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>

View File

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

View File

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

View File

@ -42,6 +42,12 @@
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column
:label="$t('trials:sysDocBeSigned:table:ConfirmTime')"
prop="ConfirmTime"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column <el-table-column
:label="$t('common:action:action')" :label="$t('common:action:action')"
width="140" width="140"

View File

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

View File

@ -12380,7 +12380,8 @@ class PDFPageView {
c.style.color = "rgba(0, 191, 255, 0.1)"; c.style.color = "rgba(0, 191, 255, 0.1)";
c.style.whiteSpace = 'nowrap' c.style.whiteSpace = 'nowrap'
// c.innerText = text;//text为水印内容可以在viewer.html中传入也可以直接替换成固定的字符串如c.innerText = "这是一个水印"; // c.innerText = text;//text为水印内容可以在viewer.html中传入也可以直接替换成固定的字符串如c.innerText = "这是一个水印";
c.innerText = `${obj.COMPANY}_${obj.userName}\n${new Date().format('yyyy-MM-dd')}`; // c.innerText = `${obj.COMPANY}_${obj.userName}\n${new Date().format('yyyy-MM-dd')}`;
c.innerText = `${obj.userName}\n${new Date().format('yyyy-MM-dd')}`;
cover.appendChild(c); cover.appendChild(c);
} }
} }