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

uat
caiyiling 2025-04-18 16:01:28 +08:00
commit b0ae3cbd27
3 changed files with 77 additions and 10 deletions

View File

@ -212,7 +212,20 @@ export function getSystemDocumentList(param) {
data: param data: param
}) })
} }
export function publishSystemDocument(param) {
return request({
url: `/SystemDocument/publishSystemDocument`,
method: 'post',
data: param
})
}
export function outLineSystemDocument(param) {
return request({
url: `/SystemDocument/outLineSystemDocument`,
method: 'post',
data: param
})
}
export function addOrUpdateSystemDocument(param) { export function addOrUpdateSystemDocument(param) {
return request({ return request({
url: `/SystemDocument/addOrUpdateSystemDocument`, url: `/SystemDocument/addOrUpdateSystemDocument`,

View File

@ -59,14 +59,24 @@
<el-button type="primary" size="small" @click="handleAdd"> <el-button type="primary" size="small" @click="handleAdd">
{{ $t('common:button:new') }} {{ $t('common:button:new') }}
</el-button> </el-button>
<el-button type="primary" size="small" :disabled="multipleSelection.length <= 0"
@click="publishSystemDocument(multipleSelection)">
{{ $t('dictionary:signature:button:publish') }}
</el-button>
<el-button type="primary" size="small" :disabled="multipleSelection.length <= 0"
@click="handleRepeal(multipleSelection)">
{{ $t('common:button:revoke') }}
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
<template slot="main-container"> <template slot="main-container">
<el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list" stripe height="100" <el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list" stripe height="100"
@sort-change="handleSortByColumn"> @sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
<el-table-column type="index" width="40" /> <!-- <el-table-column type="index" width="40" /> -->
<el-table-column type="selection" width="55" :selectable="handleSelectable">
</el-table-column>
<el-table-column prop="FileType" :label="$t('dictionary:signature:table:FileType')" show-overflow-tooltip <el-table-column prop="FileType" :label="$t('dictionary:signature:table:FileType')" show-overflow-tooltip
sortable="custom" min-width="120px" /> sortable="custom" min-width="120px" />
<el-table-column prop="Name" :label="$t('dictionary:signature:table:Name')" show-overflow-tooltip <el-table-column prop="Name" :label="$t('dictionary:signature:table:Name')" show-overflow-tooltip
@ -99,6 +109,14 @@
}}</el-tag> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="IsPublish" :label="$t('dictionary:signature:table:IsPublish')" show-overflow-tooltip
sortable="custom" min-width="120px">
<template slot-scope="scope">
<el-tag :type="scope.row.IsPublish ? 'primary' : 'danger'">{{
$fd('AttachmentPublishStatus', scope.row.IsPublish)
}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="DocUserSignType" :label="$t('dictionary:signature:table:DocUserSignType')" <el-table-column prop="DocUserSignType" :label="$t('dictionary:signature:table:DocUserSignType')"
show-overflow-tooltip sortable="custom" min-width="150px"> show-overflow-tooltip sortable="custom" min-width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
@ -114,7 +132,7 @@
<el-table-column prop="CreateTime" :label="$t('dictionary:signature:table:CreateTime')" show-overflow-tooltip <el-table-column prop="CreateTime" :label="$t('dictionary:signature:table:CreateTime')" show-overflow-tooltip
sortable="custom" min-width="180px" /> sortable="custom" min-width="180px" />
<el-table-column :label="$t('common:action:action')" min-width="180px" fixed="right"> <el-table-column :label="$t('common:action:action')" min-width="220px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="handlePreview(scope.row)"> <el-button type="text" @click="handlePreview(scope.row)">
{{ $t('common:button:preview') }} {{ $t('common:button:preview') }}
@ -122,7 +140,11 @@
<el-button type="text" @click="handleEdit(scope.row)"> <el-button type="text" @click="handleEdit(scope.row)">
{{ $t('common:button:edit') }} {{ $t('common:button:edit') }}
</el-button> </el-button>
<el-button :disabled="scope.row.IsDeleted" type="text" @click="handleRepeal(scope.row)"> <el-button :disabled="scope.row.IsPublish || scope.row.IsDeleted" type="text"
@click="publishSystemDocument([scope.row])">
{{ $t('dictionary:signature:button:publish') }}
</el-button>
<el-button :disabled="scope.row.IsDeleted" type="text" @click="handleRepeal([scope.row])">
{{ $t('common:button:revoke') }} {{ $t('common:button:revoke') }}
</el-button> </el-button>
<el-button type="text" @click="handleDelete(scope.row)"> <el-button type="text" @click="handleDelete(scope.row)">
@ -153,7 +175,7 @@
</BaseContainer> </BaseContainer>
</template> </template>
<script> <script>
import { getSystemDocumentList, deleteSystemDocument } from '@/api/dictionary' import { getSystemDocumentList, deleteSystemDocument, publishSystemDocument, outLineSystemDocument } from '@/api/dictionary'
import { userAbandonDoc, getTrialUserTypeList } from '@/api/trials' import { userAbandonDoc, getTrialUserTypeList } from '@/api/trials'
import BaseContainer from '@/components/BaseContainer' import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
@ -208,7 +230,8 @@ export default {
visible: false, visible: false,
title: this.$t('dictionary:signature:attachmentList:title'), title: this.$t('dictionary:signature:attachmentList:title'),
width: '800px', width: '800px',
} },
multipleSelection: []
} }
}, },
mounted() { mounted() {
@ -216,6 +239,34 @@ export default {
this.getUserType() this.getUserType()
}, },
methods: { methods: {
handleSelectable(row) {
return !row.IsDeleted
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
//
async publishSystemDocument(list) {
try {
let confirm = await this.$confirm(this.$t('dictionary:signature:confirm:publishFile'), {
type: 'warning',
distinguishCancelAndClose: true,
})
if (!confirm) return false
let data = {
ids: list.map(item => item.Id)
}
this.loading = true
let res = await publishSystemDocument(data)
this.loading = false
if (res.IsSuccess) {
this.getList()
}
} catch (err) {
this.loading = false
console.log(err)
}
},
openAttachment(row) { openAttachment(row) {
this.SystemDocumentId = row.Id this.SystemDocumentId = row.Id
this.config.visible = true this.config.visible = true
@ -289,8 +340,11 @@ export default {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}) })
.then(() => { .then(() => {
let data = {
Ids: row.map(item => item.Id)
}
this.loading = true this.loading = true
userAbandonDoc(row.Id, true) outLineSystemDocument(data)
.then((res) => { .then((res) => {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {

View File

@ -17,12 +17,12 @@
<el-form-item :label="$t('system:loginLog:table:LoginUserName')" prop="LoginFaildName"> <el-form-item :label="$t('system:loginLog:table:LoginUserName')" prop="LoginFaildName">
<el-input v-model="searchData.LoginUserName" size="small" clearable style="width: 120px" /> <el-input v-model="searchData.LoginUserName" size="small" clearable style="width: 120px" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:loginLog:table:LoginUserType')" prop="LoginUserTypeEnum"> <!-- <el-form-item :label="$t('system:loginLog:table:LoginUserType')" prop="LoginUserTypeEnum">
<el-select v-model="searchData.LoginUserTypeEnum" clearable style="width: 120px"> <el-select v-model="searchData.LoginUserTypeEnum" clearable style="width: 120px">
<el-option v-for="item of $d.UserType" :key="'UserType' + item.label" :value="item.value" <el-option v-for="item of $d.UserType" :key="'UserType' + item.label" :value="item.value"
:label="item.label" /> :label="item.label" />
</el-select> </el-select>
</el-form-item> </el-form-item> -->
<el-form-item :label="$t('system:loginLog:label:IsLoginUncommonly')" prop="IsLoginUncommonly "> <el-form-item :label="$t('system:loginLog:label:IsLoginUncommonly')" prop="IsLoginUncommonly ">
<el-select v-model="searchData.IsLoginUncommonly" clearable style="width: 120px"> <el-select v-model="searchData.IsLoginUncommonly" clearable style="width: 120px">
<el-option v-for="item of $d.YesOrNo" :key="item.id" :value="item.value" :label="item.label" /> <el-option v-for="item of $d.YesOrNo" :key="item.id" :value="item.value" :label="item.label" />