Browse Source

模板接口对接

clientSet-zq-1128
zq 3 days ago
parent
commit
8df41471b4
  1. 60
      src/views/super/clientSet/coverInfoPage.vue
  2. 37
      src/views/super/paiban/college.vue
  3. 79
      src/views/super/paiban/tpl.vue

60
src/views/super/clientSet/coverInfoPage.vue

@ -9,7 +9,7 @@
<GuipInput v-model="coverInfo.college_name" label="学院名称" :client-form-flex="true" width="356px" />
<GuipRadio :options="qualificationList" v-model="coverInfo.qualification" label="学历" :client-form-flex="true" />
<GroupFormBtns cancelText="重置" @cancel="cancelClick('baseInfoRef')" flex="start"
@confirm="submitDoctorBaseInfo" />
@confirm="submitCoverInfo" />
</el-form>
</div>
<div class="client_flex-common flex-common mt12" id="">
@ -29,7 +29,7 @@
</div>
<GroupFormBtns cancelText="重置" @cancel="cancelClick('siteForm')" flex="start"
@confirm="submitDoctorBaseInfo" />
@confirm="uploadCoverTpl" />
</div>
<div class="save-button flex">
<GuipButton type="primary" :btnstyle="{width:'144px',height:'46px'}" @click="submitFun">收录完成</GuipButton>
@ -96,16 +96,18 @@ export default {
label: '继续教育',
value: 5
},
]
],
formData: new FormData(),
};
},
mounted() {
// this.getCoverInfo();
this.getCoverInfo();
},
methods: {
getCoverInfo(){
this.$http('POST', '/api', {}, {
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);
@ -120,7 +122,8 @@ export default {
cancelClick(formName) {
this.$refs[formName].resetFields();
},
submitDoctorBaseInfo() {
//
submitCoverInfo() {
console.log(this.coverInfo,'coverInfo信息');
this.$refs['baseInfoRef'].validate((valid) => {
@ -132,17 +135,12 @@ export default {
return false;
}
});
},
//
updateSiteReportCustomerService() {
this.formData.set('url', this.coverInfo.qrcode_path)
this.$http('POST', '',
this.formData
, {
headers: {
'Content-Type':'multipart/form-data'
}
}).then(response => {
uploadCoverTpl() {
this.formData.set('template_id', '1')
this.$http('POST', '/supernew/upload_paiban_template_cover', this.formData).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
@ -156,8 +154,14 @@ export default {
},
//
handleConfirmConfirm(){
// let props={
// template_id,
// school,
// college,
// degree
// }
try {
this.$http('POST', '', {
this.$http('POST', '/supernew/ajax_update_paiban_template_info', {
...this.coverInfo
}).then(response => {
this.$nextTick(() => {
@ -177,10 +181,28 @@ export default {
},
handleQQkfChange(file, fileList) {
console.log(file, fileList)
// let fileObj = file.raw
// this.formData.set('qq_qrcode', fileObj)
let fileObj = file.raw
this.formData.set('file', fileObj)
},
submitFun() {
// let props = {
// configdata,
// template_id
// }
this.$http('POST', '/supernew/upload_paiban_template_cover', {
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
}
},

37
src/views/super/paiban/college.vue

@ -101,36 +101,11 @@ export default {
return {
tableLoading:false,
tableKey: '',
school:'',
degree:'',
school:'0',
degree:'0',
review_status: -1,
tableList:[
{
school_name:'清华大学',
phone:'16675839374',
status:0,
status_desc:'待收录'
},
{
school_name:'清华大学',
phone:'16675839374',
status:1,
status_desc:'已收录'
},
{
school_name:'清华大学',
phone:'16675839374',
status:2,
status_desc:'收录中'
},
{
school_name:'清华大学',
phone:'16675839374',
status:3,
status_desc:'不收录'
},
],
tableList:[],
currentPage: 1, //
pageSize: 20, //
total: 0, //
@ -143,7 +118,7 @@ export default {
},
mounted() {
this.$nextTick(()=>{
// this.init()
this.init()
})
},
methods: {
@ -157,14 +132,14 @@ export default {
},
getList() {
try {
this.$http('POST', '/supernew/ajax_get_paiban_review_list', {
this.$http('POST', '/supernew/ajax_get_paiban_review_list', {//ok
school: this.school,
degree: this.degree,
review_status: this.review_status,
page: this.currentPage,
}).then(response => {
this.$nextTick(() => {
this.tableList = response.data.list
// this.tableList = response.data.list
this.total = response.data.count
})
}).catch(error => {

79
src/views/super/paiban/tpl.vue

@ -5,10 +5,10 @@
<div class="flex-between mb24">
<div class="flex filter-area">
<label for="">模板列表</label>
<GuipSelect width="180px" clearable label="学历" :options="['麻辣烫','提拉米苏']" v-model="degree" />
<GuipInput ref="GuipInput" label="学校" placeholder="输入学校名称" width="280px" v-model="school" />
<GuipSelect width="180px" clearable label="学历" :options="statusList" v-model="status" @change="getList"/>
<GuipInput ref="GuipInput" label="学校" placeholder="输入学校名称" @blur="getSchoolSearchList" width="280px" v-model="school" />
</div>
<GuipButton>添加模板</GuipButton>
<GuipButton @click="addTemplete">添加模板</GuipButton>
</div>
<GuipTable :tableData="tableList" :key="tableKey" ref="multipleTable" autoColumn="true" :loading="tableLoading" style="flex:1">
<template>
@ -23,7 +23,7 @@
</el-table-column>
<el-table-column fixed="right" prop="tid" label="操作" min-width="100">
<template slot-scope="scope">
<GuipButton type="text" @click="jumpEdit(scope.row.id)">编辑</GuipButton>
<GuipButton type="text" @click="jumpEdit(scope.row)">编辑</GuipButton>
</template>
</el-table-column>
</template>
@ -57,19 +57,11 @@ export default {
return {
tableLoading:false,
tableKey: '',
school:'',
degree:'',
status:'',
tableList:[
{
school_name:'清华大学',
phone:'16675839374',
status:1,
status_desc:'启用'
},
],
degree:'0',
status:null,
statusList:[],
tableList:[],
currentPage: 1, //
pageSize: 20, //
total: 0, //
@ -77,7 +69,7 @@ export default {
},
mounted() {
this.$nextTick(()=>{
// this.init()
this.init()
})
},
methods: {
@ -88,13 +80,44 @@ export default {
this.currentPage = 1
this.pageSize = 20
this.getList()
this.getStatusList()
},
getSchoolSearchList() {
try {
this.$http('POST', '/supernew/ajax_get_paiban_schools', {
keyword:this.school
}).then(response => {
this.$nextTick(() => {
this.tableList = response.data
this.total = response.data.count
})
}).catch(error => {
console.error(error, 'error')
})
} catch (error) {
console.error('数据加载失败:', error)
}
},
getStatusList() {
try {
this.$http('POST', '/supernew/ajax_get_review_status', {
}).then(response => {
this.$nextTick(() => {
this.statusList = response.data
})
}).catch(error => {
console.error(error, 'error')
})
} catch (error) {
console.error('数据加载失败:', error)
}
},
getList() {
try {
this.$http('POST', '/supernew/ajax_get_paiban_template_list', {
school: this.school,
school: this.school ? this.school : '0',
degree: this.degree,
status: this.status,
status: this.status == null ? -1 : this.status,
page: this.currentPage,
}).then(response => {
this.$nextTick(() => {
@ -116,8 +139,22 @@ export default {
this.currentPage = val
this.getList()
},
jumpEdit(id){
console.log(id)
jumpEdit(item){
// localStorage
// localStorage.setItem('tpl_id', item.id)
localStorage.setItem('tplInfo', item)
//
this.$router.push({
path: '/super/clientSet/coverInfoPage',
query: { id:item.id }
})
console.log(item.id)
},
//
addTemplete(){
this.$router.push({
path: '/super/clientSet/coverInfoPage',
})
}
}
}

Loading…
Cancel
Save