diff --git a/src/views/super/clientSet/coverInfoPage.vue b/src/views/super/clientSet/coverInfoPage.vue index 68fc8f6..3b3abf6 100644 --- a/src/views/super/clientSet/coverInfoPage.vue +++ b/src/views/super/clientSet/coverInfoPage.vue @@ -9,7 +9,7 @@ + @confirm="submitCoverInfo" />
@@ -29,7 +29,7 @@
+ @confirm="uploadCoverTpl" />
收录完成 @@ -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') + }) } }, diff --git a/src/views/super/paiban/college.vue b/src/views/super/paiban/college.vue index 07a63d1..606c17d 100644 --- a/src/views/super/paiban/college.vue +++ b/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 => { diff --git a/src/views/super/paiban/tpl.vue b/src/views/super/paiban/tpl.vue index de1b35f..08dddb0 100644 --- a/src/views/super/paiban/tpl.vue +++ b/src/views/super/paiban/tpl.vue @@ -5,10 +5,10 @@
- - + +
- 添加模板 + 添加模板
@@ -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', + }) } } }