|
|
|
@ -149,23 +149,10 @@
|
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-form-item label="资源类型选择"> |
|
|
|
|
<el-select v-model="selectResourceList" multiple placeholder="请选择" @change="changeResourceType"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in resourceTypeList" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item.id"> |
|
|
|
|
{{item.name}} |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
|
|
|
|
|
<span class="demonstration">资源类型选择</span> |
|
|
|
|
<el-cascader :options="twoList" :props="props" clearable></el-cascader> |
|
|
|
|
<el-form-item label="资源选择"> |
|
|
|
|
<el-cascader :options="twoList" :props="props" clearable v-model="form.resources"></el-cascader> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="任务图片"> |
|
|
|
@ -441,6 +428,10 @@ export default {
|
|
|
|
|
//资源转json |
|
|
|
|
this.form.resources = JSON.stringify(this.selectResourceList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(this.form); |
|
|
|
|
console.log(1111,this.form.resources); |
|
|
|
|
|
|
|
|
|
//图片转json |
|
|
|
|
let im = this.form.images; |
|
|
|
|
this.form.images = JSON.stringify(""); |
|
|
|
@ -496,21 +487,17 @@ export default {
|
|
|
|
|
}).catch(() => {}); |
|
|
|
|
}, |
|
|
|
|
twoRescoure(){ |
|
|
|
|
console.log("vvvvvvvvvv"); |
|
|
|
|
console.log(this.resourceTypeList); |
|
|
|
|
console.log(this.resourceList); |
|
|
|
|
|
|
|
|
|
let arr = []; |
|
|
|
|
|
|
|
|
|
let firstList = []; |
|
|
|
|
this.resourceTypeList.forEach((type) =>{ |
|
|
|
|
arr.push([value= type.id, label = type.name]); |
|
|
|
|
let secondList = []; |
|
|
|
|
this.resourceList.forEach((res)=>{ |
|
|
|
|
if(res.resourceType == type.id){ |
|
|
|
|
secondList.push({value: res.id, label:res.name}); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
firstList.push({value: type.id, label : type.name, children: secondList}); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
console.log(6666666666); |
|
|
|
|
console.log(arr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.twoList = firstList; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|