稽查管理人员添加修改
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2025-09-29 11:06:01 +08:00
parent 9a8bf1e637
commit d17b95a200
4 changed files with 103 additions and 23 deletions

View File

@ -4266,4 +4266,12 @@ export function setAuditRecordPermission(data) {
method: 'post',
data
})
}
// 稽查管理-人员管理
export function addOrDeleteAuditRecordUser(data) {
return request({
url: `/AuditDocument/addOrDeleteAuditRecordUser`,
method: 'put',
data
})
}

View File

@ -23,7 +23,7 @@
</el-select>
</el-form-item>
<!-- 稽查人员 -->
<el-form-item :label="$t('trials:trials-workbench:inspectionManagement:from:IdnetityUserName')"
<!-- <el-form-item :label="$t('trials:trials-workbench:inspectionManagement:from:IdnetityUserName')"
prop="IdnetityUserName">
<div style="display: flex;align-items: center;justify-content: space-around;">
<p :title="from.IdnetityUserName"
@ -34,7 +34,7 @@
$t('trials:trials-workbench:inspectionManagement:button:select')
}}</el-button>
</div>
</el-form-item>
</el-form-item> -->
<!-- 稽查日期 -->
<el-form-item :label="$t('trials:trials-workbench:inspectionManagement:from:AuditTime')"
prop="AuditTime">
@ -72,17 +72,11 @@
</el-form-item>
</div>
</el-form>
<base-model :config="config">
<template slot="dialog-body">
<userList @add="addUser" v-if="config.visible" />
</template>
</base-model>
</el-dialog>
</template>
<script>
import { addOrUpdateAuditRecord } from '@/api/trials'
import userList from './userList'
import baseModel from '@/components/BaseModel'
export default {
props: {
visible: {
@ -100,7 +94,6 @@ export default {
}
}
},
components: { userList, baseModel },
watch: {
state: {
handler() {
@ -215,12 +208,6 @@ export default {
},
],
},
config: {
visible: false,
title: this.$t('trials:trials-workbench:inspectionManagement:dialogTitle:selectUser'),
width: '1200px',
appendToBody: true
},
}
},
methods: {

View File

@ -80,11 +80,15 @@
<el-table-column prop="identityUserList" show-overflow-tooltip
:label="$t('trials:trials-workbench:inspectionManagement:table:IdentityUserName')">
<template slot-scope="scope">
<span>
<el-button v-if="Array.isArray(scope.row.IdentityUserList)" type="text"
@click="openUserList(true, scope.row)">
{{scope.row.IdentityUserList.map(item => item.FullName).join(", ")}}
</el-button>
<!-- <span>
{{Array.isArray(scope.row.IdentityUserList) ?
scope.row.IdentityUserList.map(item => item.FullName).join(", ") :
''}}
</span>
</span> -->
</template>
</el-table-column>
<el-table-column prop="AuditTime" show-overflow-tooltip
@ -116,11 +120,20 @@
<el-button type="text" @click="openForm('edit', scope.row)">
{{ $t('common:button:edit') }}
</el-button>
<el-button type="text" @click="openUserList(false, scope.row)">
{{ $t('trials:trials-workbench:inspectionManagement:button:user') }}
</el-button>
</template>
</el-table-column>
</el-table>
<dataForm v-if="fromVisible" :visible.sync="fromVisible" :rowData="rowData" :state="state" @getList="getList" />
<document v-if="docVisible" :visible.sync="docVisible" :isAudit="isAudit" :AuditRecordId="AuditRecordId" />
<base-model :config="config">
<template slot="dialog-body">
<userList v-if="config.visible" :AuditRecordId="AuditRecordId" :isView="isView" @close="close"
@getList="getList" />
</template>
</base-model>
</div>
</template>
<script>
@ -128,6 +141,8 @@ import Pagination from '@/components/Pagination'
import { getAuditRecordList } from '@/api/trials'
import dataForm from "./dataForm.vue"
import document from "./document.vue"
import userList from './userList'
import baseModel from '@/components/BaseModel'
const searchDataDefault = () => {
return {
CompanyName: '',
@ -148,7 +163,7 @@ const searchDataDefault = () => {
}
export default {
name: "inspectionManagement",
components: { Pagination, dataForm, document },
components: { Pagination, dataForm, document, userList, baseModel },
data() {
return {
searchData: searchDataDefault(),
@ -168,7 +183,14 @@ export default {
docVisible: false,
isAudit: false,
AuditRecordId: null
AuditRecordId: null,
config: {
visible: false,
title: this.$t('trials:trials-workbench:inspectionManagement:dialogTitle:selectUser'),
width: '1200px',
},
isView: false,
}
},
@ -176,6 +198,14 @@ export default {
this.getList()
},
methods: {
close() {
this.config.visible = false
},
openUserList(isView = false, row) {
this.isView = isView
this.AuditRecordId = row.Id
this.config.visible = true
},
openDoc(isAudit = false, row) {
this.AuditRecordId = row.Id
this.isAudit = isAudit

View File

@ -11,6 +11,14 @@
<!-- 单位 -->
<span>{{ $t('trials:staff:table:organization') }}:</span>
<el-input v-model="listQuery.OrganizationName" size="mini" class="mr" clearable />
<!-- 是否加入 -->
<template v-if="!isView">
<span>{{ $t('trials:staff:table:Join') }}:</span>
<el-select v-model="listQuery.IsAuditRecordUserSelect" placeholder="" size="mini" class="mr" clearable>
<el-option v-for="item in $d.IsJoin" :key="item.id" :label="item.label" :value="item.value">
</el-option>
</el-select>
</template>
<!-- 用户类型 -->
<!-- <span>{{ $t('trials:staff:table:userType') }}:</span>
<el-select v-model="listQuery.UserTypeEnum" size="mini" clearable class="mr">
@ -28,17 +36,17 @@
{{ $t('common:button:reset') }}
</el-button>
<el-button type="primary" size="mini" style="margin-left: auto" :disabled="selectArr.length === 0"
<!-- <el-button type="primary" size="mini" style="margin-left: auto" :disabled="selectArr.length === 0"
:loading="assignLoadStatus" icon="el-icon-plus" @click="handleAssign">
{{ $t('common:button:add') }}
</el-button>
</el-button> -->
</div>
</el-header>
<el-main>
<div class="data-table">
<el-table :data="list" stripe height="400px" class="participant-table-list"
@selection-change="handleSelectChange" @sort-change="handleSortByColumn">
<el-table-column type="selection" width="50" />
<!-- <el-table-column type="selection" width="50" /> -->
<el-table-column type="index" width="50" />
<!-- 姓名 -->
<el-table-column prop="FullName" :label="$t('trials:staff:table:name')" show-overflow-tooltip
@ -58,6 +66,23 @@
<!-- 用户类型 -->
<!-- <el-table-column prop="UserTypeShortName" :label="$t('trials:staff:table:userType')" show-overflow-tooltip
sortable="custom" min-width="100" /> -->
<el-table-column prop="IsAuditRecordUserSelect" :label="$t('trials:staff:table:Join')" show-overflow-tooltip
sortable="custom">
<template slot-scope="scope">
<span>{{ $fd('IsJoin', scope.row.IsAuditRecordUserSelect) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('common:action:action')" width="120" align="left" fixed="right">
<template slot-scope="scope">
<el-button type="text" @click="changeUser(true, scope.row)" :disabled="scope.row.IsAuditRecordUserSelect">
{{ $t('trials:trials-workbench:inspectionManagement:button:join') }}
</el-button>
<el-button type="text" @click="changeUser(false, scope.row)"
:disabled="!scope.row.IsAuditRecordUserSelect">
{{ $t('trials:trials-workbench:inspectionManagement:button:Exit') }}
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-main>
@ -69,12 +94,14 @@
</template>
<script>
import { getUserList } from '@/api/admin'
import { addOrDeleteAuditRecordUser } from '@/api/trials'
import Pagination from '@/components/Pagination'
const getListQueryDefault = () => {
return {
RealName: '',
UserName: '',
OrganizationName: '',
IsAuditRecordUserSelect: null,
UserTypeEnum: '16',
PageIndex: 1,
PageSize: 20,
@ -82,6 +109,16 @@ const getListQueryDefault = () => {
}
export default {
components: { Pagination },
props: {
AuditRecordId: {
type: String,
default: ''
},
isView: {
type: Boolean,
default: false
}
},
data() {
return {
list: [],
@ -98,6 +135,22 @@ export default {
this.getList()
},
methods: {
async changeUser(IsAdd = true, row) {
try {
let data = {
AuditRecordId: this.AuditRecordId,
IsAdd,
identityUserIdList: [row.Id]
}
let res = await addOrDeleteAuditRecordUser(data)
if (res.IsSuccess) {
this.getList()
this.$emit("getList")
}
} catch (err) {
console.log(err)
}
},
getList() {
const loading = this.$loading({
target: document.querySelector('.participant-table-list'),
@ -105,6 +158,8 @@ export default {
lock: true,
})
this.listQuery.UserState = 1
this.listQuery.AuditRecordId = this.AuditRecordId
if (this.isView) this.listQuery.IsAuditRecordUserSelect = true
getUserList(this.listQuery)
.then((res) => {
loading.close()