移交问题
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 => {
|
await getProSelectApi().then(res => {
|
||||||
this.proList = res.data;
|
this.proList = res.data;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,26 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 档案移交申请 -->
|
<!-- 档案移交问题 -->
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="issueTableRef"
|
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="issueTableRef"
|
||||||
:columnsList="columnsList" :request-api="getTransferApplyListApi">
|
:columnsList="columnsList" :request-api="getTransferProblemListApi">
|
||||||
|
|
||||||
<template slot="btn">
|
<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">
|
@click="handleAdd">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="handle" slot-scope="{ data }">
|
<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)">
|
@click="handleUpdate(data)">
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</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)">
|
@click="handleDelete(data)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</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)">
|
@click="handleDetail(data)">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -36,9 +36,9 @@
|
||||||
import TableModel from '@/components/TableModel'
|
import TableModel from '@/components/TableModel'
|
||||||
import { columnsList, formLabel } from './config'
|
import { columnsList, formLabel } from './config'
|
||||||
import {
|
import {
|
||||||
delTransferApplyApi,
|
delTransferProblemApi,
|
||||||
getTransferApplyListApi,
|
getTransferProblemListApi,
|
||||||
} from '@/api/filesTransfer/apply.js'
|
} from '@/api/filesTransfer/issue.js'
|
||||||
import IssueForm from './prop/issueForm'
|
import IssueForm from './prop/issueForm'
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
formLabel,
|
formLabel,
|
||||||
columnsList,
|
columnsList,
|
||||||
getTransferApplyListApi,
|
getTransferProblemListApi,
|
||||||
title: "",
|
title: "",
|
||||||
isflag: false,
|
isflag: false,
|
||||||
isAdd: '',
|
isAdd: '',
|
||||||
|
|
@ -112,7 +112,7 @@ export default {
|
||||||
this.$modal.confirm(`是否确认删除此数据项?`).then(() => {
|
this.$modal.confirm(`是否确认删除此数据项?`).then(() => {
|
||||||
// 显示加载遮罩
|
// 显示加载遮罩
|
||||||
this.$modal.loading("正在删除,请稍候...");
|
this.$modal.loading("正在删除,请稍候...");
|
||||||
delTransferApplyApi({ id: row.id }).then(res => {
|
delTransferProblemApi({ id: row.id }).then(res => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@
|
||||||
:disable-branch-nodes="true" noChildrenText="没有数据了" noOptionsText="没有数据了"
|
:disable-branch-nodes="true" noChildrenText="没有数据了" noOptionsText="没有数据了"
|
||||||
noResultsText="没有搜索结果" :disabled="isRead"/>
|
noResultsText="没有搜索结果" :disabled="isRead"/>
|
||||||
</el-form-item>
|
</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"
|
<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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -32,28 +32,25 @@
|
||||||
<el-button type="primary" class="search-btn" :disabled="disabled"
|
<el-button type="primary" class="search-btn" :disabled="disabled"
|
||||||
@click="submitForm('ruleForm')" v-if="!isRead">确认</el-button>
|
@click="submitForm('ruleForm')" v-if="!isRead">确认</el-button>
|
||||||
</span>
|
</span>
|
||||||
<FileTree v-if="isflag" :isAdd="isAdd" :rowData="fileTreeRow" :title="fileTreeTitle" @closeDialog="closeDialog"
|
|
||||||
@getTreeData="getTreeData" :dataForm="fileTreeRow" :width="600" />
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import {
|
import {
|
||||||
saveTransferApplyApi,
|
addTransferProblemApi,
|
||||||
editTransferApplyApi,
|
editTransferProblemApi,
|
||||||
getProSelectApi,
|
getProSelectApi,
|
||||||
getTransferApplyFilesApi,
|
} from '@/api/filesTransfer/issue'
|
||||||
getTransferApplyFilesByApplyIdApi
|
|
||||||
} from '@/api/filesTransfer/apply'
|
|
||||||
import { getDeptSelectApi } from '@/api/select'
|
import { getDeptSelectApi } from '@/api/select'
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import FileTree from '@/views/common/fileTree.vue'
|
|
||||||
export default {
|
export default {
|
||||||
name: "IssueForm",
|
name: "IssueForm",
|
||||||
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"],
|
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"],
|
||||||
dicts: ['data_class_type'],
|
dicts: ['data_class_type'],
|
||||||
components: { Treeselect, FileTree },
|
components: { Treeselect },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
lDialog: this.width > 500 ? "w700" : "w500",
|
lDialog: this.width > 500 ? "w700" : "w500",
|
||||||
|
|
@ -62,6 +59,8 @@ export default {
|
||||||
form: {
|
form: {
|
||||||
proId: undefined,
|
proId: undefined,
|
||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
|
transferTime:undefined,
|
||||||
|
transferIssue:null
|
||||||
},
|
},
|
||||||
treeDataList: [],
|
treeDataList: [],
|
||||||
proList: [],
|
proList: [],
|
||||||
|
|
@ -74,16 +73,14 @@ export default {
|
||||||
deptId: [
|
deptId: [
|
||||||
{ required: true, message: '请选择接收组织', trigger: 'change' }
|
{ required: true, message: '请选择接收组织', trigger: 'change' }
|
||||||
],
|
],
|
||||||
issue: [
|
transferIssue: [
|
||||||
{ required: true, message: '请输入移交问题', trigger: 'blur' }
|
{ required: true, message: '请输入移交问题', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
transferTime: [
|
transferTime: [
|
||||||
{ required: true, message: '请选择移交时间', trigger: 'blur' }
|
{ required: true, message: '请选择移交时间', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
fileTreeTitle: "",
|
|
||||||
isflag: false,
|
|
||||||
fileTreeRow: {},
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -112,7 +109,7 @@ export default {
|
||||||
proId: this.rowData.proId || undefined,
|
proId: this.rowData.proId || undefined,
|
||||||
deptId: this.rowData.deptId || undefined,
|
deptId: this.rowData.deptId || undefined,
|
||||||
transferTime: this.rowData.transferTime || undefined,
|
transferTime: this.rowData.transferTime || undefined,
|
||||||
issue: this.rowData.issue || null,
|
transferIssue: this.rowData.transferIssue || null,
|
||||||
};
|
};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -121,7 +118,7 @@ export default {
|
||||||
proId: undefined,
|
proId: undefined,
|
||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
transferTime: null,
|
transferTime: null,
|
||||||
issue: null,
|
transferIssue: null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -154,10 +151,9 @@ export default {
|
||||||
proId: undefined,
|
proId: undefined,
|
||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
transferTime: null,
|
transferTime: null,
|
||||||
issue: null,
|
transferIssue: null,
|
||||||
};
|
};
|
||||||
this.resetForm("ruleForm");
|
this.resetForm("ruleForm");
|
||||||
this.checkTreeData = [];
|
|
||||||
},
|
},
|
||||||
handleReuslt(res) {
|
handleReuslt(res) {
|
||||||
this.$modal.msgSuccess(res.msg);
|
this.$modal.msgSuccess(res.msg);
|
||||||
|
|
@ -176,11 +172,18 @@ export default {
|
||||||
background: 'rgba(0,0,0,0.5)',
|
background: 'rgba(0,0,0,0.5)',
|
||||||
target: this.$el.querySelector('.el-dialog') || document.body
|
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);
|
console.log(params);
|
||||||
|
|
||||||
if (this.isAdd === 'add') {
|
if (this.isAdd === 'add') {
|
||||||
saveTransferApplyApi(params).then(res => {
|
addTransferProblemApi(params).then(res => {
|
||||||
this.loading.close();
|
this.loading.close();
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.handleReuslt(res);
|
this.handleReuslt(res);
|
||||||
|
|
@ -192,7 +195,7 @@ export default {
|
||||||
// this.$modal.msgError('提交失败,请重试');
|
// this.$modal.msgError('提交失败,请重试');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
editTransferApplyApi(params).then(res => {
|
editTransferProblemApi(params).then(res => {
|
||||||
this.loading.close();
|
this.loading.close();
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.handleReuslt(res);
|
this.handleReuslt(res);
|
||||||
|
|
@ -229,7 +232,16 @@ export default {
|
||||||
return node
|
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>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue