diff --git a/src/views/super/clientSet/coverInfoPage.vue b/src/views/super/clientSet/coverInfoPage.vue
index 3b3abf6..d41a55c 100644
--- a/src/views/super/clientSet/coverInfoPage.vue
+++ b/src/views/super/clientSet/coverInfoPage.vue
@@ -4,10 +4,10 @@
基本信息
-
+
-
+
@@ -68,68 +68,80 @@ export default {
collegeList: [// 学院列表
{
label: '通用',
- value: 1
+ value: '0'
},
{
label: '专用',
- value: 2
+ value: '1'
}
],
qualificationList: [// 学历列表
{
label: '专科',
- value: 1
+ value: '1'
},
{
label: '本科',
- value: 2
+ value: '2'
},
{
label: '硕士',
- value: 3
+ value: '3'
},
{
label: '博士',
- value: 4
+ value: '4'
},
{
label: '继续教育',
- value: 5
+ value: '5'
},
],
formData: new FormData(),
+ editInfo:{},//当前编辑的模板信息
+ template_id: '',//当前模板id
};
},
mounted() {
+ const editInfo = JSON.parse(localStorage.getItem('curtplInfo')) || '';
+ this.editInfo = this.coverInfo = editInfo;
+ this.coverInfo = {
+ school:editInfo.school_name,
+ college:editInfo.college_id,
+ college_name:editInfo.college_name,
+ degree:editInfo.degree_id,
+ // qrcode_path:editInfo.cover_img
+ }
+ this.template_id = editInfo.id;
this.getCoverInfo();
},
methods: {
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_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')
+ // })
},
cancelClick(formName) {
this.$refs[formName].resetFields();
},
- // 提交封面基本信息
+ // 提交基本信息
submitCoverInfo() {
console.log(this.coverInfo,'coverInfo信息');
this.$refs['baseInfoRef'].validate((valid) => {
if (valid) {
console.log('submit!');
- this.handleConfirmRefuse()
+ this.handleConfirmConfirm()
} else {
return false;
@@ -137,9 +149,15 @@ export default {
});
},
+
+ handleQQkfChange(file, fileList) {
+ console.log(file, fileList)
+ let fileObj = file.raw
+ this.formData.set('file', fileObj)
+ },
// 提交封面样式信息
uploadCoverTpl() {
- this.formData.set('template_id', '1')
+ this.formData.set('template_id',this.template_id)
this.$http('POST', '/supernew/upload_paiban_template_cover', this.formData).then(response => {
this.$nextTick(() => {
if (response.status) {
@@ -154,15 +172,16 @@ export default {
},
// 提交基本信息
handleConfirmConfirm(){
- // let props={
- // template_id,
- // school,
- // college,
- // degree
- // }
+ let props={
+ school: this.coverInfo.school,
+ college: this.coverInfo.college,
+ degree: this.coverInfo.degree,
+ // 缺乏一个参数
+ }
try {
this.$http('POST', '/supernew/ajax_update_paiban_template_info', {
- ...this.coverInfo
+ ...props,
+ template_id: this.template_id
}).then(response => {
this.$nextTick(() => {
if (response.status) {
@@ -179,12 +198,6 @@ export default {
console.error('数据加载失败:', error)
}
},
- handleQQkfChange(file, fileList) {
- console.log(file, fileList)
- let fileObj = file.raw
- this.formData.set('file', fileObj)
-
- },
submitFun() {
// let props = {
// configdata,
diff --git a/src/views/super/paiban/tpl.vue b/src/views/super/paiban/tpl.vue
index 08dddb0..44e8699 100644
--- a/src/views/super/paiban/tpl.vue
+++ b/src/views/super/paiban/tpl.vue
@@ -142,7 +142,7 @@ export default {
jumpEdit(item){
// 保存模板信息到localStorage 后续看下编辑页面是走接口还是直接用存储的数据
// localStorage.setItem('tpl_id', item.id)
- localStorage.setItem('tplInfo', item)
+ localStorage.setItem('curtplInfo', JSON.stringify(item))
// 跳转编辑页面
this.$router.push({
path: '/super/clientSet/coverInfoPage',