feat: 迁移其他任务代码

developVue
wx-jincw 2 months ago
parent a50ef28409
commit 98a1a0cb69

@ -0,0 +1,121 @@
<template>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="dialogVisible"
append-to-body
title="选择机构"
>
<el-cascader-panel
ref="cascader"
v-model="selectetValue"
:options="options"
:props="cascaderProps"
></el-cascader-panel>
<span slot="footer" class="dialog-footer">
<el-button @click="closeVisible"></el-button>
<el-button type="primary" @click="comfirm"></el-button>
</span>
</el-dialog>
</template>
<script>
// import { getAllTree } from "@/api/";
export default {
name: "BranchCascaderDialog",
props: {
parentId: {
type: Number,
default: 0,
},
//
containParent: {
type: Boolean,
default: false,
},
emitPath: {
type: Boolean,
default: false,
},
},
data() {
return {
dialogVisible: false,
cascaderProps: {
multiple: true,
checkStrictly: true,
value: "deptId",
label: "deptName",
emitPath: this.emitPath,
},
options: [],
tempOptions: [],
selectetValue: null,
};
},
watch: {
dialogVisible(val) {
if (!val) {
this.$refs.cascader?.clearCheckedNodes();
}
},
},
created() {
this.getTreeData();
},
methods: {
open(data) {
this.dialogVisible = true;
this.selectetValue = data?.map((val) => val.deptId) || null;
},
closeVisible() {
this.dialogVisible = false;
},
comfirm() {
this.$emit("comfirm", this.getCheckedDatas());
this.dialogVisible = false;
},
//
getTreeData() {
getAllTree().then((res) => {
this.options = res || [];
this.tempOptions = [...this.options];
this.updateOptions();
});
},
updateOptions() {
if (this.parentId) {
let findList = this.tempOptions;
const findListFun = (list) => {
list?.findIndex((item) => {
if (item.deptId === this.parentId) {
findList = this.containParent ? [item] : item.children || [];
return true;
} else {
findListFun(item.children);
}
return false;
});
};
findListFun(findList);
this.options = findList;
} else {
this.options = this.tempOptions;
}
},
selectedChange(val) {
console.log("选中的值:", this.selectetValue);
},
// emitPathtruefalse
getCheckedDatas() {
return (
this.$refs.cascader.getCheckedNodes()?.map((val) => val.data) || []
);
},
},
};
</script>
<style>
</style>

@ -0,0 +1,45 @@
const CommonMixin = {
computed: {
// MXCombiQuery() {
// return {
// ...this.query,
// ...this.tableSort,
// };
// },
// MXCombiListQuery() {
// return {
// ...this.MXCombiQuery,
// ...this.page,
// };
// }
},
methods: {
MXCombiQuery() {
return {
...this.query,
...this.tableSort,
};
},
MXCombiListQuery() {
return {
...this.MXCombiQuery(),
...this.page,
};
},
// 删除提示
$deleteConfirm(text = '') {
return this.$confirm(`确定删除数据${text}?`, '删除提示', {
type: 'warning'
});
},
// 批量删除提示
$multDelConfirm(text = '') {
return this.$confirm(`确定删除选中的数据${text}?`, '批量删除提示', {
type: 'warning'
});
},
}
}
export default CommonMixin;

@ -0,0 +1,40 @@
const DictMixin = {
dicts: [],
computed: {
dict() {
return this.$store.getters.dict;
}
},
created() {
if (this.$options.dicts) {
const noDicts = [];
const hasDicts = [];
this.$options.dicts.forEach((type) => {
if (!this.dict[type]) {
noDicts.push(type);
} else {
hasDicts.push(type);
}
});
if (hasDicts.length > 0 && this.MXDictFetched) {
this.MXDictFetched(hasDicts);
}
if (noDicts.length === 0) {
return;
}
this.$store.dispatch('dict/fetchDict', {
types: noDicts,
success: () => {
if (this.MXDictFetched) {
this.MXDictFetched(noDicts);
}
}
});
}
}
}
export default DictMixin;

@ -0,0 +1,67 @@
export default {
name: 'EditDialog',
pageInfo: {
defaultForm: {},
title: '',
updateApi: null,
addApi: null,
},
data() {
return {
saving: false,
dialogVisible: false,
dialogForm: { ...this.$options.pageInfo.defaultForm },
rules: {},
title: ''
}
},
methods: {
open(data = {}) {
this.title = `${data.id ? '编辑': '新增'}${this.$options.pageInfo.title}`;
this.dialogVisible = true;
this.dialogForm = { ...this.$options.pageInfo.defaultForm, ...data };
this.$nextTick(() => {
this.$refs.dialogForm.clearValidate();
});
},
closeVisible() {
this.dialogVisible = false;
},
combinDialogForm() {
return this.dialogForm;
},
mixin_isEdit() {
return !!this.dialogForm.id;
},
submitForm() {
this.$refs.dialogForm.validate((valid) => {
if (valid) {
this.saving = true;
if (this.mixin_isEdit()) {
this.$options.pageInfo.updateApi(this.combinDialogForm()).then(res => {
this.saving = false;
this.$message.success('编辑成功');
this.$emit('refresh');
this.closeVisible();
}).catch(() => {
this.saving = false;
});
} else {
this.$options.pageInfo.addApi(this.combinDialogForm()).then(res => {
this.saving = false;
this.$message.success('新增成功');
this.$emit('refresh');
this.closeVisible();
}).catch(() => {
this.saving = false;
});
}
} else {
this.submitValidateErr();
}
});
},
submitValidateErr() {
}
}
}

