Browse Source

模板接口对接

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

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

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