add 批次管理界面
This commit is contained in:
parent
a4148ff5b2
commit
12cfa91c6f
@ -5583,6 +5583,8 @@ export interface UserAddInput {
|
|||||||
orgId?: number
|
orgId?: number
|
||||||
/** 密码 */
|
/** 密码 */
|
||||||
password?: string | null
|
password?: string | null
|
||||||
|
/** 团队 */
|
||||||
|
team?: number
|
||||||
/** 启用 */
|
/** 启用 */
|
||||||
enabled?: boolean
|
enabled?: boolean
|
||||||
|
|
||||||
@ -6104,6 +6106,10 @@ export interface UserUpdateInput {
|
|||||||
* @minLength 1
|
* @minLength 1
|
||||||
*/
|
*/
|
||||||
userName: string
|
userName: string
|
||||||
|
|
||||||
|
/** 团队 */
|
||||||
|
team?: number
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 姓名
|
* 姓名
|
||||||
* @minLength 1
|
* @minLength 1
|
||||||
|
@ -25,6 +25,12 @@ export const Sex = {
|
|||||||
Female: { name: 'Female', value: 2, desc: '女' },
|
Female: { name: 'Female', value: 2, desc: '女' },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const Team = {
|
||||||
|
All: { name: '全部', value: 5, desc: '全部' },
|
||||||
|
USP: { name: '上游', value: 1, desc: '上游' },
|
||||||
|
DSP: { name: '下游', value: 3, desc: '下游' },
|
||||||
|
}
|
||||||
|
|
||||||
/** 角色类型 */
|
/** 角色类型 */
|
||||||
export const RoleType = {
|
export const RoleType = {
|
||||||
Group: { name: 'Group', value: 1, desc: '分组' },
|
Group: { name: 'Group', value: 1, desc: '分组' },
|
||||||
|
@ -28,6 +28,8 @@ export interface PreBatchPageDto {
|
|||||||
preBatchNo: string
|
preBatchNo: string
|
||||||
/** 项目ID */
|
/** 项目ID */
|
||||||
projectId?: number | null
|
projectId?: number | null
|
||||||
|
/** 项目负责人 */
|
||||||
|
projectUserName?: string
|
||||||
/** 创建用户真实姓名 */
|
/** 创建用户真实姓名 */
|
||||||
createdUserRealName?: string
|
createdUserRealName?: string
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
@ -50,6 +52,8 @@ export interface PreBatchDto {
|
|||||||
isDown?: boolean | null
|
isDown?: boolean | null
|
||||||
/** 滴度 */
|
/** 滴度 */
|
||||||
titer?: number | null
|
titer?: number | null
|
||||||
|
|
||||||
|
projectUserName?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PreBatchPageInput = ServiceRequestPage<PreBatchFilter>
|
export type PreBatchPageInput = ServiceRequestPage<PreBatchFilter>
|
||||||
|
@ -66,28 +66,31 @@
|
|||||||
{{ getProjectName(row.projectId) }}
|
{{ getProjectName(row.projectId) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="projectUserName" label="项目负责人" min-width="100" show-overflow-tooltip />
|
||||||
<el-table-column prop="createdUserRealName" label="创建者" min-width="100" show-overflow-tooltip />
|
<el-table-column prop="createdUserRealName" label="创建者" min-width="100" show-overflow-tooltip />
|
||||||
<el-table-column prop="createdTime" label="创建时间" min-width="160" show-overflow-tooltip />
|
<el-table-column prop="createdTime" label="创建时间" min-width="160" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="200" fixed="right" header-align="center" align="center">
|
<el-table-column label="操作" width="200" fixed="right" header-align="center" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<div class="action-buttons">
|
||||||
v-if="auth('api:admin:pre-batch:update')"
|
<el-button
|
||||||
icon="ele-EditPen"
|
v-if="auth('api:admin:pre-batch:update')"
|
||||||
size="small"
|
icon="ele-EditPen"
|
||||||
text
|
size="small"
|
||||||
type="primary"
|
text
|
||||||
@click="onEdit(row)"
|
type="primary"
|
||||||
>编辑</el-button
|
@click="onEdit(row)"
|
||||||
>
|
>编辑</el-button
|
||||||
<el-button
|
>
|
||||||
v-if="auth('api:admin:pre-batch:soft-delete')"
|
<el-button
|
||||||
icon="ele-Delete"
|
v-if="auth('api:admin:pre-batch:soft-delete')"
|
||||||
size="small"
|
icon="ele-Delete"
|
||||||
text
|
size="small"
|
||||||
type="danger"
|
text
|
||||||
@click="onDelete(row)"
|
type="danger"
|
||||||
>删除</el-button
|
@click="onDelete(row)"
|
||||||
>
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -238,19 +241,33 @@ const getProjectName = (projectId: number) => {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.my-query-box {
|
.my-query-box {
|
||||||
|
margin-top: 8px;
|
||||||
|
|
||||||
:deep(.el-form-item) {
|
:deep(.el-form-item) {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.el-form--inline .el-form-item) {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-fill {
|
.my-fill {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
|
:deep(.el-card__body) {
|
||||||
|
padding: 20px;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-flex {
|
.my-flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-flex-between {
|
.my-flex-between {
|
||||||
@ -268,4 +285,60 @@ const getProjectName = (projectId: number) => {
|
|||||||
.mb8 {
|
.mb8 {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 表格样式优化
|
||||||
|
:deep(.el-table) {
|
||||||
|
.el-table__header-wrapper {
|
||||||
|
th {
|
||||||
|
background-color: #fafafa;
|
||||||
|
color: #606266;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table__body-wrapper {
|
||||||
|
.el-table__row {
|
||||||
|
&:hover {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页样式优化
|
||||||
|
:deep(.el-pagination) {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 16px;
|
||||||
|
|
||||||
|
.el-pager li.is-active {
|
||||||
|
background-color: var(--el-color-primary);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 按钮组样式
|
||||||
|
.action-buttons {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 状态标签样式
|
||||||
|
.status-tag {
|
||||||
|
&.enabled {
|
||||||
|
background-color: #f0f9ff;
|
||||||
|
color: #1890ff;
|
||||||
|
border: 1px solid #d4edda;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
background-color: #fff2f0;
|
||||||
|
color: #ff4d4f;
|
||||||
|
border: 1px solid #ffccc7;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -113,11 +113,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
||||||
<el-form-item label="职位">
|
<el-form-item label="团队">
|
||||||
<el-input v-model="form.staff.position" autocomplete="off" />
|
<el-select v-model="form.team" placeholder="请选择团队" class="w100">
|
||||||
|
<el-option v-for="item in state.teamList" :key="item.label" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
||||||
<el-form-item label="性别">
|
<el-form-item label="性别">
|
||||||
<el-select v-model="form.staff.sex" placeholder="请选择性别" class="w100">
|
<el-select v-model="form.staff.sex" placeholder="请选择性别" class="w100">
|
||||||
@ -158,7 +159,7 @@ import { validatorPwd } from '/@/utils/validators'
|
|||||||
import eventBus from '/@/utils/mitt'
|
import eventBus from '/@/utils/mitt'
|
||||||
import { FormInstance } from 'element-plus'
|
import { FormInstance } from 'element-plus'
|
||||||
import { verifyCnAndSpace } from '/@/utils/toolsValidate'
|
import { verifyCnAndSpace } from '/@/utils/toolsValidate'
|
||||||
import { Sex } from '/@/api/admin/enum-contracts'
|
import { Sex, Team } from '/@/api/admin/enum-contracts'
|
||||||
import { toOptionsByValue } from '/@/utils/enum'
|
import { toOptionsByValue } from '/@/utils/enum'
|
||||||
|
|
||||||
// 引入组件
|
// 引入组件
|
||||||
@ -186,6 +187,7 @@ const state = reactive({
|
|||||||
orgTreeData: [] as OrgGetListOutput[],
|
orgTreeData: [] as OrgGetListOutput[],
|
||||||
roleTreeData: [] as RoleGetListOutput[],
|
roleTreeData: [] as RoleGetListOutput[],
|
||||||
sexList: toOptionsByValue(Sex),
|
sexList: toOptionsByValue(Sex),
|
||||||
|
teamList: toOptionsByValue(Team),
|
||||||
})
|
})
|
||||||
const { form } = toRefs(state)
|
const { form } = toRefs(state)
|
||||||
|
|
||||||
|
@ -64,8 +64,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
||||||
<el-form-item label="职位">
|
<el-form-item label="团队">
|
||||||
<el-input v-model="form.staff.position" autocomplete="off" />
|
<el-select v-model="form.team" placeholder="请选择团队" class="w100">
|
||||||
|
<el-option v-for="item in state.teamList" :key="item.label" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
||||||
@ -104,7 +106,7 @@ import { listToTree } from '/@/utils/tree'
|
|||||||
import { isMobile, testMobile, testEmail } from '/@/utils/test'
|
import { isMobile, testMobile, testEmail } from '/@/utils/test'
|
||||||
import eventBus from '/@/utils/mitt'
|
import eventBus from '/@/utils/mitt'
|
||||||
import { FormInstance } from 'element-plus'
|
import { FormInstance } from 'element-plus'
|
||||||
import { Sex } from '/@/api/admin/enum-contracts'
|
import { Sex, Team } from '/@/api/admin/enum-contracts'
|
||||||
import { toOptionsByValue } from '/@/utils/enum'
|
import { toOptionsByValue } from '/@/utils/enum'
|
||||||
|
|
||||||
// 引入组件
|
// 引入组件
|
||||||
@ -125,9 +127,11 @@ const state = reactive({
|
|||||||
sureLoading: false,
|
sureLoading: false,
|
||||||
form: {
|
form: {
|
||||||
roleIds: [] as any,
|
roleIds: [] as any,
|
||||||
|
team: 5,
|
||||||
} as UserAddInput & UserUpdateInput,
|
} as UserAddInput & UserUpdateInput,
|
||||||
roleTreeData: [] as RoleGetListOutput[],
|
roleTreeData: [] as RoleGetListOutput[],
|
||||||
sexList: toOptionsByValue(Sex),
|
sexList: toOptionsByValue(Sex),
|
||||||
|
teamList: toOptionsByValue(Team),
|
||||||
})
|
})
|
||||||
const { form } = toRefs(state)
|
const { form } = toRefs(state)
|
||||||
|
|
||||||
|
@ -44,8 +44,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="ele-Search" @click="onQuery">查询</el-button>
|
<el-button type="primary" icon="ele-Search" @click="onQuery">查询</el-button>
|
||||||
<el-button icon="ele-Refresh" @click="onReset">重置</el-button>
|
<el-button v-auth="'api:admin:pre-batch:add'" type="primary" icon="ele-Plus" @click="onAdd">新增</el-button>
|
||||||
<el-button v-auth="'api:admin:uspbatch:add'" type="primary" icon="ele-Plus" @click="onAdd">新增</el-button>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -58,20 +57,15 @@
|
|||||||
row-key="id"
|
row-key="id"
|
||||||
border
|
border
|
||||||
>
|
>
|
||||||
<el-table-column prop="uspBatchName" label="USP批次名称" min-width="150" show-overflow-tooltip />
|
<el-table-column prop="preBatchName" label="批次名称" min-width="150" show-overflow-tooltip />
|
||||||
<el-table-column prop="uspBatchNo" label="USP批次编号" min-width="120" show-overflow-tooltip />
|
<el-table-column prop="preBatchNo" label="批次编号" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column prop="projectId" label="项目" min-width="120" show-overflow-tooltip>
|
<el-table-column prop="projectId" label="项目" min-width="120" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ getProjectName(row.projectId) }}
|
{{ getProjectName(row.projectId) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="isDown" label="是否下游" width="100" align="center">
|
<el-table-column prop="projectUserName" label="项目负责人" min-width="100" show-overflow-tooltip />
|
||||||
<template #default="{ row }">
|
<el-table-column prop="titer" label="titer" min-width="100" align="center" show-overflow-tooltip>
|
||||||
<el-tag v-if="row.isDown" type="success">是</el-tag>
|
|
||||||
<el-tag v-else type="info">否</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="titer" label="滴度" min-width="100" align="center" show-overflow-tooltip>
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ row.titer || '-' }}
|
{{ row.titer || '-' }}
|
||||||
</template>
|
</template>
|
||||||
@ -80,24 +74,26 @@
|
|||||||
<el-table-column prop="createdTime" label="创建时间" min-width="160" show-overflow-tooltip />
|
<el-table-column prop="createdTime" label="创建时间" min-width="160" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="200" fixed="right" header-align="center" align="center">
|
<el-table-column label="操作" width="200" fixed="right" header-align="center" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<div class="action-buttons">
|
||||||
v-if="auth('api:admin:uspbatch:update')"
|
<el-button
|
||||||
icon="ele-EditPen"
|
v-if="auth('api:admin:pre-batch:update')"
|
||||||
size="small"
|
icon="ele-EditPen"
|
||||||
text
|
size="small"
|
||||||
type="primary"
|
text
|
||||||
@click="onEdit(row)"
|
type="primary"
|
||||||
>编辑</el-button
|
@click="onEdit(row)"
|
||||||
>
|
>编辑</el-button
|
||||||
<el-button
|
>
|
||||||
v-if="auth('api:admin:uspbatch:soft-delete')"
|
<el-button
|
||||||
icon="ele-Delete"
|
v-if="auth('api:admin:pre-batch:soft-delete')"
|
||||||
size="small"
|
icon="ele-Delete"
|
||||||
text
|
size="small"
|
||||||
type="danger"
|
text
|
||||||
@click="onDelete(row)"
|
type="danger"
|
||||||
>删除</el-button
|
@click="onDelete(row)"
|
||||||
>
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -117,7 +113,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<uspbatch-form ref="uspBatchFormRef" :title="state.formTitle" @ok="Query" />
|
<UspbatchForm ref="uspBatchFormRef" :title="state.formTitle" @ok="Query" />
|
||||||
</MyLayout>
|
</MyLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -129,7 +125,7 @@ import type { UspBatchDto, UspBatchPageInput, UspBatchPageDto } from '/@/api/typ
|
|||||||
import { auth } from '/@/utils/authFunction'
|
import { auth } from '/@/utils/authFunction'
|
||||||
|
|
||||||
// 引入组件
|
// 引入组件
|
||||||
const UspBatchForm = defineAsyncComponent(() => import('./components/uspbatch-form.vue'))
|
const UspbatchForm = defineAsyncComponent(() => import('./components/uspbatch-form.vue'))
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any
|
const { proxy } = getCurrentInstance() as any
|
||||||
|
|
||||||
@ -248,19 +244,33 @@ const getProjectName = (projectId: number) => {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.my-query-box {
|
.my-query-box {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
|
||||||
:deep(.el-form-item) {
|
:deep(.el-form-item) {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.el-form--inline .el-form-item) {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-fill {
|
.my-fill {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
|
:deep(.el-card__body) {
|
||||||
|
padding: 20px;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-flex {
|
.my-flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-flex-between {
|
.my-flex-between {
|
||||||
@ -278,4 +288,60 @@ const getProjectName = (projectId: number) => {
|
|||||||
.mb8 {
|
.mb8 {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 表格样式优化
|
||||||
|
:deep(.el-table) {
|
||||||
|
.el-table__header-wrapper {
|
||||||
|
th {
|
||||||
|
background-color: #fafafa;
|
||||||
|
color: #606266;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table__body-wrapper {
|
||||||
|
.el-table__row {
|
||||||
|
&:hover {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页样式优化
|
||||||
|
:deep(.el-pagination) {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 16px;
|
||||||
|
|
||||||
|
.el-pager li.is-active {
|
||||||
|
background-color: var(--el-color-primary);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 按钮组样式
|
||||||
|
.action-buttons {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 状态标签样式
|
||||||
|
.status-tag {
|
||||||
|
&.enabled {
|
||||||
|
background-color: #f0f9ff;
|
||||||
|
color: #1890ff;
|
||||||
|
border: 1px solid #d4edda;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
background-color: #fff2f0;
|
||||||
|
color: #ff4d4f;
|
||||||
|
border: 1px solid #ffccc7;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
Loading…
x
Reference in New Issue
Block a user