@ -0,0 +1,150 @@
export default {
pageInfo: {
title: '列表数据',
exportUrl: '',
pageListApi: null,
deleteApi: null,
defaultQuery: {},
// 是否手动加载
customLoad: false,
// 是否添加导出日志
isLog: false,
},
data() {
return {
// 表格相关参数start
tableLoading: false,
total: 0,
selectrows: [],
tableData: [],
page: {
...this.MXDefaultPage()
},
query: { ...this.MXPageInfo().defaultQuery },
tableSort: {},
// 表格相关参数end
};
},
created() {
this.MXCreated();
if (this.MXPageInfo().customLoad) {
return;
}
this.getTableList();
},
methods: {
MXCreated() {
},
MXPageInfo() {
return this.$options.pageInfo || {}
},
MXDefaultPage() {
return {
pageNum: 1,
pageSize: 10,
};
},
// 导出数据
exportData(e) {
this.$exportExcelData(
this,
this.MXPageInfo().exportUrl,
`${this.MXPageInfo().title}.xlsx`,
null,
this.MXCombiQuery(),
false,
null,
!(e && e.hideConfirm),
{
isLog: this.MXPageInfo().isLog,
}
).then(() => {
this.$emit('exportData', {...this.query});
});
},
async getTableList() {
if (this.$refs.seachForm && this.queryRules) {
const valid = await this.$refs.seachForm.validate();
if (!valid) {
return;
}
}
this.$emit('getTableList', {...this.query});
if (!this.MXPageInfo().pageListApi) {
return;
}
this.tableLoading = true;
console.log('合成入参:', this.MXCombiListQuery());
this.MXPageInfo().pageListApi(this.MXCombiListQuery())
.then((response) => {
this.tableData = response.items || response.rows || response || [];
this.total = response.count || this.tableData.length;
this.tableLoading = false;
this.didGetTableList(true);
})
.catch((_) => {
this.tableLoading = false;
this.didGetTableList(false);
});
},
didGetTableList(success) {
},
queryTable() {
this.page = {
...this.MXDefaultPage()
};
this.getTableList();
},
resetQueryTable() {
this.$refs.multipleTable?.clearSort();
this.tableSort = {};
this.page = {
...this.MXDefaultPage()
};
this.query = { ...this.MXPageInfo().defaultQuery };
this.getTableList();
},
// 改变多选
handleSelectionChange(val) {
this.selectrows = val;
},
// 改变排序
sortChange({ column, prop, order }) {
this.tableSort = { prop, order };
this.getTableList();
},
// --- 表格相关函数end --
toEdit(detail) {
this.$refs.editDialog.open(detail);
},
toAdd() {
this.$refs.editDialog.open();
},
importData() {
this.$refs.importDialog.open();
},
toDelete(row) {
this.$deleteConfirm().then(() => {
this.MXPageInfo().deleteApi(row.id).then((_) => {
this.$message.success('删除成功');
this.getTableList();
});
});
},
toMultDelete() {
const ids = this.selectrows.map((item) => item.id);
this.$multDelConfirm(`${ids.length}`).then(() => {
this.MXPageInfo().deleteApi(ids).then((_) => {
this.$message.success('删除成功');
this.getTableList();
});
});
}
},
};

@ -0,0 +1,60 @@
<template>
<div style="width: 100%;">
<div>1.高额业务定义</div>
<el-table :data="tableData" border stripe size="mini"
style="min-width: 600px;" header-cell-class-name="my-header-cell" cell-class-name="my-cell">
<el-table-column prop="xzzl" label="险种类别" align="center"></el-table-column>
<el-table-column prop="dzbf" label="单张保额(万元)" align="center"></el-table-column>
<el-table-column prop="zbf" label="总保额(万元)" align="center"></el-table-column>
<el-table-column prop="dzbh" label="单张保费(万元)" align="center"></el-table-column>
</el-table>
<div>总保费=年交保费*交费期</div>
<div>2.高端客户业务定义投保人或被保险人为公司评定的四星及以上VIP客户</div>
<div>3.精英销售人员业务定义五星销售人员每年度根据核保星级营销员评级调整</div>
</div>
</template>
<script>
export default {
name: 'ReviewConclusionRules',
data() {
return {
tableData: [
{
xzzl: '寿险',
dzbf: '10',
zbf: '100',
dzbh: '-'
},
{
xzzl: '重疾险',
dzbf: '-',
zbf: '-',
dzbh: '100'
},
{
xzzl: '年金、两全险',
dzbf: '20',
zbf: '100',
dzbh: '-'
},
],
}
}
}
</script>
<style lang="scss">
.my-header-cell {
padding: 5px 0 !important;
.cell {
font-size: 12px !important;
}
}
.my-cell {
padding: 5px 0 !important;
.cell {
font-size: 12px !important;
}
}
</style>

@ -0,0 +1,71 @@
<template>
<div class="section-content">
<div class="section-title">
<i class="section-title-text" :class="icon"></i>
<div class="section-title-text" style="margin-left: 4px;" v-if="title">{{ title }}</div>
<div v-if="desc" style="margin-left: 20px;">{{ desc }}</div>
</div>
<div class="section-extra" v-if="extra">{{ extra }}</div>
<div class="section-block"></div>
</div>
</template>
<script>
export default {
name: 'SectionTitle',
props: {
icon: {
type: String,
default: 'el-icon-document'
},
title: {
type: String,
default: ''
},
desc: {
type: String,
default: ''
},
extra: {
type: String,
default: ''
}
},
data() {
return {}
}
}
</script>
<style lang="scss" scoped>
.section-content {
position: relative;
padding: 10px;
border-bottom: 1px solid #ccc;
display: flex;
align-items: center;
}
.section-title {
display: flex;
align-items: center;
flex-direction: row;
flex: 1;
color: #333;
.section-title-text {
color: #41B584;
font-size: 16px;
}
}
.section-extra {
color: #999;
}
.section-block {
position: absolute;
width: 120px;
height: 2px;
background-color: #41B584;
left: 10px;
bottom: 0;
}
</style>

@ -0,0 +1,266 @@
<!-- 机构任务 -->
<template>
<div v-loading="tableLoading">
<el-card class="query-container" shadow="never">
<!-- 表格查询条件 -->
<vab-query-form>
<vab-query-form-top-panel :span="24">
<el-form ref="seachForm" :inline="true" class="demo-form-inline">
<el-form-item label="机构代码">
<el-input
v-model="query.branchCode"
placeholder="请输入"
maxlength="32"
clearable
/>
</el-form-item>
<el-form-item label="机构名称">
<el-input
v-model="query.branchName"
placeholder="请输入"
maxlength="32"
clearable
/>
</el-form-item>
<el-form-item label="开始时间">
<el-date-picker
v-model="query.startDate"
value-format="yyyy-MM-dd"
type="date"
placeholder="选择日期"
clearable
></el-date-picker>
</el-form-item>
<el-form-item label="结束时间">
<el-date-picker
v-model="query.endDate"
value-format="yyyy-MM-dd"
type="date"
placeholder="选择日期"
clearable
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
@click="queryTable"
>
查询
</el-button>
<el-button
type="reset"
icon="el-icon-refresh"
@click="resetQueryTable"
>
重置
</el-button>
<el-button
type="reset"
icon="el-icon-download"
@click="exportData"
>导出
</el-button>
</el-form-item>
</el-form>
</vab-query-form-top-panel>
</vab-query-form>
</el-card>
<el-card class="el-row-main-container box-card box-card--table">
<!-- 表格主体 -->
<el-table
ref="multipleTable"
tooltip-effect="dark"
:data="tableData"
class="w100p"
@selection-change="handleSelectionChange"
border
@sort-change="sortChange"
:default-sort="tableSort"
header-cell-class-name="duojibiaotou"
>
<!-- <el-table-column type="selection" width="50" /> -->
<el-table-column
align="center"
label="机构代码"
show-overflow-tooltip
min-width="90"
prop="branchCode"
>
</el-table-column>
<el-table-column
align="center"
label="机构名称"
show-overflow-tooltip
min-width="160"
prop="branchName"
>
</el-table-column>
<el-table-column
align="center"
label="任务标题"
show-overflow-tooltip
min-width="160"
prop="sdTaskOther.taskTitle"
/>
<el-table-column
align="center"
label="开始时间"
show-overflow-tooltip
min-width="120"
prop="sdTaskOther.startDate"
>
</el-table-column>
<el-table-column
align="center"
label="结束时间"
show-overflow-tooltip
min-width="120"
prop="sdTaskOther.endDate"
>
</el-table-column>
<el-table-column
align="center"
label="反馈时间"
show-overflow-tooltip
min-width="120"
prop="sdTaskOtherFeedbackByFeedback.feedbackTime"
>
</el-table-column>
<el-table-column
align="center"
label="反馈状态"
show-overflow-tooltip
min-width="90"
>
<template v-slot="{ row }">
<template v-if="row.sdTaskOther && row.sdTaskOther.status === '2'">
<el-tag
type="success">已办结</el-tag>
</template>
<template v-else-if="row.sdTaskOtherFeedbackByCreate">
<el-tag v-if="row.sdTaskOtherFeedbackByCreate.status === '1'"
>已反馈</el-tag
>
<el-tag
v-else-if="row.sdTaskOtherFeedbackByCreate.status === '2'"
type="success"
>已通过</el-tag
>
<el-tag
v-else-if="row.sdTaskOtherFeedbackByCreate.status === '-1'"
type="danger"
>驳回</el-tag
>
<el-tag v-else type="info">未反馈</el-tag>
</template>
<el-tag v-else type="info">未反馈</el-tag>
</template>
</el-table-column>
<el-table-column width="80px" align="center" label="操作" fixed="right">
<template slot-scope="scope">
<el-link
class="table-opretar"
type="primary"
@click="toEdit(scope.row)"
>{{ getRowEditTitle(scope.row) }}</el-link
>
</template>
</el-table-column>
</el-table>
<!-- 表格页脚 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="page.pageNum"
:limit.sync="page.pageSize"
@pagination="getTableList"
/>
</el-card>
<AuditDialog ref="editDialog" :isAudit="!isPublish" @refresh="getTableList"></AuditDialog>
</div>
</template>
<script>
import AuditDialog from "@/views/task-distribut/send/other-task/components/AuditDialog";
import TableMixin from "@/mixins/table-mixin";
// import { pageListBranch } from "";
export default {
name: "BranchOtherTask",
components: {
AuditDialog,
},
mixins: [TableMixin],
pageInfo: {
title: "机构任务",
exportUrl: "/task/other/branch/export",
pageListApi: pageListBranch,
// deleteApi: delOther,
defaultQuery: {
isPublish: "1",
taskId: "",
},
},
props: {
customLoad: {
type: Boolean,
default: false,
},
//
isPublish: {
type: Boolean,
default: true,
},
taskId: {
type: [Number, String],
default: "",
},
},
watch: {
taskId(val) {
this.$options.pageInfo.defaultQuery.taskId = val;
this.tableData = [];
if (!val) {
return;
}
this.resetQueryTable();
},
},
data() {
return {};
},
methods: {
// isMe(row) {
// return row.userId === this.$store.getters?.userInfo?.userId;
// },
MXCreated() {
this.$options.pageInfo.defaultQuery.taskId = null,
this.query.taskId = null;
this.$options.pageInfo.customLoad = this.customLoad;
this.$options.pageInfo.defaultQuery.isPublish = this.isPublish ? "1" : "";
this.query.isPublish = this.$options.pageInfo.defaultQuery.isPublish;
},
getRowEditTitle(row) {
if (row.sdTaskOther && row.sdTaskOther.status === '2') {
return "查看";
}
if (this.isPublish) {
if (
!row.sdTaskOtherFeedbackByCreate?.status ||
row.sdTaskOtherFeedbackByCreate?.status === "0" ||
row.sdTaskOtherFeedbackByCreate?.status === "-1"
) {
return "反馈";
}
return "查看";
}
if (row.sdTaskOtherFeedbackByCreate?.status === "1") {
return "审核";
}
return "查看";
},
},
};
</script>

@ -0,0 +1,147 @@
<template>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="dialogVisible"
:title="`其他任务${isAudit ? '审核':'反馈'}`"
width="80%"
>
<div style="height: 70vh;width:100%;overflow-y: scroll;overflow-x: hidden;" v-loading="loading">
<SectionTitle title="基本信息" desc="" extra=""></SectionTitle>
<Detail :info="info.sdTaskOther" style="margin-top: 10px;"></Detail>
<SectionTitle title="反馈信息" icon="el-icon-s-comment" :desc="`共${auditList.length}条反馈`" extra=""></SectionTitle>
<el-timeline v-if="auditList.length > 0" style="margin-top: 20px;">
<el-timeline-item v-for="(item, index) in auditList" :key="getKey(item, index)" :timestamp="itemDate(item)" placement="top">
<el-card>
<AuditItem :info="info" :item="item" @refresh="auditChange"></AuditItem>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeVisible"></el-button>
</span>
</el-dialog>
</template>
<script>
import SectionTitle from "@/views/task-distribut/components/SectionTitle.vue";
import Detail from './Detail.vue';
import AuditItem from './AuditItem.vue';
// import { listFeedback } from "";
// import { getDateStr } from "@/utils/util";
export default {
name: 'AuditDialog',
components: {
SectionTitle,
Detail,
AuditItem,
},
props: {
isAudit: {
type: Boolean,
default: false
}
},
data() {
return {
dialogVisible: false,
loading: false,
info: {},
auditList: [],
isAuditChange: false,
};
},
watch: {
dialogVisible(val) {
if (!val && this.isAuditChange) {
this.$emit('refresh');
}
}
},
methods: {
getKey(item, index) {
return `${item.id}_${index}`;
},
open(data = {}) {
this.isAuditChange = false;
this.dialogVisible = true;
this.info = { ...data };
this.getList();
},
closeVisible() {
this.dialogVisible = false;
},
getList() {
this.auditList = [];
if (!this.info.id) {
return;
}
this.loading = true;
listFeedback({ taskId: this.info.taskId, taskBranchId: this.info.id, isPublish: this.isAudit ? '1':'' }).then(res => {
this.loading = false;
const list = res || [];
//
if (this.info.sdTaskOther?.status === '2') {
this.auditList = list;
return;
}
const lastItem = list.length > 0 ? list[list.length - 1] : null;
if (this.isAudit) {
if (!lastItem || lastItem.status === '1') {
list.push({
taskId: this.info.taskId,
taskBranchId: this.info.id,
branchCode: this.info.branchCode,
checkUserId: this.$store.getters.userInfo.userId,
checkUserName: this.$store.getters.userInfo.userName,
checkUserDept: this.$store.getters.depts.map(item => item.deptName).join(';'),
checkDate: getDateStr(),
checkInfo: ''
});
}
} else {
if (!lastItem || lastItem.status === '-1') {
list.push({
taskId: this.info.taskId,
taskBranchId: this.info.id,
branchCode: this.info.branchCode,
userId: this.$store.getters.userInfo.userId,
userName: this.$store.getters.userInfo.userName,
userDept: this.$store.getters.depts.map(item => item.deptName).join(';'),
feedbackTime: getDateStr(),
taskDesc: '',
status: '0'
});
}
}
this.auditList = list;
}).catch(err => {
this.loading = false;
});
},
auditChange() {
this.isAuditChange = true;
this.getList();
},
itemDate(item) {
if (item.status === '0' || item.status === '1') {
return item.feedbackTime;
}
return item.checkDate;
}
}
}
</script>
<style lang="scss" scoped>
</style>

