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,
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

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

View File

@ -25,7 +25,7 @@
<!-- 是否签署 -->
<el-form-item :label="$t('trials:self-attachment:table:isSign')">
<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"/>
</template>
</el-select>
@ -77,8 +77,8 @@
sortable="custom"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
<el-tag v-else type="primary">{{ $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('TrainingStatus', scope.row.IsDeleted) }}</el-tag>
</template>
</el-table-column>
<!-- 上传时间 -->
@ -96,8 +96,8 @@
sortable="custom"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsConfirmed" type="primary">{{ $fd('YesOrNo', scope.row.IsConfirmed) }}</el-tag>
<el-tag v-else type="danger">{{ $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('TrainingStatusEnum', scope.row.IsConfirmed) }}</el-tag>
</template>
</el-table-column>
<!-- 签署时间 -->

View File

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

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

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

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)
})
}
}

View File

@ -12380,7 +12380,8 @@ class PDFPageView {
c.style.color = "rgba(0, 191, 255, 0.1)";
c.style.whiteSpace = 'nowrap'
// 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);
}
}