parent
a50ef28409
commit
98a1a0cb69
@ -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,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,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,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…
Reference in new issue