|
|
|
@ -18,8 +18,8 @@ |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<!-- <GuipInput v-model="coverInfo.school" :client-form-flex="true" label="所属学校" width="356px" /> --> |
|
|
|
<GuipRadio :options="collegeList" v-model="coverInfo.collegeId" :client-form-flex="true" label="学院" /> |
|
|
|
<GuipInput v-if="coverInfo.collegeId == '1'" v-model="coverInfo.college" label="学院名称" :client-form-flex="true" width="356px" /> |
|
|
|
<GuipRadio :options="collegeList" v-model="coverInfo.college_id" :client-form-flex="true" label="学院" /> |
|
|
|
<GuipInput v-if="coverInfo.college_id == '1'" v-model="coverInfo.college" label="学院名称" :client-form-flex="true" width="356px" /> |
|
|
|
<GuipRadio :options="qualificationList" v-model="coverInfo.degree" label="学历" :client-form-flex="true" /> |
|
|
|
<GroupFormBtns cancelText="重置" @cancel="cancelClick('baseInfoRef')" flex="start" |
|
|
|
@confirm="submitCoverInfo" /> |
|
|
|
@ -45,20 +45,17 @@ |
|
|
|
<GroupFormBtns cancelText="重置" @cancel="cancelClick('siteForm')" flex="start" |
|
|
|
@confirm="uploadCoverTpl" /> |
|
|
|
</div> |
|
|
|
<div class="save-button column gap8" v-if="type == 'add' || editInfo.review_status == '1'"> |
|
|
|
<GuipButton type="primary" :btnstyle="{width:'144px',height:'46px'}" @click="submitFun">收录完成</GuipButton> |
|
|
|
<p class="client-warnText">信息全部填写后,请点击此按钮!</p> |
|
|
|
</div> |
|
|
|
<ReviewBtn :type="type" :status="editInfo.review_status"></ReviewBtn> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
// client_tpl_review_status |
|
|
|
import store from '@/store'; |
|
|
|
// import { mapState } from 'vuex'; |
|
|
|
import { mapState } from 'vuex'; |
|
|
|
import GuipInput from '@/components/GuipInput.vue'; |
|
|
|
import GroupFormBtns from '@/components/GroupFormBtns.vue'; |
|
|
|
import GuipRadio from '@/components/GuipRadio.vue'; |
|
|
|
import GuipButton from '@/components/GuipButton.vue'; |
|
|
|
import ReviewBtn from '@/components/clientSet/reviewBtn.vue'; |
|
|
|
// import GuipSelect from '@/components/GuipSelect.vue'; |
|
|
|
import SchoolAutoComplete from '@/components/clientSet/searchInput.vue'; // 引入公共组件 |
|
|
|
|
|
|
|
@ -69,7 +66,8 @@ export default { |
|
|
|
GuipInput, |
|
|
|
GuipRadio, |
|
|
|
GuipButton, |
|
|
|
SchoolAutoComplete |
|
|
|
SchoolAutoComplete, |
|
|
|
ReviewBtn |
|
|
|
// GuipSelect |
|
|
|
}, |
|
|
|
data() { |
|
|
|
@ -80,7 +78,8 @@ export default { |
|
|
|
qrcode_path: '' |
|
|
|
}, |
|
|
|
coverInfo: { |
|
|
|
school_name:'' |
|
|
|
school_name:'', |
|
|
|
college:'' |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
name: [ |
|
|
|
@ -106,6 +105,9 @@ export default { |
|
|
|
lastSearchKeyword:'', |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState(['client_tpl_review_status']), |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
const {id,type} = this.$route.query; |
|
|
|
if(type){ |
|
|
|
@ -114,6 +116,9 @@ export default { |
|
|
|
if(id){ |
|
|
|
this.template_id = id; |
|
|
|
} |
|
|
|
if(type == 'add'){ |
|
|
|
store.commit('SET_CLIENTTPLREVIEWSTATUS', 1); |
|
|
|
} |
|
|
|
store.commit('SET_CLIENTTEMID', this.template_id); |
|
|
|
store.commit('SET_CLIENTTEMTYPE', this.type); |
|
|
|
|
|
|
|
@ -123,7 +128,7 @@ export default { |
|
|
|
this.coverInfo = { |
|
|
|
school:editInfo.school_id, |
|
|
|
school_name:editInfo.school_name, |
|
|
|
collegeId:editInfo.college_id, |
|
|
|
college_id:editInfo.college_id, |
|
|
|
college:editInfo.college_name, |
|
|
|
degree:editInfo.degree_id, |
|
|
|
// qrcode_path:editInfo.cover_img |
|
|
|
@ -132,7 +137,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
this.getCoverInfo(); |
|
|
|
this.getStatusList() //缺学历下拉列表 |
|
|
|
this.getStatusList() |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -148,25 +153,26 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
async getCoverInfo(){ |
|
|
|
// this.$http('POST', '/supernew/ajax_get_paiban_template_list', {}, { |
|
|
|
// }).then(response => { |
|
|
|
// console.log(response,'=======999'); |
|
|
|
// this.$nextTick(() => { |
|
|
|
// if (response.status) { |
|
|
|
// this.$Message.success(response.info); |
|
|
|
// } else { |
|
|
|
// this.$Message.error(response.info); |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }).catch(error => { |
|
|
|
// console.error(error, 'error') |
|
|
|
// }) |
|
|
|
this.$http('POST', '/supernew/ajax_get_paiban_template_config', { |
|
|
|
template_id:'14' |
|
|
|
}).then(response => { |
|
|
|
console.log(response,'=======999'); |
|
|
|
this.$nextTick(() => { |
|
|
|
if (response.status) { |
|
|
|
this.$Message.success(response.info); |
|
|
|
} else { |
|
|
|
this.$Message.error(response.info); |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
getStatusList() { |
|
|
|
try { |
|
|
|
this.$http('POST', '/supernew/ajax_get_paiban_degrees', { |
|
|
|
}).then(response => { |
|
|
|
this.qualificationList = response.data |
|
|
|
this.qualificationList = response.data |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
@ -175,6 +181,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
cancelClick(formName) { |
|
|
|
this.$refs[formName].resetFields(); |
|
|
|
}, |
|
|
|
@ -240,44 +247,51 @@ export default { |
|
|
|
handleConfirmConfirm(){ |
|
|
|
let props={ |
|
|
|
school: this.coverInfo.school, |
|
|
|
college: this.coverInfo.collegeId == '1' ? this.editInfo.college_name : '-1', |
|
|
|
college: this.coverInfo.college_id == '1' ? this.editInfo.college_name : '', |
|
|
|
degree: this.coverInfo.degree, |
|
|
|
} |
|
|
|
let url = '/supernew/ajax_add_paiban_template' |
|
|
|
// let url = '/supernew/ajax_add_paiban_template' |
|
|
|
if(this.template_id){ |
|
|
|
props.template_id = this.template_id; |
|
|
|
url ='/supernew/ajax_update_paiban_template_info' |
|
|
|
// url ='/supernew/ajax_update_paiban_template_info' |
|
|
|
} |
|
|
|
if(this.coverInfo.school){ |
|
|
|
props.school = this.coverInfo.school; |
|
|
|
} |
|
|
|
try { |
|
|
|
this.$http('POST', url, { |
|
|
|
...props, |
|
|
|
}).then(response => { |
|
|
|
this.$nextTick(() => { |
|
|
|
if (response.status) { |
|
|
|
this.$Message.success(response.info); |
|
|
|
if(props.template_id){ |
|
|
|
let obj = { |
|
|
|
...this.editInfo, |
|
|
|
...props, |
|
|
|
}; |
|
|
|
localStorage.setItem('curtplInfo', JSON.stringify(obj)) |
|
|
|
} |
|
|
|
this.template_id = response.data.template_id |
|
|
|
store.commit('SET_CLIENTTEMID', this.template_id); |
|
|
|
// 用来测试哒 |
|
|
|
// localStorage.setItem('curtplInfo', JSON.stringify({...this.coverInfo,degree_id:this.coverInfo.degree})) |
|
|
|
// store.commit('SET_CLIENTTEMID', '999'); |
|
|
|
|
|
|
|
} else { |
|
|
|
this.$Message.error(response.info); |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
} catch (error) { |
|
|
|
console.error('数据加载失败:', error) |
|
|
|
} |
|
|
|
// try { |
|
|
|
// this.$http('POST', url, { |
|
|
|
// ...props, |
|
|
|
// }).then(response => { |
|
|
|
// this.$nextTick(() => { |
|
|
|
// if (response.status) { |
|
|
|
// this.$Message.success(response.info); |
|
|
|
// if(props.template_id){ |
|
|
|
// let obj = { |
|
|
|
// ...this.editInfo, |
|
|
|
// ...props, |
|
|
|
// }; |
|
|
|
// localStorage.setItem('curtplInfo', JSON.stringify(obj)) |
|
|
|
// }else{ |
|
|
|
// console.log(this.coverInfo,'coverInfo信息'); |
|
|
|
// localStorage.setItem('curtplInfo', JSON.stringify({...this.coverInfo,degree_id:this.coverInfo.degree})) |
|
|
|
// } |
|
|
|
// this.template_id = response.data.template_id |
|
|
|
// store.commit('SET_CLIENTTEMID', this.template_id); |
|
|
|
|
|
|
|
// } else { |
|
|
|
// this.$Message.error(response.info); |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }).catch(error => { |
|
|
|
// console.error(error, 'error') |
|
|
|
// }) |
|
|
|
// } catch (error) { |
|
|
|
// console.error('数据加载失败:', error) |
|
|
|
// } |
|
|
|
}, |
|
|
|
// 保存模板配置 |
|
|
|
submitFun() { |
|
|
|
|