移交问题
This commit is contained in:
parent
bddee75917
commit
6505c2ee92
|
|
@ -0,0 +1,46 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 移交问题管理列表
|
||||
export function getTransferProblemListApi(params) {
|
||||
return request({
|
||||
url: '/smartArchives/transferProblem/getTransferProblemList',
|
||||
method: 'GET',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 新增移交问题
|
||||
export function addTransferProblemApi(data) {
|
||||
return request({
|
||||
url: '/smartArchives/transferProblem/addTransferProblem',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 修改移交问题
|
||||
export function editTransferProblemApi(data) {
|
||||
return request({
|
||||
url: '/smartArchives/transferProblem/editTransferProblem',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 删除移交问题
|
||||
export function delTransferProblemApi(data) {
|
||||
return request({
|
||||
url: '/smartArchives/transferProblem/delTransferProblem',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 已移交确认工程下拉选
|
||||
export async function getProSelectApi(data) {
|
||||
return await request({
|
||||
url: '/smartArchives/transferApply/getProSelect',
|
||||
method: 'GET',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
@ -132,6 +132,7 @@ export default {
|
|||
});
|
||||
await getProSelectApi().then(res => {
|
||||
this.proList = res.data;
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
<template>
|
||||
<!-- 档案移交申请 -->
|
||||
<!-- 档案移交问题 -->
|
||||
<div class="app-container">
|
||||
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="issueTableRef"
|
||||
:columnsList="columnsList" :request-api="getTransferApplyListApi">
|
||||
:columnsList="columnsList" :request-api="getTransferProblemListApi">
|
||||
|
||||
<template slot="btn">
|
||||
<el-button plain size="mini" type="primary" icon="el-icon-plus" v-hasPermi="['transfer:apply:add']"
|
||||
<el-button plain size="mini" type="primary" icon="el-icon-plus" v-hasPermi="['transfer:problem:add']"
|
||||
@click="handleAdd">
|
||||
新增
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
<template slot="handle" slot-scope="{ data }">
|
||||
<el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['transfer:apply:edit']"
|
||||
<el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['transfer:problem:edit']"
|
||||
@click="handleUpdate(data)">
|
||||
修改
|
||||
</el-button>
|
||||
<el-button plain size="mini" type="danger" icon="el-icon-delete" v-hasPermi="['transfer:apply:del']"
|
||||
<el-button plain size="mini" type="danger" icon="el-icon-delete" v-hasPermi="['transfer:problem:del']"
|
||||
@click="handleDelete(data)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button plain size="mini" type="success" icon="el-icon-warning-outline" v-hasPermi="['transfer:apply:query']"
|
||||
<el-button plain size="mini" type="success" icon="el-icon-warning-outline" v-hasPermi="['transfer:problem:detail']"
|
||||
@click="handleDetail(data)">
|
||||
详情
|
||||
</el-button>
|
||||
|
|
@ -36,9 +36,9 @@
|
|||
import TableModel from '@/components/TableModel'
|
||||
import { columnsList, formLabel } from './config'
|
||||
import {
|
||||
delTransferApplyApi,
|
||||
getTransferApplyListApi,
|
||||
} from '@/api/filesTransfer/apply.js'
|
||||
delTransferProblemApi,
|
||||
getTransferProblemListApi,
|
||||
} from '@/api/filesTransfer/issue.js'
|
||||
import IssueForm from './prop/issueForm'
|
||||
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ export default {
|
|||
return {
|
||||
formLabel,
|
||||
columnsList,
|
||||
getTransferApplyListApi,
|
||||
getTransferProblemListApi,
|
||||
title: "",
|
||||
isflag: false,
|
||||
isAdd: '',
|
||||
|
|
@ -112,7 +112,7 @@ export default {
|
|||
this.$modal.confirm(`是否确认删除此数据项?`).then(() => {
|
||||
// 显示加载遮罩
|
||||
this.$modal.loading("正在删除,请稍候...");
|
||||
delTransferApplyApi({ id: row.id }).then(res => {
|
||||
delTransferProblemApi({ id: row.id }).then(res => {
|
||||
this.$modal.closeLoading();
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@
|
|||
:disable-branch-nodes="true" noChildrenText="没有数据了" noOptionsText="没有数据了"
|
||||
noResultsText="没有搜索结果" :disabled="isRead"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="移交问题" prop="issue">
|
||||
<el-form-item label="移交问题" prop="transferIssue">
|
||||
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6 }" class="form-item"
|
||||
v-model="form.issue" clearable show-word-limit placeholder="请输入移交问题" maxlength="255" :disabled="isRead"></el-input>
|
||||
v-model="form.transferIssue" clearable show-word-limit placeholder="请输入移交问题" maxlength="255" :disabled="isRead"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
|
@ -32,28 +32,25 @@
|
|||
<el-button type="primary" class="search-btn" :disabled="disabled"
|
||||
@click="submitForm('ruleForm')" v-if="!isRead">确认</el-button>
|
||||
</span>
|
||||
<FileTree v-if="isflag" :isAdd="isAdd" :rowData="fileTreeRow" :title="fileTreeTitle" @closeDialog="closeDialog"
|
||||
@getTreeData="getTreeData" :dataForm="fileTreeRow" :width="600" />
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
import {
|
||||
saveTransferApplyApi,
|
||||
editTransferApplyApi,
|
||||
addTransferProblemApi,
|
||||
editTransferProblemApi,
|
||||
getProSelectApi,
|
||||
getTransferApplyFilesApi,
|
||||
getTransferApplyFilesByApplyIdApi
|
||||
} from '@/api/filesTransfer/apply'
|
||||
} from '@/api/filesTransfer/issue'
|
||||
import { getDeptSelectApi } from '@/api/select'
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import FileTree from '@/views/common/fileTree.vue'
|
||||
|
||||
export default {
|
||||
name: "IssueForm",
|
||||
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"],
|
||||
dicts: ['data_class_type'],
|
||||
components: { Treeselect, FileTree },
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
lDialog: this.width > 500 ? "w700" : "w500",
|
||||
|
|
@ -62,6 +59,8 @@ export default {
|
|||
form: {
|
||||
proId: undefined,
|
||||
deptId: undefined,
|
||||
transferTime:undefined,
|
||||
transferIssue:null
|
||||
},
|
||||
treeDataList: [],
|
||||
proList: [],
|
||||
|
|
@ -74,16 +73,14 @@ export default {
|
|||
deptId: [
|
||||
{ required: true, message: '请选择接收组织', trigger: 'change' }
|
||||
],
|
||||
issue: [
|
||||
transferIssue: [
|
||||
{ required: true, message: '请输入移交问题', trigger: 'blur' }
|
||||
],
|
||||
transferTime: [
|
||||
{ required: true, message: '请选择移交时间', trigger: 'blur' }
|
||||
],
|
||||
},
|
||||
fileTreeTitle: "",
|
||||
isflag: false,
|
||||
fileTreeRow: {},
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -112,7 +109,7 @@ export default {
|
|||
proId: this.rowData.proId || undefined,
|
||||
deptId: this.rowData.deptId || undefined,
|
||||
transferTime: this.rowData.transferTime || undefined,
|
||||
issue: this.rowData.issue || null,
|
||||
transferIssue: this.rowData.transferIssue || null,
|
||||
};
|
||||
|
||||
} else {
|
||||
|
|
@ -121,7 +118,7 @@ export default {
|
|||
proId: undefined,
|
||||
deptId: undefined,
|
||||
transferTime: null,
|
||||
issue: null,
|
||||
transferIssue: null,
|
||||
};
|
||||
}
|
||||
},
|
||||
|
|
@ -154,10 +151,9 @@ export default {
|
|||
proId: undefined,
|
||||
deptId: undefined,
|
||||
transferTime: null,
|
||||
issue: null,
|
||||
transferIssue: null,
|
||||
};
|
||||
this.resetForm("ruleForm");
|
||||
this.checkTreeData = [];
|
||||
},
|
||||
handleReuslt(res) {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
|
|
@ -176,11 +172,18 @@ export default {
|
|||
background: 'rgba(0,0,0,0.5)',
|
||||
target: this.$el.querySelector('.el-dialog') || document.body
|
||||
})
|
||||
|
||||
let params = _.cloneDeep(this.form);
|
||||
// 获取单项工程名称
|
||||
let proObj = this.proList.find(item => item.id === params.proId);
|
||||
params.singleProName = proObj.name;
|
||||
params.proName = proObj.proName;
|
||||
// 获取接收组织名称
|
||||
const obj = this.findNodeById(this.treeDataList, this.form.deptId);
|
||||
params.deptName = obj?.label || '';
|
||||
console.log(params);
|
||||
|
||||
if (this.isAdd === 'add') {
|
||||
saveTransferApplyApi(params).then(res => {
|
||||
addTransferProblemApi(params).then(res => {
|
||||
this.loading.close();
|
||||
if (res.code === 200) {
|
||||
this.handleReuslt(res);
|
||||
|
|
@ -192,7 +195,7 @@ export default {
|
|||
// this.$modal.msgError('提交失败,请重试');
|
||||
});
|
||||
} else {
|
||||
editTransferApplyApi(params).then(res => {
|
||||
editTransferProblemApi(params).then(res => {
|
||||
this.loading.close();
|
||||
if (res.code === 200) {
|
||||
this.handleReuslt(res);
|
||||
|
|
@ -229,7 +232,16 @@ export default {
|
|||
return node
|
||||
})
|
||||
},
|
||||
|
||||
findNodeById(nodes, id) {
|
||||
for (const node of nodes) {
|
||||
if (node.id === id) return node;
|
||||
if (node.children) {
|
||||
const found = this.findNodeById(node.children, id);
|
||||
if (found) return found;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue