移交接收管理
This commit is contained in:
parent
258e5bc4b6
commit
096dae3c14
|
|
@ -93,6 +93,8 @@
|
|||
v-model="queryParams[item.f_model]"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 自定义搜索插槽:父组件可自行插入 el-form-item -->
|
||||
<slot name="form" :queryParams="queryParams"></slot>
|
||||
<el-form-item v-if="showBtnCrews">
|
||||
<el-button
|
||||
v-if="showQueryButtons"
|
||||
|
|
|
|||
|
|
@ -2,25 +2,22 @@ export const formLabel = [
|
|||
{
|
||||
isShow: false, // 是否展示label
|
||||
f_type: 'ipt',
|
||||
f_label: '单项工程名称',
|
||||
f_label: '项目名称',
|
||||
f_model: 'proName',
|
||||
f_max: 32,
|
||||
},
|
||||
{
|
||||
isShow: false, // 是否展示label
|
||||
f_type: 'sel',
|
||||
f_label: '项目类型',
|
||||
f_model: 'proType',
|
||||
f_selList: [],
|
||||
f_dict: 'pro_type',
|
||||
f_type: 'ipt',
|
||||
f_label: '单项工程名称',
|
||||
f_model: 'singleProName',
|
||||
f_max: 32,
|
||||
},
|
||||
{
|
||||
isShow: false, // 是否展示label
|
||||
f_type: 'sel',
|
||||
f_label: '电压等级',
|
||||
f_model: 'voltageLevel',
|
||||
f_selList: [],
|
||||
f_dict: 'voltage_level',
|
||||
f_type: 'date',
|
||||
f_label: '移交时间',
|
||||
f_model: 'transferDate',
|
||||
},
|
||||
|
||||
]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,13 @@
|
|||
<div class="app-container">
|
||||
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="recordTableRef"
|
||||
:columnsList="columnsList" :request-api="getTransferApplyListApi">
|
||||
|
||||
<template #form="{ queryParams }">
|
||||
<el-form-item prop="deptId" style="width: 240px;">
|
||||
<treeselect v-model="queryParams.deptId" :options="treeDataList" placeholder="请选择接收单位" value-key="id"
|
||||
:disable-branch-nodes="false" noChildrenText="没有数据了" noOptionsText="没有数据了" noResultsText="没有搜索结果"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template slot="auditStatus" slot-scope="{ data }">
|
||||
<el-tag size="mini" :type="getStatusType(data.auditStatus)">
|
||||
{{ getStatusText(data.auditStatus) }}
|
||||
|
|
@ -17,8 +23,8 @@
|
|||
</template>
|
||||
|
||||
<template slot="handle" slot-scope="{ data }">
|
||||
<el-button plain size="mini" type="success" icon="el-icon-warning-outline" v-hasPermi="['transfer:apply:query']"
|
||||
@click="handleDetail(data)">
|
||||
<el-button plain size="mini" type="success" icon="el-icon-warning-outline"
|
||||
v-hasPermi="['transfer:apply:query']" @click="handleDetail(data)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
@ -38,14 +44,16 @@ import {
|
|||
} from '@/api/filesTransfer/record.js'
|
||||
import RecordList from './components/recordList'
|
||||
import { encryptWithSM4 } from '@/utils/sm'
|
||||
|
||||
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import { getDeptSelectApi } from '@/api/select'
|
||||
export default {
|
||||
name: 'Accept',
|
||||
dicts: ['pro_type', 'voltage_level'],
|
||||
components: {
|
||||
TableModel,
|
||||
RecordList
|
||||
RecordList,
|
||||
Treeselect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -56,22 +64,21 @@ export default {
|
|||
isflag: false,
|
||||
row: {},
|
||||
loading: false,
|
||||
jumpType:''
|
||||
jumpType: '',
|
||||
treeDataList:[],
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
// 将字典数据填充到表单配置的下拉选项中
|
||||
if (Array.isArray(this.formLabel)) {
|
||||
this.formLabel.forEach((item) => {
|
||||
if (item.f_dict && this.dict && this.dict.type && this.dict.type[item.f_dict]) {
|
||||
this.$set(item, 'f_selList', this.dict.type[item.f_dict])
|
||||
}
|
||||
})
|
||||
}
|
||||
this.initData();
|
||||
},
|
||||
|
||||
methods: {
|
||||
async initData() {
|
||||
await getDeptSelectApi().then(res => {
|
||||
this.treeDataList = this.convertToVueTree(res.data);
|
||||
});
|
||||
},
|
||||
closeDialog() {
|
||||
this.isflag = false;
|
||||
},
|
||||
|
|
@ -178,6 +185,28 @@ export default {
|
|||
return '未知状态'
|
||||
}
|
||||
},
|
||||
// 树数据过滤 - 支持无限层级转换
|
||||
convertToVueTree(data, level = 1) {
|
||||
if (!data || !Array.isArray(data)) {
|
||||
return []
|
||||
}
|
||||
|
||||
return data.map(item => {
|
||||
const node = {
|
||||
id: item.deptId,
|
||||
label: item.deptName,
|
||||
}
|
||||
|
||||
if (item.children && Array.isArray(item.children) && item.children.length > 0) {
|
||||
if (level < 3) {
|
||||
const children = this.convertToVueTree(item.children, level + 1)
|
||||
if (children.length > 0) node.children = children
|
||||
}
|
||||
}
|
||||
|
||||
return node
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
<div class="app-container">
|
||||
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="issueTableRef"
|
||||
:columnsList="columnsList" :request-api="getTransferApplyListApi">
|
||||
|
||||
<template slot="btn">
|
||||
<el-button plain size="mini" type="primary" icon="el-icon-plus" v-hasPermi="['transfer:apply:add']"
|
||||
@click="handleAdd">
|
||||
|
|
@ -39,7 +40,6 @@ import {
|
|||
getTransferApplyListApi,
|
||||
} from '@/api/filesTransfer/apply.js'
|
||||
import IssueForm from './prop/issueForm'
|
||||
import { encryptWithSM4 } from '@/utils/sm'
|
||||
|
||||
|
||||
export default {
|
||||
|
|
@ -59,6 +59,7 @@ export default {
|
|||
isAdd: '',
|
||||
row: {},
|
||||
loading: false,
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -71,9 +72,11 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.title = "新增";
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<!-- 文件详情表格 -->
|
||||
<div class="table-section">
|
||||
<el-table :data="fileList" border style="width: 100%" class="detail-table">
|
||||
<el-table :data="fileList" border style="width: 100%" class="detail-table" v-if="viewStatus === 'record'">
|
||||
<el-table-column prop="index" label="序号" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
|
|
@ -51,6 +51,33 @@
|
|||
<div class="archive-name-cell">{{ scope.row.archiveName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<el-table :data="fileList" border style="width: 100%" class="detail-table" v-if="viewStatus === 'accept'">
|
||||
<el-table-column prop="index" label="序号" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="proName" label="移交时间" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.proName || '--'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column prop="archiveName" label="档案名称" min-width="300">
|
||||
<template slot-scope="scope">
|
||||
<div class="archive-name-cell">{{ scope.row.archiveName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="接收状态" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.integrityStatus === '1'" :type="scope.row.integrityStatus === '1' ? 'success' : 'danger'">
|
||||
{{ scope.row.integrityStatus === '1' ? '已接收' : '未接收' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="archiveName" label="操作" min-width="100" v-if="viewStatus === 'accept'">
|
||||
<template slot-scope="scope">
|
||||
<el-button plain icon="el-icon-check" type="primary" size="mini" @click="handleAccept(scope.row)">确认接收</el-button>
|
||||
|
|
@ -285,5 +312,35 @@ export default {
|
|||
.back-btn{
|
||||
height: 50px;
|
||||
}
|
||||
/* 确认弹框样式 */
|
||||
.confirm-content {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.confirm-icon {
|
||||
font-size: 48px;
|
||||
color: #E6A23C;
|
||||
margin-right: 16px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.confirm-text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.main-message {
|
||||
margin: 0 0 8px 0;
|
||||
font-size: 16px;
|
||||
color: #303133;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.sub-message {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
color: #909399;
|
||||
line-height: 1.4;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,25 +2,22 @@ export const formLabel = [
|
|||
{
|
||||
isShow: false, // 是否展示label
|
||||
f_type: 'ipt',
|
||||
f_label: '单项工程名称',
|
||||
f_label: '项目名称',
|
||||
f_model: 'proName',
|
||||
f_max: 32,
|
||||
},
|
||||
{
|
||||
isShow: false, // 是否展示label
|
||||
f_type: 'sel',
|
||||
f_label: '项目类型',
|
||||
f_model: 'proType',
|
||||
f_selList: [],
|
||||
f_dict: 'pro_type',
|
||||
f_type: 'ipt',
|
||||
f_label: '单项工程名称',
|
||||
f_model: 'singleProName',
|
||||
f_max: 32,
|
||||
},
|
||||
{
|
||||
isShow: false, // 是否展示label
|
||||
f_type: 'sel',
|
||||
f_label: '电压等级',
|
||||
f_model: 'voltageLevel',
|
||||
f_selList: [],
|
||||
f_dict: 'voltage_level',
|
||||
f_type: 'date',
|
||||
f_label: '移交时间',
|
||||
f_model: 'transferDate',
|
||||
},
|
||||
|
||||
]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,13 @@
|
|||
<div class="app-container">
|
||||
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="recordTableRef"
|
||||
:columnsList="columnsList" :request-api="getTransferApplyListApi">
|
||||
|
||||
<template #form="{ queryParams }">
|
||||
<el-form-item prop="deptId" style="width: 240px;">
|
||||
<treeselect v-model="queryParams.deptId" :options="treeDataList" placeholder="请选择接收单位" value-key="id"
|
||||
:disable-branch-nodes="false" noChildrenText="没有数据了" noOptionsText="没有数据了" noResultsText="没有搜索结果"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template slot="auditStatus" slot-scope="{ data }">
|
||||
<el-tag size="mini" :type="getStatusType(data.auditStatus)">
|
||||
{{ getStatusText(data.auditStatus) }}
|
||||
|
|
@ -38,14 +44,17 @@ import {
|
|||
} from '@/api/filesTransfer/record.js'
|
||||
import RecordList from './components/recordList'
|
||||
import { encryptWithSM4 } from '@/utils/sm'
|
||||
import { getDeptSelectApi } from '@/api/select'
|
||||
|
||||
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
export default {
|
||||
name: 'Record',
|
||||
dicts: ['pro_type', 'voltage_level'],
|
||||
components: {
|
||||
TableModel,
|
||||
RecordList
|
||||
RecordList,
|
||||
Treeselect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -56,22 +65,29 @@ export default {
|
|||
isflag: false,
|
||||
row: {},
|
||||
loading: false,
|
||||
jumpType:''
|
||||
jumpType:'',
|
||||
treeDataList:[],
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
// 将字典数据填充到表单配置的下拉选项中
|
||||
if (Array.isArray(this.formLabel)) {
|
||||
/* if (Array.isArray(this.formLabel)) {
|
||||
this.formLabel.forEach((item) => {
|
||||
if (item.f_dict && this.dict && this.dict.type && this.dict.type[item.f_dict]) {
|
||||
this.$set(item, 'f_selList', this.dict.type[item.f_dict])
|
||||
}
|
||||
})
|
||||
}
|
||||
} */
|
||||
this.initData();
|
||||
},
|
||||
|
||||
methods: {
|
||||
async initData() {
|
||||
await getDeptSelectApi().then(res => {
|
||||
this.treeDataList = this.convertToVueTree(res.data);
|
||||
});
|
||||
},
|
||||
closeDialog() {
|
||||
this.isflag = false;
|
||||
},
|
||||
|
|
@ -178,6 +194,28 @@ export default {
|
|||
return '未知状态'
|
||||
}
|
||||
},
|
||||
// 树数据过滤 - 支持无限层级转换
|
||||
convertToVueTree(data, level = 1) {
|
||||
if (!data || !Array.isArray(data)) {
|
||||
return []
|
||||
}
|
||||
|
||||
return data.map(item => {
|
||||
const node = {
|
||||
id: item.deptId,
|
||||
label: item.deptName,
|
||||
}
|
||||
|
||||
if (item.children && Array.isArray(item.children) && item.children.length > 0) {
|
||||
if (level < 3) {
|
||||
const children = this.convertToVueTree(item.children, level + 1)
|
||||
if (children.length > 0) node.children = children
|
||||
}
|
||||
}
|
||||
|
||||
return node
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue