+ placeholder="请填写" :client-form-flex="true" width="127px" unit="磅" />
+ placeholder="请填写" :client-form-flex="true" width="127px" unit="磅" />
({
- label: alignments[key],
- value: key
- })),'=00000');
+ // console.log(Object.keys(alignments).map(key => ({
+ // label: alignments[key],
+ // value: key
+ // })),'=00000');
return Object.keys(alignments).map(key => ({
label: alignments[key],
value: key
@@ -463,7 +466,7 @@ export default {
* 提交按钮点击
*/
submitDoctorBaseInfo() {
- console.log(this.getFormData(),'====--000');
+ // console.log(this.getFormData(),'====--000');
this.$emit('submit', this.getFormData());
},
@@ -471,8 +474,10 @@ export default {
* 内部重置方法
*/
internalCancel() {
+ // console.log(this.targetOriginalData,'====99888');
+ // this.client_tpl_type === 'edit' add 保存完后也会存有数据 根据type判定不合理
// 如果是编辑状态且有存储的目标数据,恢复目标数据
- if (this.client_tpl_type === 'edit' && this.targetOriginalData) {
+ if (this.targetOriginalData) {
// 只恢复从 initData 中提取的那部分数据
this.restoreTargetOriginalData();
} else {
diff --git a/src/components/clientSet/reviewBtn.vue b/src/components/clientSet/reviewBtn.vue
index 18c8a6f..594dc6c 100644
--- a/src/components/clientSet/reviewBtn.vue
+++ b/src/components/clientSet/reviewBtn.vue
@@ -30,7 +30,6 @@ export default {
},
methods:{
submitFun(){
- // this.$emit('submit')
// 收录完成
try {
this.$http('POST', '/supernew/ajax_update_paiban_template_review_status', {
diff --git a/src/store/index.js b/src/store/index.js
index 2f3a69a..5d22456 100755
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -855,7 +855,7 @@ export default new Vuex.Store({
async fetchClientConfig({ commit,state },{id=''}) {
try {
Vue.prototype.$http('POST', '/supernew/ajax_get_paiban_template_config', {
- template_id:id || state.client_tpl_id
+ template_id:id || state.client_tpl_id || localStorage.getItem('template_id') || ''
}).then(response => {
commit('SET_CLIENT_TPL_CONFIG', {
...response.data,
diff --git a/src/views/super/clientSet/coverInfoPage.vue b/src/views/super/clientSet/coverInfoPage.vue
index 9182c09..ca48490 100644
--- a/src/views/super/clientSet/coverInfoPage.vue
+++ b/src/views/super/clientSet/coverInfoPage.vue
@@ -134,25 +134,26 @@ export default {
}
if(id){
this.template_id = id;
+ store.commit('SET_CLIENTTEMID', this.template_id);
}
if(type == 'add'){
store.commit('SET_CLIENTTPLREVIEWSTATUS', 1);
}
- store.commit('SET_CLIENTTEMID', this.template_id);
store.commit('SET_CLIENTTEMTYPE', this.type);
const editInfo = JSON.parse(localStorage.getItem('curtplInfo')) || '';
if(editInfo){
this.editInfo = JSON.parse(JSON.stringify(editInfo));
this.coverInfo = {
- school:editInfo.school_id,
+ school:editInfo.school_id || editInfo.school ,
school_name:editInfo.school_name,
college_id:editInfo.college_name == '-1'? '-1' :'1',
- college:editInfo.college_name,
+ college:editInfo.college_name == '-1' ? '' :editInfo.college_name,
degree:editInfo.degree_id,
// qrcode_path:editInfo.cover_img
}
this.template_id = editInfo.id;
+ console.log(this.coverInfo,'zhixingle---这里');
}
this.getStatusList()
@@ -274,18 +275,19 @@ export default {
// 提交基本信息
handleConfirmConfirm(){
let props={
- school: this.coverInfo.school,
+ school: this.coverInfo.school || this.client_tpl_config.school_id,
college: this.coverInfo.college_id == '1' ? this.coverInfo.college : '',
degree: this.coverInfo.degree,
}
let url = '/supernew/ajax_add_paiban_template'
- if(this.template_id){
- props.template_id = this.template_id;
+ if(this.template_id || this.client_tpl_config.school_id){
+ props.template_id = this.template_id || localStorage.getItem('template_id');
url ='/supernew/ajax_update_paiban_template_info'
}
if(this.coverInfo.school){
props.school = this.coverInfo.school;
}
+ console.log(url,this.coverInfo,this.client_tpl_config,'000--====000');
// 用来测试哒
// localStorage.setItem('curtplInfo', JSON.stringify({...this.coverInfo,degree_id:this.coverInfo.degree}))
// store.commit('SET_CLIENTTEMID', '999');
@@ -310,13 +312,15 @@ export default {
}else{
console.log(this.coverInfo,'coverInfo信息');
localStorage.setItem('curtplInfo', JSON.stringify({...this.coverInfo,
+ id:response.data.template_id,
college_name:this.coverInfo.college_id == '1' ? this.coverInfo.college : '-1',
school_name:this.coverInfo.school_name,
degree_id:this.coverInfo.degree}))
this.template_id = response.data.template_id
}
-
- localStorage.setItem('template_id',this.template_id)
+ if(!localStorage.getItem('template_id')){
+ localStorage.setItem('template_id',this.template_id)
+ }
store.dispatch('fetchClientConfig',{id:this.template_id});
store.commit('SET_CLIENTTEMID', this.template_id);
@@ -343,6 +347,10 @@ export default {