|
@@ -16,22 +16,26 @@
|
|
|
</template>
|
|
|
<el-form :inline="true" ref="myTaskForm" :model="formInline">
|
|
|
<el-form-item label="任务类型">
|
|
|
- <el-select size="mini" v-model="formInline.taskType" placeholder="任务类型">
|
|
|
- <el-option-group v-for="group in taskTypeOptions" :key="group.label" :label="group.label">
|
|
|
- <el-option v-for="item in group.options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
|
|
- </el-option-group>
|
|
|
+ <el-select v-model="formInline.taskType" filterable placeholder="请选择" width="100%" clearable>
|
|
|
+ <el-option v-for="item in selectSelectDataMap.projectType" :key="item.index" :label="item.name" :value="item.index">
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="关联项目">
|
|
|
- <el-select size="mini" v-model="formInline.associatedItems" placeholder="关联项目">
|
|
|
- <el-option v-for="item in associatedItemsOptions" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ <el-select size="mini" v-model="formInline.associatedItems" placeholder="关联项目" clearable filterable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in selectSelectDataMap.associatedItemsOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="审计状态">
|
|
|
- <el-select size="mini" v-model="formInline.auditStatus" placeholder="审计状态">
|
|
|
- <el-option label="已审核" value="ReviewedAndApproved"></el-option>
|
|
|
- <el-option label="未审核" value="NotReviewed"></el-option>
|
|
|
+ <el-select size="mini" v-model="formInline.auditStatus" placeholder="审计状态" clearable>
|
|
|
+ <el-option label="已审核" value="3"></el-option>
|
|
|
+ <el-option label="未审核" value="1,2"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="float: right">
|
|
@@ -39,17 +43,35 @@
|
|
|
<el-button @click="resetForm()">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-table :data="tableData" style="width: 100%" height="calc(80vh - 400px)" stripe @click="ToView">
|
|
|
+ <el-table
|
|
|
+ :data="tableData"
|
|
|
+ style="width: 100%"
|
|
|
+ height="calc(80vh - 400px)"
|
|
|
+ stripe
|
|
|
+ @click="ToView"
|
|
|
+ v-loading="tableInitLoading"
|
|
|
+ >
|
|
|
<el-table-column type="index" width="50"> </el-table-column>
|
|
|
- <el-table-column prop="taskId" label="任务编号"> </el-table-column>
|
|
|
- <el-table-column prop="taskName" label="任务名称"> </el-table-column>
|
|
|
- <el-table-column prop="createDate" label="创建时间"> </el-table-column>
|
|
|
+ <!-- <el-table-column prop="c_task_id" label="任务编号"> </el-table-column> -->
|
|
|
+ <el-table-column prop="c_task_name" label="任务名称"> </el-table-column>
|
|
|
+ <el-table-column prop="c_create_time" label="创建时间"> </el-table-column>
|
|
|
<el-table-column prop="state" label="状态">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag :type="scope.row.state === '已审核' ? 'success' : 'info'" disable-transitions>{{ scope.row.state }}</el-tag>
|
|
|
+ <el-tag :type="scope.row.state == '3' ? 'success' : 'info'" disable-transitions>{{
|
|
|
+ scope.row.state == "3" ? "已审核" : "未审核"
|
|
|
+ }}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="taskType" label="任务类型"> </el-table-column>
|
|
|
+ <el-table-column prop="c_task_type" label="任务类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ getSelectByIndex("projectType", scope.row.c_task_type) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="c_area_code" label="所属街镇">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ getSelectByIndex("associatedItems", scope.row.c_area_code) }}
|
|
|
+ </template></el-table-column
|
|
|
+ >
|
|
|
</el-table>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<Pagination :paginationData="paginationData" />
|
|
@@ -69,6 +91,7 @@ export default {
|
|
|
components: { Pagination },
|
|
|
data() {
|
|
|
return {
|
|
|
+ tableInitLoading: true,
|
|
|
// 我的任务弹窗显示状态
|
|
|
dialogVisible: false,
|
|
|
// 查询条件
|
|
@@ -77,6 +100,12 @@ export default {
|
|
|
associatedItems: "",
|
|
|
auditStatus: ""
|
|
|
},
|
|
|
+ // 数据字典暂存对象
|
|
|
+ selectSelectDataMap: {
|
|
|
+ projectType: [],
|
|
|
+ associatedItems: [],
|
|
|
+ associatedItemsOptions: []
|
|
|
+ },
|
|
|
// 分页组件(根据后台返回结果赋值)
|
|
|
paginationData: {
|
|
|
pageSize: 5,
|
|
@@ -91,104 +120,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 任务类型options
|
|
|
- taskTypeOptions: [
|
|
|
- {
|
|
|
- label: "全部类型",
|
|
|
- options: [
|
|
|
- {
|
|
|
- value: "all",
|
|
|
- label: "全部类型"
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "基本类型",
|
|
|
- options: [
|
|
|
- {
|
|
|
- value: "landResources",
|
|
|
- label: "土地资源"
|
|
|
- },
|
|
|
- {
|
|
|
- value: "ecologicalResources",
|
|
|
- label: "生态资源"
|
|
|
- },
|
|
|
- {
|
|
|
- value: "forestLandResources",
|
|
|
- label: "林地资源"
|
|
|
- },
|
|
|
- {
|
|
|
- value: "waterResources",
|
|
|
- label: "水资源"
|
|
|
- },
|
|
|
- {
|
|
|
- value: "townAreaTopic",
|
|
|
- label: "镇域专题"
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "土地资源",
|
|
|
- options: [
|
|
|
- {
|
|
|
- value: "lr_bfm",
|
|
|
- label: "基本农田监控"
|
|
|
- },
|
|
|
- {
|
|
|
- value: "lr_soclr",
|
|
|
- label: "建设用地减量化监管"
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ],
|
|
|
+ taskTypeOptions: [],
|
|
|
// 关联项目options
|
|
|
- associatedItemsOptions: [
|
|
|
- {
|
|
|
- value: "1",
|
|
|
- label: "项目1"
|
|
|
- },
|
|
|
- {
|
|
|
- value: "2",
|
|
|
- label: "项目2"
|
|
|
- }
|
|
|
- ],
|
|
|
+ associatedItemsOptions: [],
|
|
|
// 我的任务form表单
|
|
|
- tableData: [
|
|
|
- {
|
|
|
- createDate: "2016-05-03",
|
|
|
- taskName: "任务名称",
|
|
|
- taskId: "任务编号",
|
|
|
- state: "已审核",
|
|
|
- taskType: "土地资源"
|
|
|
- },
|
|
|
- {
|
|
|
- createDate: "2016-05-03",
|
|
|
- taskName: "任务名称",
|
|
|
- taskId: "任务编号",
|
|
|
- state: "未审核",
|
|
|
- taskType: "土地资源"
|
|
|
- },
|
|
|
- {
|
|
|
- createDate: "2016-05-03",
|
|
|
- taskName: "任务名称",
|
|
|
- taskId: "任务编号",
|
|
|
- state: "已审核",
|
|
|
- taskType: "土地资源"
|
|
|
- },
|
|
|
- {
|
|
|
- createDate: "2016-05-03",
|
|
|
- taskName: "任务名称",
|
|
|
- taskId: "任务编号",
|
|
|
- state: "已审核",
|
|
|
- taskType: "土地资源"
|
|
|
- },
|
|
|
- {
|
|
|
- createDate: "2016-05-03",
|
|
|
- taskName: "任务名称",
|
|
|
- taskId: "任务编号",
|
|
|
- state: "已审核",
|
|
|
- taskType: "土地资源"
|
|
|
- }
|
|
|
- ]
|
|
|
+ tableData: []
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -203,20 +139,129 @@ export default {
|
|
|
},
|
|
|
props: [],
|
|
|
methods: {
|
|
|
+ // 数据字典对照显示
|
|
|
+ getSelectByIndex(selectName, index) {
|
|
|
+ let slotValue = "";
|
|
|
+ if (this.selectSelectDataMap[selectName] && this.selectSelectDataMap[selectName].length > 0) {
|
|
|
+ this.selectSelectDataMap[selectName].forEach(item => {
|
|
|
+ if (item.index == index) {
|
|
|
+ slotValue = item.name;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return slotValue;
|
|
|
+ },
|
|
|
+ // 请求获取所有关联项目数据
|
|
|
+ getAllPorjects() {
|
|
|
+ if (!this.initLoading) {
|
|
|
+ this.initLoading = true;
|
|
|
+ }
|
|
|
+ let params = new FormData();
|
|
|
+ params.append("columnId", "60");
|
|
|
+ params.append("states", "3");
|
|
|
+ params.append("pageSize", 20);
|
|
|
+ params.append("page", 0);
|
|
|
+ let sortparam = [{ field: "c_create_date", orderByType: 2 }];
|
|
|
+ params.append("orderBy", JSON.stringify(sortparam));
|
|
|
+ this.$Post(this.urlsCollection.selectContentList, params).then(
|
|
|
+ res => {
|
|
|
+ if (res.code === 200 && res.content.data.length > 0) {
|
|
|
+ let associatedItemsOptionsData = res.content.data;
|
|
|
+ associatedItemsOptionsData.filter(item => {
|
|
|
+ this.selectSelectDataMap.associatedItemsOptions.push({
|
|
|
+ label: item.c_project_name,
|
|
|
+ value: item.id,
|
|
|
+ c_owning_street_town: item.c_owning_street_town,
|
|
|
+ c_task_type: item.c_task_type
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.initLoading = false;
|
|
|
+ } else {
|
|
|
+ this.initLoading = false;
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.initLoading = false;
|
|
|
+ this.$message.error(error);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+
|
|
|
// 切换条数
|
|
|
handleSizeChange(val) {
|
|
|
- console.log(`每页 ${val} 条`);
|
|
|
+ this.paginationData.pageSize = val;
|
|
|
this.onSubmit();
|
|
|
},
|
|
|
// 切换页
|
|
|
handleCurrentChange(val) {
|
|
|
- console.log(`当前页: ${val}`);
|
|
|
this.paginationData.currentPage = val;
|
|
|
this.onSubmit();
|
|
|
},
|
|
|
// 查询事件
|
|
|
onSubmit() {
|
|
|
- console.log("submit!");
|
|
|
+ if (!this.tableInitLoading) {
|
|
|
+ this.tableInitLoading = true;
|
|
|
+ }
|
|
|
+ let params = new FormData();
|
|
|
+ params.append("columnId", "61");
|
|
|
+ params.append("pageSize", this.paginationData.pageSize);
|
|
|
+ params.append("page", this.paginationData.currentPage - 1);
|
|
|
+ let searchParam = [];
|
|
|
+ let param = {
|
|
|
+ field: "c_user_id",
|
|
|
+ searchType: "2",
|
|
|
+ content: {
|
|
|
+ value: localStorage.getItem("USER_ID")
|
|
|
+ }
|
|
|
+ };
|
|
|
+ searchParam.push(param);
|
|
|
+ if (this.formInline.taskType) {
|
|
|
+ let param1 = {
|
|
|
+ field: "c_task_type",
|
|
|
+ searchType: "1",
|
|
|
+ content: {
|
|
|
+ value: this.formInline.taskType
|
|
|
+ }
|
|
|
+ };
|
|
|
+ searchParam.push(param1);
|
|
|
+ }
|
|
|
+ if (this.formInline.associatedItems) {
|
|
|
+ let param1 = {
|
|
|
+ field: "c_associated_item_ids",
|
|
|
+ searchType: "2",
|
|
|
+ content: {
|
|
|
+ value: this.formInline.associatedItems
|
|
|
+ }
|
|
|
+ };
|
|
|
+ searchParam.push(param1);
|
|
|
+ }
|
|
|
+ if (this.formInline.auditStatus) {
|
|
|
+ params.append("states", this.formInline.auditStatus);
|
|
|
+ } else {
|
|
|
+ params.append("states", "1,2,3");
|
|
|
+ }
|
|
|
+ params.append("search", JSON.stringify(searchParam));
|
|
|
+ let sortparam = [{ field: "c_create_time", orderByType: 2 }];
|
|
|
+ params.append("orderBy", JSON.stringify(sortparam));
|
|
|
+ this.$Post(this.urlsCollection.selectContentList, params).then(
|
|
|
+ res => {
|
|
|
+ if (res.code === 200 && res.content.data.length > 0) {
|
|
|
+ this.tableData = res.content.data;
|
|
|
+ this.tableInitLoading = false;
|
|
|
+ this.paginationData.total = res.content.count;
|
|
|
+ } else {
|
|
|
+ this.tableData = [];
|
|
|
+ this.tableInitLoading = false;
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.tableData = [];
|
|
|
+ this.tableInitLoading = false;
|
|
|
+ this.$message.error(error);
|
|
|
+ }
|
|
|
+ );
|
|
|
},
|
|
|
// 查询条件重置
|
|
|
resetForm() {
|
|
@@ -233,11 +278,34 @@ export default {
|
|
|
},
|
|
|
// 当用户点击svg底座时,切换底部菜单显示隐藏状态。
|
|
|
changeShowBottomMenusStatus() {
|
|
|
- // 打开弹窗
|
|
|
- this.dialogVisible = true;
|
|
|
- if (this.$ifMenu("3", "")) {
|
|
|
- this.$emit("changeShowBottomMenusStatus", false);
|
|
|
+ // 打开弹窗
|
|
|
+ this.dialogVisible = true;
|
|
|
+ if (this.$ifMenu("3", "")) {
|
|
|
+ // 首先获取数据字典中的下拉框数据
|
|
|
+ this.selectSelectData("0", "c_task_type", "projectType");
|
|
|
+ this.selectSelectData("0", "浦东新区行政区划", "associatedItems");
|
|
|
+ // 请求所有项目数据
|
|
|
+ this.getAllPorjects();
|
|
|
+ this.onSubmit();
|
|
|
+ this.$emit("changeShowBottomMenusStatus", false);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 数据字典查询
|
|
|
+ selectSelectData(type, cName, keyName) {
|
|
|
+ let params = new FormData();
|
|
|
+ params.append("type", type);
|
|
|
+ params.append("cName", cName);
|
|
|
+ this.$Post(this.urlsCollection.selectByCNameAType, params).then(
|
|
|
+ res => {
|
|
|
+ if (res.code === 200 && res.content.length > 0) {
|
|
|
+ this.selectSelectDataMap[keyName] = res.content;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message.error(error);
|
|
|
+ console.log(error);
|
|
|
}
|
|
|
+ );
|
|
|
},
|
|
|
// 弹窗关闭询问
|
|
|
handleClose() {
|