|
@@ -44,23 +44,25 @@
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="选择疑点" prop="c_doubtful_points">
|
|
|
<el-cascader
|
|
|
- v-model="c_doubtful_pointsList"
|
|
|
+ v-model="createTaskForm.c_doubtful_points"
|
|
|
:disabled="legendTreeOptionsLoading"
|
|
|
:options="legendTreeOptions"
|
|
|
- placeholder="请选择关联任务,动态生成"
|
|
|
+ filterable
|
|
|
+ :placeholder="legendTreeOptionsLoading ? '请先选择关联任务' : ''"
|
|
|
:props="cascaderProps"
|
|
|
+ collapse-tags
|
|
|
clearable
|
|
|
></el-cascader>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="截止时间" prop="c_end_time">
|
|
|
<el-date-picker v-model="createTaskForm.c_end_time" type="date" placeholder="请选择截止日期"> </el-date-picker>
|
|
|
</el-form-item> -->
|
|
|
- <el-form-item label="任务描述" prop="c_task_description">
|
|
|
+ <el-form-item label="任务描述" prop="content">
|
|
|
<el-input
|
|
|
type="textarea"
|
|
|
:autosize="{ minRows: 4, maxRows: 6 }"
|
|
|
placeholder="请描述任务"
|
|
|
- v-model="createTaskForm.c_task_description"
|
|
|
+ v-model="createTaskForm.content"
|
|
|
width="100%"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
@@ -92,25 +94,24 @@ export default {
|
|
|
legendTreeOptionsLoading: true,
|
|
|
legendTreeOptions: [],
|
|
|
cascaderProps: {
|
|
|
- multiple: true
|
|
|
+ multiple: true,
|
|
|
+ expandTrigger: "hover"
|
|
|
},
|
|
|
defaultProps: {
|
|
|
children: "children",
|
|
|
label: "label"
|
|
|
},
|
|
|
- c_doubtful_pointsList: [],
|
|
|
// 新建任务form表单
|
|
|
createTaskForm: {
|
|
|
title: "",
|
|
|
- content: "申请任务",
|
|
|
+ content: "",
|
|
|
c_task_id: "", // 任务id
|
|
|
c_task_name: "", // 任务名称
|
|
|
- c_associated_item_ids: "", // 关联项目ids
|
|
|
+ c_associated_item_ids: "", // 关联任务ids
|
|
|
c_create_time: "", // 当前时间时间戳
|
|
|
- c_task_description: "", // 任务描述
|
|
|
c_user_id: "", // 用户id
|
|
|
c_area_code: "", // 所属街道行政区划编码
|
|
|
- c_doubtful_points: "", // 疑点信息
|
|
|
+ c_doubtful_points: [], // 疑点信息
|
|
|
c_end_time: "", // 截止时间
|
|
|
c_task_type: "" // 任务类型(所有图层中的某图层栏目名)
|
|
|
},
|
|
@@ -134,7 +135,12 @@ export default {
|
|
|
},
|
|
|
c_associated_item_ids: {
|
|
|
required: true,
|
|
|
- message: "请选择关联项目",
|
|
|
+ message: "请选择关联任务",
|
|
|
+ trigger: "change"
|
|
|
+ },
|
|
|
+ c_doubtful_points: {
|
|
|
+ required: true,
|
|
|
+ message: "请选择疑点信息",
|
|
|
trigger: "change"
|
|
|
},
|
|
|
c_area_code: {
|
|
@@ -147,7 +153,7 @@ export default {
|
|
|
message: "请选择结束时间",
|
|
|
trigger: "change"
|
|
|
},
|
|
|
- c_task_description: [
|
|
|
+ content: [
|
|
|
{ required: false, message: "请输入任务描述", trigger: "blur" },
|
|
|
{
|
|
|
min: 1,
|
|
@@ -163,6 +169,8 @@ export default {
|
|
|
associatedItems: [],
|
|
|
associatedItemsOptions: []
|
|
|
},
|
|
|
+ // 关联任务暂存《id,T》
|
|
|
+ associatedItemsOptionsDataIdByItem: {},
|
|
|
streetOfOwnership_str: "",
|
|
|
taskType_str: ""
|
|
|
};
|
|
@@ -171,7 +179,7 @@ export default {
|
|
|
// 首先获取数据字典中的下拉框数据
|
|
|
this.selectSelectData("0", "c_task_type", "projectType");
|
|
|
this.selectSelectData("0", "浦东新区行政区划", "associatedItems");
|
|
|
- // 请求所有项目数据
|
|
|
+ // 请求所有任务数据
|
|
|
this.getAllPorjects();
|
|
|
},
|
|
|
mounted() {
|
|
@@ -180,7 +188,6 @@ export default {
|
|
|
this.$bus.$on("putPhone", () => {
|
|
|
this.changeShowBottomMenusStatus();
|
|
|
});
|
|
|
- this.createTaskForm.c_task_name = "任务-" + this.$dayjs().format("YYYYMMDDHHmmss");
|
|
|
},
|
|
|
destroy() {
|
|
|
// 当容器销毁时,需要停止监听该事件
|
|
@@ -188,9 +195,9 @@ export default {
|
|
|
},
|
|
|
props: [],
|
|
|
methods: {
|
|
|
- // 用户切换关联项目
|
|
|
+ // 用户切换关联任务
|
|
|
changePorject(value) {
|
|
|
- // 根据项目id得到所属街道和项目类型
|
|
|
+ // 根据任务id得到所属街道和任务类型
|
|
|
this.selectSelectDataMap.associatedItemsOptions.forEach(item => {
|
|
|
if (item.value == value) {
|
|
|
this.createTaskForm.c_area_code = item.c_area_code;
|
|
@@ -209,7 +216,7 @@ export default {
|
|
|
this.c_area_code_str = item.name;
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+ this.createTaskForm.c_doubtful_points = [];
|
|
|
this.$bus.$emit("openMyTask", [this.createTaskForm.c_task_type, this.createTaskForm.c_area_code]);
|
|
|
},
|
|
|
// 数据字典查询
|
|
@@ -229,7 +236,7 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
- // 请求获取所有关联项目数据
|
|
|
+ // 请求获取所有关联任务数据
|
|
|
getAllPorjects() {
|
|
|
if (!this.initLoading) {
|
|
|
this.initLoading = true;
|
|
@@ -246,6 +253,7 @@ export default {
|
|
|
if (res.code === 200 && res.content.data.length > 0) {
|
|
|
let associatedItemsOptionsData = res.content.data;
|
|
|
associatedItemsOptionsData.filter(item => {
|
|
|
+ this.associatedItemsOptionsDataIdByItem[item.id] = item;
|
|
|
this.selectSelectDataMap.associatedItemsOptions.push({
|
|
|
label: item.c_task_name,
|
|
|
value: item.id,
|
|
@@ -279,6 +287,7 @@ export default {
|
|
|
},
|
|
|
// 当用户点击svg底座时,切换底部菜单显示隐藏状态。
|
|
|
changeShowBottomMenusStatus() {
|
|
|
+ this.createTaskForm.c_task_name = "任务-" + this.$dayjs().format("YYYYMMDDHHmmss");
|
|
|
// 打开弹窗
|
|
|
this.dialogVisible = true;
|
|
|
this.$emit("changeShowBottomMenusStatus", false);
|
|
@@ -307,10 +316,41 @@ export default {
|
|
|
// 表单校验
|
|
|
this.$refs[formName].validate(valid => {
|
|
|
if (valid) {
|
|
|
- if (this.c_doubtful_pointsList.length > 0) {
|
|
|
- this.c_doubtful_pointsList.forEach(item => {
|
|
|
+ if (this.createTaskForm.c_doubtful_points.length > 0) {
|
|
|
+ let changeMyTaskItem = this.associatedItemsOptionsDataIdByItem[this.createTaskForm.c_associated_item_ids];
|
|
|
+ let content_ = {
|
|
|
+ id: changeMyTaskItem.id,
|
|
|
+ title: changeMyTaskItem.title,
|
|
|
+ content: changeMyTaskItem.content
|
|
|
+ };
|
|
|
+ for (let key in changeMyTaskItem) {
|
|
|
+ if (key.indexOf("c_") == 0) {
|
|
|
+ if (typeof changeMyTaskItem[key] == "object") {
|
|
|
+ content_[key] = JSON.stringify(changeMyTaskItem[key]);
|
|
|
+ } else {
|
|
|
+ content_[key] = changeMyTaskItem[key];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ content_["c_app_tag"] = true;
|
|
|
+ content_["c_app_state"] = 0;
|
|
|
+ content_["c_app_title"] = this.createTaskForm.c_task_name;
|
|
|
+ content_["c_app_content"] = this.createTaskForm.content;
|
|
|
+ // 修改当前模型图层数据,并重新进行叠置
|
|
|
+ let modifyParams = new FormData();
|
|
|
+ modifyParams = {
|
|
|
+ columnId: changeMyTaskItem.column_id,
|
|
|
+ modelId: changeMyTaskItem.model_id,
|
|
|
+ content: JSON.stringify(content_)
|
|
|
+ };
|
|
|
+ this.$Post(this.urlsCollection.updateContent, modifyParams).then(res => {
|
|
|
+ if (res.code !== 200) {
|
|
|
+ this.$message.error("任务修改失败!请联系开发人员修复!");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.createTaskForm.c_doubtful_points.forEach(item => {
|
|
|
this.createTaskForm.c_doubtful_points = item[1];
|
|
|
- this.createTaskForm.c_task_id = this.$CryptoJS.buildGuid();
|
|
|
+ this.createTaskForm.c_task_id = this.createTaskForm.c_associated_item_ids;
|
|
|
this.createTaskForm.c_user_id = localStorage.getItem("USER_ID");
|
|
|
this.createTaskForm.c_create_time = parseInt(new Date().getTime() / 1000) * 1000;
|
|
|
this.createTaskForm.title = this.createTaskForm.c_task_name;
|
|
@@ -375,13 +415,13 @@ export default {
|
|
|
let childrens = res.content.data.map(item => {
|
|
|
if (item.c_content) {
|
|
|
let conetentJson = JSON.parse(item.c_content);
|
|
|
- // console.log(conetentJson.id, conetentJson.properties["图斑编号"]);
|
|
|
return {
|
|
|
label: conetentJson.id,
|
|
|
value: item.c_content
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
this.legendTreeOptions.push({
|
|
|
value: columnId,
|
|
|
label: label,
|