Browse Source

发布任务接口对接

luckysheet-xiaowang-Intelligen
是小王呀\24601 8 months ago
parent
commit
a21132c3b3
  1. 44
      src/views/modules/base/smartExcel/cpts/excel-info.vue
  2. 39
      src/views/modules/base/smartExcel/index.vue

44
src/views/modules/base/smartExcel/cpts/excel-info.vue

@ -10,11 +10,11 @@
<el-col :span="8">
<el-form-item label="任务主题">
<div style="display: flex; align-items: center;">
<div>{{ formData.title}}</div>
<div>{{ formData.taskTitle}}</div>
<div
style="display: flex;margin-left: 10px;
justify-content: center; align-items: center; width: 60px; height: 20px; border: 2px solid #ADD8E6; color: #ADD8E6; font-size: 12px;">
进行中
{{ formData.taskState === 'resolved' ? '已完成' : formData.taskState === 'cancel' ? '已取消' : '进行中' }}
</div>
</div>
@ -22,17 +22,17 @@
</el-col>
<el-col :span="16">
<el-form-item label="任务发布时间">
<div>{{formData.date}}</div>
<div>{{formData.createdTime}}</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="任务发布部门">
<div>{{formData.bumen}}</div>
<div>{{formData.agencyName}}</div>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="任务发布人">
<div>{{formData.person}}</div>
<div>{{formData.createByName}}</div>
</el-form-item>
</el-col>
<el-col :span="8">
@ -42,13 +42,13 @@
</el-col>
<el-col :span="16">
<el-form-item label="任务周期">
<div>{{formData.cycle}}</div>
<div>{{formData.taskPeriod === 'once' ? '一次性' : '每周'}}</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="分发人员">
<div style="display: flex;flex-direction: row; align-items: center;">
<div>{{formData.fenfa}}</div>
<div>{{formData.totalNum}}</div>
<el-button @click="oncClickInfo('info')" style="margin-left: 10px;"
type="text">查看接收人员名单</el-button>
<el-button @click="oncClickInfo('adjust')" type="text">调整收人人员</el-button>
@ -59,7 +59,7 @@
<el-col :span="24">
<el-form-item label="任务说明">
<div style="display: flex;flex-direction: row; align-items: center;">
<div>{{formData.shuoming}}</div>
<div>{{formData.taskIntroduction}}</div>
<el-button style="margin-left: 10px;" type="text"
@click="oncClickInfo('edit')">[修改]</el-button>
</div>
@ -100,6 +100,7 @@
</div>
</template>
<script>
import { requestPost, requestGet } from "@/js/dai/request";
import acceptingPersonel from "./acceptingPersonel.vue";
import excelSummary from "./excel-summary.vue";
import { mapGetters } from 'vuex'
@ -110,16 +111,6 @@ export default {
showPersonel:false,
showSummary:false,
formData:{
acceptingId:"12313",
title:"请各社区提报党员信息进行中",
date:"2024-11-18 11:20:32",
person:"张三",
bumen:"xx区xx街道",
status:1,
type:"数据采集",
cycle:"每周",
fenfa:"16",
shuoming:"请各社区技照模板表格提报各自的党员信息,并于每周五前完成提报。请各社区按照模板表格提报各自的党员信息,并于每周五完成提报。请各社区按照模板表格提报各自的党员信息,并于每周五前完成提报"
},
tableData:[
{
@ -131,7 +122,18 @@ export default {
};
},
created() {},
async mounted() {
this.getDetail()
},
methods: {
getDetail() {
let parms = {
id: this.taskId,
};
requestGet('/actual/base/communityOneTablePublish/getDetail', parms).then(res => {
this.formData=res.data
});
},
handelClickBack() {
this.$emit('handleShowPage')
},
@ -163,6 +165,12 @@ export default {
},
...mapGetters(['clientHeight', 'resolution']),
},
props: {
taskId: {
type: String,
default: ""
},
},
watch: {},
}
</script>

39
src/views/modules/base/smartExcel/index.vue

@ -89,11 +89,11 @@
<el-table-column fixed="right" label="操作" align="center" width="200px">
<template slot-scope="scope">
<el-button @click=" handleInfo(scope.row)" type="text" size="small">查看</el-button>
<el-button @click=" handleInfo(scope.row)" type="text" size="small" >查看</el-button>
<!-- 取消操作需要做密码校验 -->
<el-button v-if="scope.row.taskState=='deal'" @click="handleCancel(scope.row)" type="text" size="small" class="">取消</el-button>
<!-- 取消后可进行删除 -->
<el-button @click="handleDel(scope.row)" type="text" size="small" class="">删除</el-button>
<el-button v-if="scope.row.taskState!=='deal'" @click="handleDel(scope.row)" type="text" size="small" class="">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -107,7 +107,7 @@
</div>
</div>
<div v-if="pageType == 'info'">
<excel-info @handleShowPage="handleShowPage"></excel-info>
<excel-info @handleShowPage="handleShowPage" :taskId=task></excel-info>
</div>
<div v-if="pageType == 'add'">
<excel-add @handleShowPage="handleShowPage"></excel-add>
@ -146,6 +146,7 @@ export default {
return time.getTime() > nowData;
};
return {
task:"",
pageType: "list", // list add info
tableData: [],
formData: {
@ -156,9 +157,6 @@ export default {
endTime: '',//
createdBy: ''//
},
// orgOptionProps,
// orgOptions: [],
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
@ -215,15 +213,24 @@ export default {
async handleCancel(item){
let parms = {
id:item.id,
};
let {data,code} = await requestPost('/actual/base/communityOneTablePublish/cancelTask',parms)
console.log(data,"lkjdsflk");
if (code==0) {
this.pageNo=1
this.getTableData()
}
this.$confirm("取消之后无法恢复,确认取消?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
requestPost('/actual/base/communityOneTablePublish/cancelTask', parms).then(res=>{
if (res.code==0) {
this.pageNo = 1
this.getTableData()
}
})
})
.catch((err) => {
if (err == "cancel") {
}
});
},
async getStafflist() {
let parms = {
@ -244,7 +251,9 @@ export default {
this.pageType = 'add';
console.log(this.pageType);
},
handleInfo() {
handleInfo(item) {
console.log(item,"dkljsfdlk");
this.task=item.id
this.pageType = 'info'
},
getLastItem(list, vals, key) {

Loading…
Cancel
Save