@ -0,0 +1,189 @@
<template>
<el-form
ref="dialogForm"
:model="dialogForm"
class="demo-form-inline"
label-width="180"
size="small"
:rules="rules"
>
<el-descriptions class="margin-top" :column="2" border size="medium">
<template v-if="isAudit">
<el-descriptions-item label="审核人机构">
{{ dialogForm.checkUserDept || '-' }}
</el-descriptions-item>
<el-descriptions-item label="审核人">
{{ dialogForm.checkUserName || '-' }}
</el-descriptions-item>
<template v-if="editAble()">
<el-descriptions-item :span="2" label="审核信息">
<el-form-item class="desc-form-item" label="" prop="checkInfo">
<el-input v-model="dialogForm.checkInfo" type="textarea" placeholder="请输入审核信息" />
</el-form-item>
</el-descriptions-item>
</template>
<template v-else>
<el-descriptions-item :span="2" label="审核结果">
<el-tag v-if="dialogForm.status === '2'" type="success"></el-tag>
<el-tag v-else-if="dialogForm.status === '-1'" type="danger">驳回</el-tag>
<el-tag v-else type="info">未审核</el-tag>
</el-descriptions-item>
<el-descriptions-item :span="2" label="审核信息">
{{ dialogForm.checkInfo || '无' }}
</el-descriptions-item>
</template>
</template>
<template v-else>
<el-descriptions-item label="反馈人机构">
{{ dialogForm.userDept || '-' }}
</el-descriptions-item>
<el-descriptions-item label="反馈人">
{{ dialogForm.userName || '-' }}
</el-descriptions-item>
<el-descriptions-item :span="2" label="反馈信息">
<el-form-item v-if="editAble()" class="desc-form-item" label="" prop="taskDesc">
<el-input v-model="dialogForm.taskDesc" type="textarea" placeholder="请输入反馈信息" />
</el-form-item>
<span v-else>{{ dialogForm.taskDesc || '' }}</span>
</el-descriptions-item>
</template>
<el-descriptions-item :span="2" v-if="editAble() || dialogForm.fileId">
<template slot="label">
<i class="el-icon-paperclip"></i>
附件
</template>
<el-form-item class="desc-form-item" label="" prop="fileId">
<FileUpload v-model="dialogForm.fileId" :readonly="!editAble()"></FileUpload>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
<div v-if="editAble()" style="margin-top: 10px;">
<template v-if="isAudit">
<el-button type="primary" v-loading="saving" @click="preSubmit('2')"></el-button>
<el-button type="danger" v-loading="saving" @click="preSubmit('-1')"></el-button>
</template>
<template v-else>
<el-button v-loading="saving" @click="preSubmit()"></el-button>
<el-button type="primary" v-loading="saving" @click="preSubmit('1')"></el-button>
</template>
</div>
</el-form>
</template>
<script>
// status; 0稿 12-1 null
import TableEditMixin from "@/mixins/table-edit-mixin";
// import { addFeedback, updateFeedback } from "";
// import { getDateStr } from "@/utils/util";
import FileUpload from "@/components/FileUpload";
export default {
name: 'AuditItem',
components: { FileUpload },
mixins: [TableEditMixin],
pageInfo: {
defaultForm: {
},
updateApi: updateFeedback,
addApi: addFeedback,
},
props: {
info: {
type: Object,
default: () => ({})
},
item: {
type: Object,
default: () => ({})
}
},
computed: {
isAudit() {
//
return !this.dialogForm.status || this.dialogForm.status === '2' || this.dialogForm.status === '-1';
}
},
data() {
return {
rules: {
checkInfo: [
{ required: true, message: '请输入审核信息', trigger: 'blur' }
],
taskDesc: [
{ required: true, message: '请输入反馈信息', trigger: 'blur' }
]
},
submitStatus: null,
};
},
watch: {
item: {
handler(val) {
this.dialogForm = {...this.$options.pageInfo.defaultForm, ...val};
this.$nextTick(() => {
this.$refs.dialogForm.clearValidate();
});
},
immediate: true,
deep: true
}
},
methods: {
editAble() {
if (this.info.sdTaskOther?.status === '2') {
//
return false;
}
return !this.dialogForm.status || this.dialogForm.status === '0';
},
preSubmit(status) {
this.submitStatus = status;
if (this.submitStatus === '1') {
this.$confirm(`确定提交进行审核?`, '温馨提示', {
type: 'warning'
}).then(res => {
this.dialogForm.feedbackTime = getDateStr();
this.submitForm();
});
return;
}
if (this.submitStatus === '2') {
this.$confirm(`确定通过审核?`, '温馨提示', {
type: 'warning'
}).then(res => {
this.dialogForm.checkDate = getDateStr();
this.submitForm();
});
return;
}
if (this.submitStatus === '-1') {
this.$confirm(`确定驳回审核?`, '温馨提示', {
type: 'warning'
}).then(res => {
this.dialogForm.checkDate = getDateStr();
this.submitForm();
});
return;
}
this.submitForm();
},
combinDialogForm() {
if (this.submitStatus) {
return {
...this.dialogForm,
status: this.submitStatus,
};
}
return this.dialogForm;
},
}
}
</script>
<style lang="scss" scoped>
.desc-form-item {
margin: 0;
}
</style>

