|
|
|
@ -3,15 +3,20 @@
|
|
|
|
|
<div class="area-form">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="button-tab">
|
|
|
|
|
<el-popover v-model:visible="visible" placement="bottom" :width="180">
|
|
|
|
|
<el-popover v-model:visible="visible" placement="bottom" :width="360">
|
|
|
|
|
<h5>添加分组</h5>
|
|
|
|
|
<el-form>
|
|
|
|
|
<el-form-item style="width:80%">
|
|
|
|
|
<el-form-item style="width:80%" label="分组名">
|
|
|
|
|
<el-input v-model="setForm.name" placeholder="请输入分组名"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item style="width:80%" label="封面">
|
|
|
|
|
<uploadFile @change="handlerUpload" :config="{ limit: 1, accept: '.jpg, .jpeg, .png, .gif'}">
|
|
|
|
|
<el-button>点击上传</el-button>
|
|
|
|
|
</uploadFile>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button @click="addConfirm" type="primary">确定</el-button>
|
|
|
|
|
<el-button @click="visible = false">取消</el-button>
|
|
|
|
|
<el-button @click="visible = false; setForm.name=''">取消</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<template #reference>
|
|
|
|
@ -49,7 +54,7 @@
|
|
|
|
|
<el-dialog v-model="editVisible" width="30%" title="重命名">
|
|
|
|
|
<el-input v-model="setForm.name" placeholder="请输入分组名"></el-input>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<el-button @click="editVisible = false;setForm=''">取消</el-button>
|
|
|
|
|
<el-button @click="editVisible = false;setForm.name = ''">取消</el-button>
|
|
|
|
|
<el-button @click="editConfirm" type="primary">确定</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
@ -77,7 +82,8 @@ export default defineComponent({
|
|
|
|
|
});
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
const setForm = reactive({
|
|
|
|
|
name: ''
|
|
|
|
|
name: '',
|
|
|
|
|
coverUrl: '',
|
|
|
|
|
})
|
|
|
|
|
const visible = ref(false);
|
|
|
|
|
const editVisible = ref(false);
|
|
|
|
@ -117,7 +123,7 @@ export default defineComponent({
|
|
|
|
|
},
|
|
|
|
|
editConfirm() {
|
|
|
|
|
let obj = Object.assign(this.setForm, {id: this.activeId})
|
|
|
|
|
this.proxy.$post("/referencegroup/upd", obj).then(res => {
|
|
|
|
|
this.proxy.$post("/referenceGroup/upd", obj).then(res => {
|
|
|
|
|
this.getData();
|
|
|
|
|
this.editVisible = false;
|
|
|
|
|
this.$message.success(res.data)
|
|
|
|
@ -125,7 +131,7 @@ export default defineComponent({
|
|
|
|
|
},
|
|
|
|
|
//添加确认
|
|
|
|
|
addConfirm() {
|
|
|
|
|
this.proxy.$post("/referencegroup/add", this.setForm).then(res => {
|
|
|
|
|
this.proxy.$post("/referenceGroup/add", this.setForm).then(res => {
|
|
|
|
|
this.getData();
|
|
|
|
|
this.visible = false;
|
|
|
|
|
this.$message.success(res.data)
|
|
|
|
@ -138,11 +144,15 @@ export default defineComponent({
|
|
|
|
|
'删除', //标题
|
|
|
|
|
{type: 'warning'}
|
|
|
|
|
).then(() => {
|
|
|
|
|
this.proxy.$post("/referencegroup/del", {id: id}).then(res => {
|
|
|
|
|
this.proxy.$post("/referenceGroup/del", {id: id}).then(res => {
|
|
|
|
|
this.getData();
|
|
|
|
|
this.$message.success(res.data)
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
}).catch(() => {})
|
|
|
|
|
},
|
|
|
|
|
//上传图片
|
|
|
|
|
handlerUpload(data) {
|
|
|
|
|
this.setForm.coverUrl = data.fileUrl
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|