|
@@ -9,23 +9,6 @@
|
|
</template>
|
|
</template>
|
|
<!-- app-任务搜索条件 -->
|
|
<!-- app-任务搜索条件 -->
|
|
<el-form :inline="true" ref="myTaskForm" :model="formInline">
|
|
<el-form :inline="true" ref="myTaskForm" :model="formInline">
|
|
- <el-form-item label="任务类型">
|
|
|
|
- <el-select size="mini" 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="关联项目" 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-form-item label="已读状态">
|
|
<el-select size="mini" v-model="formInline.auditStatus" placeholder="已读状态" clearable>
|
|
<el-select size="mini" v-model="formInline.auditStatus" placeholder="已读状态" clearable>
|
|
<el-option label="全部" value="-1"></el-option>
|
|
<el-option label="全部" value="-1"></el-option>
|
|
@@ -43,37 +26,21 @@
|
|
<!-- item-tab -->
|
|
<!-- item-tab -->
|
|
<el-tab-pane
|
|
<el-tab-pane
|
|
v-for="item in tableData"
|
|
v-for="item in tableData"
|
|
- :key="item.id"
|
|
|
|
- :label="item.c_app_title"
|
|
|
|
- :name="item.id"
|
|
|
|
|
|
+ :key="item.title"
|
|
|
|
+ :label="item.title"
|
|
|
|
+ :name="item.title"
|
|
v-loading="tableInitLoading"
|
|
v-loading="tableInitLoading"
|
|
:lazy="true"
|
|
:lazy="true"
|
|
>
|
|
>
|
|
<!-- 描述列表 -->
|
|
<!-- 描述列表 -->
|
|
<el-descriptions class="margin-top" :column="3" size="small">
|
|
<el-descriptions class="margin-top" :column="3" size="small">
|
|
- <el-descriptions-item>
|
|
|
|
- <template slot="label">
|
|
|
|
- <i class="el-icon-s-opportunity"></i>
|
|
|
|
- 任务类型
|
|
|
|
- </template>
|
|
|
|
- <el-tag size="small">
|
|
|
|
- {{ getSelectByIndex("projectType", item.c_task_type) }}
|
|
|
|
- </el-tag>
|
|
|
|
- </el-descriptions-item>
|
|
|
|
- <el-descriptions-item>
|
|
|
|
- <template slot="label">
|
|
|
|
- <i class="el-icon-location-outline"></i>
|
|
|
|
- 所属街镇
|
|
|
|
- </template>
|
|
|
|
- {{ getSelectByIndex("associatedItems", item.c_area_code) }}
|
|
|
|
- </el-descriptions-item>
|
|
|
|
<el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">
|
|
<template slot="label">
|
|
<i class="el-icon-s-management"></i>
|
|
<i class="el-icon-s-management"></i>
|
|
已读状态
|
|
已读状态
|
|
</template>
|
|
</template>
|
|
- <el-tag size="small" :type="item.c_app_state == 1 ? 'success' : 'info'" disable-transitions>{{
|
|
|
|
- item.c_app_state == 1 ? "已读" : "未读"
|
|
|
|
|
|
+ <el-tag size="small" :type="item.state == 1 ? 'success' : 'info'" disable-transitions>{{
|
|
|
|
+ item.state == 1 ? "已读" : "未读"
|
|
}}</el-tag>
|
|
}}</el-tag>
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<el-descriptions-item>
|
|
@@ -81,20 +48,20 @@
|
|
<i class="el-icon-time"></i>
|
|
<i class="el-icon-time"></i>
|
|
发布时间
|
|
发布时间
|
|
</template>
|
|
</template>
|
|
- {{ $dayjs(item.c_create_time).format("YYYY-MM-DD HH:mm:ss") }}
|
|
|
|
|
|
+ {{ $dayjs(item.create_time).format("YYYY-MM-DD HH:mm:ss") }}
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">
|
|
<template slot="label">
|
|
<i class="el-icon-tickets"></i>
|
|
<i class="el-icon-tickets"></i>
|
|
任务描述
|
|
任务描述
|
|
</template>
|
|
</template>
|
|
- {{ item.c_app_content }}
|
|
|
|
|
|
+ {{ item.content }}
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
<!-- tableBox -->
|
|
<!-- tableBox -->
|
|
<el-table
|
|
<el-table
|
|
v-if="testVIfState"
|
|
v-if="testVIfState"
|
|
- :data="tableDataList[item.id]"
|
|
|
|
|
|
+ :data="tableDataList[item.title]"
|
|
height="30vh"
|
|
height="30vh"
|
|
stripe
|
|
stripe
|
|
v-loading="tableInitInfoLoading"
|
|
v-loading="tableInitInfoLoading"
|
|
@@ -117,19 +84,34 @@
|
|
{{ scope.row.pointsJson.properties["图斑编号"] }}
|
|
{{ scope.row.pointsJson.properties["图斑编号"] }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="pointsJson.properties.state" label="核查图片">
|
|
|
|
|
|
+ <el-table-column prop="pointsJson.properties.state" label="核查图片" width="220px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <!-- <span v-for="fileName in scope.row.pointsJson.properties.fileList" :key="fileName">
|
|
|
|
- {{ fileName }}
|
|
|
|
|
|
+ <!-- <span>{{ scope.row.pointsJson.fileUrlList ? scope.row.pointsJson.fileUrlList : "null" }}</span> -->
|
|
|
|
+ <!-- <span
|
|
|
|
+ v-for="(fileName, index) in scope.row.pointsJson.fileUrlList"
|
|
|
|
+ :key="scope.row.id + 'fileList' + index"
|
|
|
|
+ :index="index"
|
|
|
|
+ >
|
|
|
|
+ {{ index }}
|
|
</span> -->
|
|
</span> -->
|
|
- <el-image
|
|
|
|
- v-for="fileUrl in scope.row.pointsJson.properties.fileList"
|
|
|
|
|
|
+ <!-- <el-image
|
|
|
|
+ v-for="fileUrl in scope.row.pointsJson.fileUrlList"
|
|
:key="fileUrl"
|
|
:key="fileUrl"
|
|
style="width: 100px; height: 100px"
|
|
style="width: 100px; height: 100px"
|
|
:src="fileUrl"
|
|
:src="fileUrl"
|
|
- :preview-src-list="srcList(scope.row.pointsJson.properties.fileList)"
|
|
|
|
|
|
+ fit="cover"
|
|
|
|
+ :preview-src-list="srcList(scope.row.pointsJson.fileUrlList)"
|
|
|
|
+ > -->
|
|
|
|
+ <el-image
|
|
|
|
+ v-if="scope.row.pointsJson.fileUrlList"
|
|
|
|
+ style="width: 100px; height: 100px"
|
|
|
|
+ fit="cover"
|
|
|
|
+ :src="srcList(scope.row.pointsJson.fileUrlList)[0]"
|
|
|
|
+ :preview-src-list="srcList(scope.row.pointsJson.fileUrlList)"
|
|
>
|
|
>
|
|
|
|
+ <!-- :preview-src-list="srcList(scope.row.pointsJson.fileUrlList)" -->
|
|
</el-image>
|
|
</el-image>
|
|
|
|
+ <span v-if="scope.row.pointsJson.fileUrlList && srcList(scope.row.pointsJson.fileUrlList).length > 1"> …… </span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="pointsJson.properties.state" label="核查状态">
|
|
<el-table-column prop="pointsJson.properties.state" label="核查状态">
|
|
@@ -149,8 +131,8 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<Pagination
|
|
<Pagination
|
|
- v-if="tableDataList[item.id] && tableDataList[item.id].paginationData"
|
|
|
|
- :paginationData="tableDataList[item.id].paginationData"
|
|
|
|
|
|
+ v-if="tableDataList[item.title] && tableDataList[item.title].paginationData"
|
|
|
|
+ :paginationData="tableDataList[item.title].paginationData"
|
|
/>
|
|
/>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
@@ -240,6 +222,39 @@ export default {
|
|
},
|
|
},
|
|
props: [],
|
|
props: [],
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getAppTaskImage(title) {
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
+ let params = new FormData();
|
|
|
|
+ params.append("columnId", 1793);
|
|
|
|
+ params.append("states", "0,1,2");
|
|
|
|
+ params.append("pageSize", 10);
|
|
|
|
+ params.append("page", 0);
|
|
|
|
+ let searchParam = [];
|
|
|
|
+ let paramItem = {
|
|
|
|
+ field: "title",
|
|
|
|
+ searchType: "1",
|
|
|
|
+ content: {
|
|
|
|
+ value: title
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ searchParam.push(paramItem);
|
|
|
|
+ if (searchParam.length > 0) {
|
|
|
|
+ params.append("search", JSON.stringify(searchParam));
|
|
|
|
+ }
|
|
|
|
+ this.$Post(this.urlsCollection.selectContentList, params).then(
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code === 200 && res.content.data.length > 0) {
|
|
|
|
+ resolve(res.content.data[0].c_file_base64);
|
|
|
|
+ } else {
|
|
|
|
+ reject("图片请求失败");
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ reject(error);
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ });
|
|
|
|
+ },
|
|
ToView(val) {
|
|
ToView(val) {
|
|
if (val.state == 1) {
|
|
if (val.state == 1) {
|
|
// 已核查
|
|
// 已核查
|
|
@@ -251,7 +266,7 @@ export default {
|
|
srcList(fileList) {
|
|
srcList(fileList) {
|
|
let fileSrcList = [];
|
|
let fileSrcList = [];
|
|
for (let fileName in fileList) {
|
|
for (let fileName in fileList) {
|
|
- Object.assign(fileSrcList, [fileList[fileName]]);
|
|
|
|
|
|
+ fileSrcList.push(fileList[fileName]);
|
|
}
|
|
}
|
|
return fileSrcList;
|
|
return fileSrcList;
|
|
},
|
|
},
|
|
@@ -329,7 +344,7 @@ export default {
|
|
if (!this.tableInitLoading) {
|
|
if (!this.tableInitLoading) {
|
|
this.tableInitLoading = true;
|
|
this.tableInitLoading = true;
|
|
let params = new FormData();
|
|
let params = new FormData();
|
|
- params.append("columnId", "48");
|
|
|
|
|
|
+ params.append("columnId", "1794");
|
|
params.append("pageSize", this.paginationData.pageSize);
|
|
params.append("pageSize", this.paginationData.pageSize);
|
|
params.append("page", this.paginationData.currentPage - 1);
|
|
params.append("page", this.paginationData.currentPage - 1);
|
|
let searchParam = [];
|
|
let searchParam = [];
|
|
@@ -361,14 +376,6 @@ export default {
|
|
};
|
|
};
|
|
searchParam.push(param1);
|
|
searchParam.push(param1);
|
|
}
|
|
}
|
|
- let param1 = {
|
|
|
|
- field: "c_app_tag",
|
|
|
|
- searchType: "1",
|
|
|
|
- content: {
|
|
|
|
- value: true
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- searchParam.push(param1);
|
|
|
|
if (this.formInline.auditStatus && this.formInline.auditStatus >= 0) {
|
|
if (this.formInline.auditStatus && this.formInline.auditStatus >= 0) {
|
|
let param2 = {
|
|
let param2 = {
|
|
field: "c_app_state",
|
|
field: "c_app_state",
|
|
@@ -381,7 +388,7 @@ export default {
|
|
}
|
|
}
|
|
params.append("states", "0,1,2,3");
|
|
params.append("states", "0,1,2,3");
|
|
params.append("search", JSON.stringify(searchParam));
|
|
params.append("search", JSON.stringify(searchParam));
|
|
- let sortparam = [{ field: "c_create_time", orderByType: 2 }];
|
|
|
|
|
|
+ let sortparam = [{ field: "create_time", orderByType: 2 }];
|
|
params.append("orderBy", JSON.stringify(sortparam));
|
|
params.append("orderBy", JSON.stringify(sortparam));
|
|
this.$Post(this.urlsCollection.selectContentList, params).then(
|
|
this.$Post(this.urlsCollection.selectContentList, params).then(
|
|
res => {
|
|
res => {
|
|
@@ -411,14 +418,14 @@ export default {
|
|
this.testVIfState = false;
|
|
this.testVIfState = false;
|
|
let resDataNum = 0;
|
|
let resDataNum = 0;
|
|
this.tableData.forEach(item => {
|
|
this.tableData.forEach(item => {
|
|
- let cTaskId = item.id;
|
|
|
|
|
|
+ let cTaskId = item.c_task_id;
|
|
let paginationData = this.paginationDataInitValue;
|
|
let paginationData = this.paginationDataInitValue;
|
|
if (
|
|
if (
|
|
this.tableDataList &&
|
|
this.tableDataList &&
|
|
- this.tableDataList[cTaskId] != undefined &&
|
|
|
|
- this.tableDataList[cTaskId].paginationData != undefined
|
|
|
|
|
|
+ this.tableDataList[item.title] != undefined &&
|
|
|
|
+ this.tableDataList[item.title].paginationData != undefined
|
|
) {
|
|
) {
|
|
- paginationData = this.tableDataList[cTaskId].paginationData;
|
|
|
|
|
|
+ paginationData = this.tableDataList[item.title].paginationData;
|
|
}
|
|
}
|
|
let params = new FormData();
|
|
let params = new FormData();
|
|
params.append("columnId", "1537");
|
|
params.append("columnId", "1537");
|
|
@@ -442,6 +449,14 @@ export default {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
searchParam.push(param1);
|
|
searchParam.push(param1);
|
|
|
|
+ let param2 = {
|
|
|
|
+ field: "title",
|
|
|
|
+ searchType: "1",
|
|
|
|
+ content: {
|
|
|
|
+ value: item.title
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ searchParam.push(param2);
|
|
params.append("states", "0,1,2,3");
|
|
params.append("states", "0,1,2,3");
|
|
params.append("search", JSON.stringify(searchParam));
|
|
params.append("search", JSON.stringify(searchParam));
|
|
let sortparam = [{ field: "c_create_time", orderByType: 2 }];
|
|
let sortparam = [{ field: "c_create_time", orderByType: 2 }];
|
|
@@ -454,30 +469,48 @@ export default {
|
|
resData.forEach(resItem => {
|
|
resData.forEach(resItem => {
|
|
if (resItem.c_doubtful_points) {
|
|
if (resItem.c_doubtful_points) {
|
|
resItem.pointsJson = JSON.parse(resItem.c_doubtful_points);
|
|
resItem.pointsJson = JSON.parse(resItem.c_doubtful_points);
|
|
|
|
+ // 判断是否存在图片并保存到新的对象中;
|
|
|
|
+ let fileItemList = resItem.pointsJson.properties.fileList;
|
|
|
|
+ if (fileItemList != undefined) {
|
|
|
|
+ let fileUrlList = {};
|
|
|
|
+ for (let fileItem in fileItemList) {
|
|
|
|
+ this.getAppTaskImage(fileItemList[fileItem]).then(
|
|
|
|
+ fileUrl => {
|
|
|
|
+ fileUrlList[fileItemList[fileItem]] = fileUrl;
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ console.log(error);
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ resItem.pointsJson.fileUrlList = fileUrlList;
|
|
|
|
+ }
|
|
|
|
+ // 判断是否存在图片并保存到新的对象中;end
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- this.tableDataList[cTaskId] = resData;
|
|
|
|
- if (!this.tableDataList[cTaskId].paginationData) {
|
|
|
|
- this.tableDataList[cTaskId].paginationData = Object.assign({}, this.paginationDataInitValue);
|
|
|
|
|
|
+ this.tableDataList[item.title] = resData;
|
|
|
|
+ if (!this.tableDataList[item.title].paginationData) {
|
|
|
|
+ this.tableDataList[item.title].paginationData = Object.assign({}, this.paginationDataInitValue);
|
|
}
|
|
}
|
|
- this.tableDataList[cTaskId].paginationData.total = res.content.count;
|
|
|
|
|
|
+ this.tableDataList[item.title].paginationData.total = res.content.count;
|
|
resDataNum++;
|
|
resDataNum++;
|
|
if (resDataNum == this.tableData.length) {
|
|
if (resDataNum == this.tableData.length) {
|
|
// 所有数据加载完成后直接显示
|
|
// 所有数据加载完成后直接显示
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- this.tabsValue = this.tableData[0].id;
|
|
|
|
|
|
+ console.log(this.tableDataList);
|
|
|
|
+ this.tabsValue = this.tableData[0].title;
|
|
this.testVIfState = true;
|
|
this.testVIfState = true;
|
|
}, 100);
|
|
}, 100);
|
|
}
|
|
}
|
|
this.tableInitInfoLoading = false;
|
|
this.tableInitInfoLoading = false;
|
|
} else {
|
|
} else {
|
|
- this.tableDataList[cTaskId] = [];
|
|
|
|
|
|
+ this.tableDataList[item.title] = [];
|
|
this.$message.error(res.message);
|
|
this.$message.error(res.message);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
- this.tableDataList[cTaskId] = [];
|
|
|
|
|
|
+ this.tableDataList[item.title] = [];
|
|
this.$message.error(error);
|
|
this.$message.error(error);
|
|
}
|
|
}
|
|
);
|
|
);
|