|
@@ -29,11 +29,12 @@
|
|
|
<!-- <van-icon v-if="index>0&&canEdit" class="form_del" name="delete" @click="delPro(index)" /> -->
|
|
|
|
|
|
<van-cell-group :title="'项目' + (index+1)">
|
|
|
- <van-field readonly name="projectId" clickable :value="item.projectName" label="投入项目" placeholder="请选择投入项目" @click="clickPicker(index)"
|
|
|
- :rules="[{ required: true, message: '请选择投入项目' }]"/>
|
|
|
+ <!-- <div>请选择投入项目</div> -->
|
|
|
+ <van-field readonly name="projectId" clickable :value="item.projectName" label="投入项目" placeholder="请选择投入项目" @click="clickPicker(index, item)"
|
|
|
+ :rules="[{ required: true, message: '请选择项目' }]" /><!--
|
|
|
<van-popup v-model="showPickerProject" position="bottom">
|
|
|
<van-picker show-toolbar :columns="project" value-key="projectName" @confirm="choseProject" @cancel="showPickerProject = false" />
|
|
|
- </van-popup>
|
|
|
+ </van-popup> -->
|
|
|
<!-- 相关维度 -->
|
|
|
<van-field :value="item.weiduName" v-if="item.projectId && user.timeType.customDegreeActive == 1" readonly name="id" clickable :label="user.timeType.customDegreeName" placeholder="请选择" @click="clickPickers(index)"/>
|
|
|
<van-popup v-model="showPickerProjects" position="bottom">
|
|
@@ -681,6 +682,12 @@
|
|
|
toast.clear();
|
|
|
this.$toast.fail('获取失败:'+res.msg);
|
|
|
}
|
|
|
+ if(localStorage.getItem("formVal")) {
|
|
|
+ console.log('触发了')
|
|
|
+ var obj = localStorage.getItem("formVal")
|
|
|
+ this.form = JSON.parse(obj)
|
|
|
+ localStorage.removeItem('formVal')
|
|
|
+ }
|
|
|
}).catch(err=> {toast.clear();});
|
|
|
},
|
|
|
|
|
@@ -693,20 +700,35 @@
|
|
|
},
|
|
|
|
|
|
// 选择项目
|
|
|
- clickPicker(i) {
|
|
|
- if (!this.canEdit) return;
|
|
|
- this.clickIndex = i;
|
|
|
- this.showPickerProject = true;
|
|
|
+ clickPicker(i, item) {
|
|
|
+ // if (!this.canEdit) return;
|
|
|
+ // this.clickIndex = i;
|
|
|
+ // this.showPickerProject = true;
|
|
|
+ console.log(i, item, this.form)
|
|
|
+ this.$router.push({
|
|
|
+ path: '/search',
|
|
|
+ query: {
|
|
|
+ // from: JSON.stringify(this.form)
|
|
|
+ from: this.form,
|
|
|
+ idx: i
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
clickPickers(i) {
|
|
|
if (!this.canEdit) return;
|
|
|
this.clickIndex = i;
|
|
|
this.showPickerProjects = true;
|
|
|
+ var proId = this.form.domains[this.clickIndex].projectId
|
|
|
+ console.log(proId, 990990)
|
|
|
+ this.dimension(proId)
|
|
|
},
|
|
|
//选择任务
|
|
|
clickPickerTask(i) {
|
|
|
+ console.log(1234567)
|
|
|
if (!this.canEdit) return;
|
|
|
this.clickIndex = i;
|
|
|
+ var proId = this.form.domains[this.clickIndex].projectId
|
|
|
+ this.getTaskList(proId)
|
|
|
this.showPickerTask = true;
|
|
|
},
|
|
|
choseTask(value, index) {
|
|
@@ -740,7 +762,6 @@
|
|
|
.then(res => {
|
|
|
if(res.code == "ok") {
|
|
|
this.form.domains[this.clickIndex].professionProgress = res.data;
|
|
|
-
|
|
|
this.$forceUpdate();
|
|
|
} else {
|
|
|
this.$toast.fail('获取失败');
|
|
@@ -1067,6 +1088,7 @@
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
+ console.log(localStorage.getItem("formVal"))
|
|
|
var ua = navigator.userAgent.toLowerCase();
|
|
|
this.isIOSystem = this.isIOS();
|
|
|
if (ua.indexOf("wxwork") > 0) {
|
|
@@ -1087,6 +1109,15 @@
|
|
|
if (this.isCorpWX) {
|
|
|
this.initWxConfig();
|
|
|
}
|
|
|
+
|
|
|
+ // if(localStorage.getItem("formVal")) {
|
|
|
+ // var obj = localStorage.getItem("formVal")
|
|
|
+ // this.form = JSON.parse(obj)
|
|
|
+ // localStorage.removeItem('formVal')
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ beforeDestroy() {
|
|
|
+ localStorage.removeItem('formVal')
|
|
|
}
|
|
|
};
|
|
|
</script>
|