@ -0,0 +1,89 @@
<template>
<el-descriptions class="margin-top" :column="2" size="medium" border>
<el-descriptions-item :span="2">
<template slot="label">
<i class="el-icon-document"></i>
任务标题
</template>
{{ info.taskTitle }}
</el-descriptions-item>
<el-descriptions-item :span="2">
<template slot="label">
<i class="el-icon-document"></i>
任务要求
</template>
{{ info.taskContent }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-date"></i>
开始时间
</template>
{{ info.startDate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-date"></i>
结束时间
</template>
{{ info.endDate }}
</el-descriptions-item>
<el-descriptions-item :span="2">
<template slot="label">
<i class="el-icon-office-building"></i>
发起机构代码
</template>
{{ info.branchCode }}
</el-descriptions-item>
<el-descriptions-item :span="2">
<template slot="label">
<i class="el-icon-office-building"></i>
发起机构名称
</template>
{{ info.branchName }}
</el-descriptions-item>
<el-descriptions-item :span="2">
<template slot="label">
<i class="el-icon-date"></i>
发布日期
</template>
{{ info.taskDate }}
</el-descriptions-item>
<el-descriptions-item :span="2" v-if="info.fileId">
<template slot="label">
<i class="el-icon-paperclip"></i>
附件
</template>
<FileUpload v-model="info.fileId" readonly></FileUpload>
</el-descriptions-item>
</el-descriptions>
</template>
<script>
import FileUpload from "@/components/FileUpload";
export default {
name: 'Detail',
components: { FileUpload },
props: {
info: {
type: Object,
default: () => {
return {}
}
}
},
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

@ -0,0 +1,333 @@
<template>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="dialogVisible"
:title="title"
>
<el-row :gutter="20">
<el-col :span="14">
<el-form
ref="dialogForm"
label-position="top"
:model="dialogForm"
status-icon
class="demo-form-inline"
label-width="180"
:rules="rules"
style="flex: 1"
:disabled="!editAble"
>
<el-form-item label="任务标题" prop="taskTitle">
<el-input v-model="dialogForm.taskTitle" placeholder="请输入">
</el-input>
</el-form-item>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="开始时间" prop="startDate">
<el-date-picker
style="width: 100%"
v-model="dialogForm.startDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择开始时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" prop="endDate">
<el-date-picker
style="width: 100%"
v-model="dialogForm.endDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择开始时间"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="任务要求" prop="taskContent">
<el-input
v-model="dialogForm.taskContent"
type="textarea"
placeholder="请输入"
>
</el-input>
</el-form-item>
<el-form-item label="" prop="fileId">
<FileUpload
v-model="dialogForm.fileId"
:readonly="!editAble"
accept=".xls,.xlsx,.doc,.docx,.pdf,.png,.jpg,.jpeg,.gif,.ppt,.pptx"
></FileUpload>
</el-form-item>
</el-form>
</el-col>
<el-col :span="10">
<div v-loading="branchLoading">
<div class="table-top-opretar">
<span style="font-size: 15px;font-weight: 500;">发送到机构</span>
<el-button v-if="editAble" type="primary" icon="el-icon-plus" @click="toAdd"
>新增
</el-button>
<el-button
v-if="editAble"
type="reset"
:disabled="selectBranch.length === 0"
icon="el-icon-delete"
@click="toMultDelete"
>批量删除
</el-button>
</div>
<!-- 表格主体 -->
<el-table
ref="multipleTable"
tooltip-effect="dark"
:data="branchList"
class="w100p"
style="width: 100%;"
height="60vh"
@selection-change="handleSelectionChange"
border
header-cell-class-name="duojibiaotou"
>
<el-table-column type="selection" width="50" />
<el-table-column
align="center"
label="机构代码"
show-overflow-tooltip
min-width="90"
prop="branchCode"
>
</el-table-column>
<el-table-column
align="center"
label="机构名称"
show-overflow-tooltip
min-width="120"
prop="branchName"
>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="closeVisible"></el-button>
<el-button type="primary" v-if="editAble" v-loading="saving" @click="preSubmitForm()"
>保存</el-button>
<el-button v-if="editAble" type="success" v-loading="saving" @click="preSubmitForm('1')"
>发布</el-button>
<el-button v-if="isMe && dialogForm.status === '1'" type="warning" v-loading="saving" @click="preSubmitForm('2')"
>办结</el-button>
</span>
<BranchCascaderDialog
ref="branchCascaderDialog"
:parentId="350000"
@comfirm="branchChange"
></BranchCascaderDialog>
</el-dialog>
</template>
<script>
import TableEditMixin from "@/mixins/table-edit-mixin";
import FileUpload from "@/components/FileUpload";
import BranchCascaderDialog from "@/components/BranchCascaderDialog";
// import { addOther, updateOther } from "@/api/";
// import {
// delBranch,
// listBranch,
// } from "@/api/";
// import { getDateStr } from "@/utils/";
export default {
components: {
FileUpload,
BranchCascaderDialog,
},
mixins: [TableEditMixin],
pageInfo: {
defaultForm: {
status: "0", // 01 2/
startDate: null,
endDate: null,
},
title: "其他任务",
updateApi: updateOther,
addApi: addOther,
},
data() {
return {
rules: {
taskTitle: [
{ required: true, message: "请输入任务标题", trigger: "blur" },
{ min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" }
],
startDate: [
{ required: true, message: "请输入开始时间", trigger: "change" }
],
endDate: [
{ required: true, message: "请输入结束时间", trigger: "change" }
],
taskContent: [
{ required: true, message: "请输入任务要求", trigger: "blur" },
]
},
branchList: [],
selectBranch: [],
branchLoading: false,
isSubmit: '',
};
},
computed: {
editAble() {
return !this.dialogForm.id || (this.dialogForm.status === '0' && this.isMe);
},
isMe() {
return !this.dialogForm.publisher || this.dialogForm.publisher == this.$store.getters?.userInfo?.userId;
}
},
methods: {
open(data = {}) {
this.title = `${data.id ? "编辑" : "新增"}${
this.$options.pageInfo.title
}`;
this.dialogVisible = true;
this.dialogForm = { ...this.$options.pageInfo.defaultForm, ...data };
if (this.dialogForm.id && this.dialogForm.userId !== this.$store.getters?.userInfo?.userId) {
this.title = `查看${
this.$options.pageInfo.title
}`;
}
if (!data.id) {
//
this.dialogForm.publisher = this.$store.getters?.userInfo?.userId;
}
if (!this.dialogForm.branchCode) {
let dept = null;
this.$store.getters.depts.forEach(v => {
if (!dept || dept.deptId > v.deptId) {
dept = v;
}
});
if (dept) {
this.dialogForm.branchCode = dept.deptId;
this.dialogForm.branchName = dept.deptName;
}
}
this.$nextTick(() => {
this.$refs.dialogForm.clearValidate();
});
this.branchList = [];
this.selectBranch = [];
this.getBranchList();
},
toAdd() {
this.$refs.branchCascaderDialog.open();
},
toMultDelete() {
const ids = this.selectBranch.filter((v) => !!v.id).map((v) => v.id);
this.$confirm(`确定删除选中的机构?`, "批量删除提示", {
type: "warning",
}).then((e) => {
if (ids.length === 0) {
this.branchList = this.branchList.filter(
(v) => !this.selectBranch.includes(v)
);
return;
}
this.branchLoading = true;
delBranch(ids)
.then((res) => {
this.branchList = this.branchList.filter(
(v) => !this.selectBranch.includes(v)
);
this.branchLoading = false;
})
.catch((e) => {
this.branchLoading = false;
});
});
},
handleSelectionChange(val) {
this.selectBranch = val;
},
getBranchList() {
if (!this.dialogForm.id) return;
this.branchLoading = true;
listBranch({
taskId: this.dialogForm.id,
})
.then((res) => {
this.branchList = res || [];
this.branchLoading = false;
})
.catch((e) => {
this.branchLoading = false;
});
},
branchChange(val) {
val.forEach((item) => {
if (this.branchList.some((v) => v.branchCode === item.deptId + "")) {
return;
}
this.branchList.push({
branchCode: item.deptId + "",
branchName: item.deptName,
taskStatus: "0", // 0 1
});
});
},
preSubmitForm(type) {
if (this.branchList.length === 0) {
this.$message.error("请选择发送到机构");
return;
}
this.isSubmit = type;
if (type === '1' || type === '2') {
this.$confirm(`确定${type === '1' ? '发布' : '办结'}任务?`, "温馨提示", {
type: "warning"
}).then(res => {
// /
this.submitForm();
});
return;
}
this.submitForm();
},
combinDialogForm() {
if (this.isSubmit === '1' || this.isSubmit === '2') {
return {
...this.dialogForm,
branchList: this.branchList.map(val => {
const newVal = { ...val };
if (!newVal.taskStatus || newVal.taskStatus === '0') {
//
newVal.taskStatus = this.isSubmit;
} else if (newVal.taskStatus === '1' && this.isSubmit === '2') {
//
newVal.taskStatus = this.isSubmit;
}
return newVal;
}),
status: this.isSubmit, //
taskDate: getDateStr(),
};
}
return {
...this.dialogForm,
branchList: this.branchList,
};
},
},
};
</script>
<style>
</style>

@ -0,0 +1,80 @@
<template>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="dialogVisible"
:title="title"
>
<el-form
ref="dialogForm"
label-position="top"
:model="dialogForm"
status-icon
class="demo-form-inline"
label-width="180"
:rules="rules"
>
<el-form-item label="任务备注" prop="remarks">
<el-input
v-model="dialogForm.remarks"
type="textarea"
placeholder="请输入"
>
</el-input>
</el-form-item>
<el-form-item label="" prop="fileRemarks">
<FileUpload
v-model="dialogForm.fileRemarks"
accept=".xls,.xlsx,.doc,.docx,.pdf,.png,.jpg,.jpeg,.gif,.ppt,.pptx"
></FileUpload>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="closeVisible"></el-button>
<el-button type="primary" v-loading="saving" @click="submitForm"
>保存</el-button>
</span>
</el-dialog>
</template>
<script>
import TableEditMixin from "@/mixins/table-edit-mixin";
import FileUpload from "@/components/FileUpload";
// import { addOther, updateOther } from "@/api/";
export default {
name: 'RemarkDialog',
components: {
FileUpload,
},
mixins: [TableEditMixin],
pageInfo: {
defaultForm: {
},
title: "任务备注",
updateApi: updateOther,
// addApi: addOther,
},
data() {
return {
rules: {
},
};
},
methods: {
open(data = {}) {
this.title = `编辑${
this.$options.pageInfo.title
}`;
this.dialogVisible = true;
this.dialogForm = { ...this.$options.pageInfo.defaultForm, ...data };
},
},
};
</script>
<style>
</style>

@ -0,0 +1,271 @@
<!-- 其他任务 -->
<template>
<div v-loading="tableLoading">
<el-card class="query-container" shadow="never">
<!-- 表格查询条件 -->
<vab-query-form>
<vab-query-form-top-panel :span="24">
<el-form ref="seachForm" :inline="true" class="demo-form-inline">
<el-form-item label="机构代码">
<el-input
v-model="query.branchCode"
placeholder="请输入"
maxlength="32"
clearable
/>
</el-form-item>
<el-form-item label="机构名称">
<el-input
v-model="query.branchName"
placeholder="请输入"
maxlength="32"
clearable
/>
</el-form-item>
<el-form-item label="开始时间">
<el-date-picker
v-model="query.startDateVo"
value-format="yyyy-MM-dd"
type="date"
placeholder="选择日期"
clearable
></el-date-picker>
</el-form-item>
<el-form-item label="结束时间">
<el-date-picker
v-model="query.endDateVo"
value-format="yyyy-MM-dd"
type="date"
placeholder="选择日期"
clearable
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
@click="queryTable"
>
查询
</el-button>
<el-button
type="reset"
icon="el-icon-refresh"
@click="resetQueryTable"
>
重置
</el-button>
<el-button
type="reset"
icon="el-icon-download"
@click="exportData"
>导出
</el-button>
</el-form-item>
</el-form>
</vab-query-form-top-panel>
</vab-query-form>
</el-card>
<el-card class="el-row-main-container box-card box-card--table">
<div class="table-top-opretar">
<el-button
type="primary"
icon="el-icon-plus"
@click="toAdd"
>新增
</el-button>
<el-button
type="reset"
:disabled="selectrows.length === 0"
icon="el-icon-delete"
@click="toMultDelete"
>删除
</el-button>
</div>
<!-- 表格主体 -->
<el-table
ref="multipleTable"
tooltip-effect="dark"
:data="tableData"
class="w100p"
@selection-change="handleSelectionChange"
border
@sort-change="sortChange"
:default-sort="tableSort"
header-cell-class-name="duojibiaotou"
highlight-current-row
@row-click="rowClick"
>
<el-table-column type="selection" width="50" />
<el-table-column
align="center"
label="任务标题"
show-overflow-tooltip
min-width="160"
prop="taskTitle"
/>
<el-table-column
align="center"
label="开始时间"
show-overflow-tooltip
min-width="120"
prop="startDate"
>
</el-table-column>
<el-table-column
align="center"
label="结束时间"
show-overflow-tooltip
min-width="120"
prop="endDate"
>
</el-table-column>
<el-table-column
align="center"
label="任务状态"
show-overflow-tooltip
min-width="90"
prop="status"
>
<template v-slot="{ row }">
<el-tag v-if="row.status === '1'"></el-tag>
<el-tag v-else-if="row.status === '2'">已办结</el-tag>
<el-tag v-else type="info">未发布</el-tag>
</template>
</el-table-column>
<el-table-column
align="center"
label="发起单位代码"
show-overflow-tooltip
min-width="90"
prop="branchCode"
>
</el-table-column>
<el-table-column
align="center"
label="发起单位"
show-overflow-tooltip
min-width="180"
prop="branchName"
>
</el-table-column>
<el-table-column
align="center"
label="发布日期"
show-overflow-tooltip
min-width="120"
prop="taskDate"
>
</el-table-column>
<el-table-column
width="130px"
align="center"
label="操作"
fixed="right"
>
<template slot-scope="scope">
<el-link class="table-opretar" type="primary" @click="toEdit(scope.row)"
>{{scope.row.status === '0' && isMe(scope.row) ? '编辑':'查看'}}</el-link>
<!-- <el-link class="table-opretar" type="danger" @click="toDelete(scope.row)"
>发布</el-link> -->
<el-link v-if="scope.row.status === '1' && isMe(scope.row)" class="table-opretar" type="primary" @click="toWithdraw(scope.row)"
>撤回</el-link>
<el-link v-if="isMe(scope.row)" class="table-opretar" type="primary" @click="toRemark(scope.row)"
>备注</el-link>
<el-link v-if="isMe(scope.row) && scope.row.publisher" class="table-opretar" type="warning" @click="toPrivate(scope.row)"
>设为{{ scope.row.affiliation ? '公开':'私有' }}</el-link>
</template>
</el-table-column>
</el-table>
<!-- 表格页脚 -->
<pagination
v-show="total > 0"
:total="total"
:pageSizes="[5, 10, 20, 50]"
:page.sync="page.pageNum"
:limit.sync="page.pageSize"
@pagination="getTableList"
/>
</el-card>
<BranchOtherTask customLoad :isPublish="false" :taskId="selectTask.id"></BranchOtherTask>
<EditDialog ref="editDialog" @refresh="getTableList"></EditDialog>
<RemarkDialog ref="remarkDialog" @refresh="getTableList"></RemarkDialog>
</div>
</template>
<script>
import EditDialog from "./components/EditDialog";
import RemarkDialog from "./components/RemarkDialog";
import TableMixin from "@/mixins/table-mixin";
// import { pageListOther, delOther, withdrawOther, editByAffiliation } from "@/api/";
import BranchOtherTask from '@/views/task-distribut/feedback/other-task';
export default {
components: {
EditDialog,
BranchOtherTask,
RemarkDialog
},
mixins: [TableMixin],
pageInfo: {
title: '其他任务',
exportUrl: '/task/other/export',
pageListApi: pageListOther,
deleteApi: delOther,
},
data() {
return {
selectTask: {}
};
},
methods: {
isMe(row) {
return !row.publisher || row.publisher == this.$store.getters?.userInfo?.userId;
},
toWithdraw(row) {
this.$confirm('确定撤回到未发布状态吗?', '温馨提示', {
type: 'warning'
}).then(res => {
withdrawOther(row.id).then(() => {
this.$message.success('撤回成功');
this.getTableList();
});
});
},
rowClick(row) {
this.selectTask = row;
},
didGetTableList(success) {
// if (this.tableData.length > 0) {
// this.$refs.multipleTable.setCurrentRow(this.tableData[0]);
// this.selectTask = this.tableData[0];
// } else {
// this.$refs.multipleTable.setCurrentRow();
// this.selectTask = {};
// }
},
MXDefaultPage() {
return {
pageNum: 1,
pageSize: 5,
};
},
toRemark(row) {
this.$refs.remarkDialog.open(row);
},
//
toPrivate(row) {
this.$confirm(`确定设置为${row.affiliation ? '公开':'私有'}吗?`, '温馨提示', {
type: 'warning'
}).then(res => {
editByAffiliation(row.id).then(() => {
this.$message.success('设置成功');
this.getTableList();
});
});
}
}
};
</script>
Loading…
Cancel
Save