更新页面
This commit is contained in:
@ -36,7 +36,7 @@ const formList = reactive([
|
||||
{ label: "视频标题", prop: "spbt", type: "input" },
|
||||
],
|
||||
[
|
||||
{ label: "附件", prop: "fjid", type: "upload",isImg:false,showBtn:true,limit:2 },
|
||||
{ label: "附件", prop: "fjid", type: "upload",isImg:false,showBtn:true,limit:2 ,isAll:true},
|
||||
],
|
||||
])
|
||||
|
||||
@ -46,14 +46,23 @@ const init = (type, row = {}) => {
|
||||
dialogForm.value = true;
|
||||
openType.value = type;
|
||||
title.value = type == "add" ? "新增" : "编辑";
|
||||
listQuery.value = { ...row }
|
||||
if(row) getDateById(row.id)
|
||||
};
|
||||
|
||||
const getDateById = (id) =>{
|
||||
qcckPost({},'/mosty-base/baxx/sok/getInfo/'+id).then(res=>{
|
||||
res.fjid = res.fjid ? JSON.parse(res.fjid):[];
|
||||
listQuery.value = res || {}
|
||||
})
|
||||
}
|
||||
|
||||
const save = () => {
|
||||
FormRef.value.submit(()=>{
|
||||
FormRef.value.submit((val)=>{
|
||||
loading.value = true;
|
||||
let url = title.value == '新增' ? `/mosty-base/baxx/sok/add` : `/mosty-base/baxx/sok/edit`;
|
||||
qcckPost(listQuery.value, url).then(() => {
|
||||
let params = {...val }
|
||||
params.fjid = params.fjid ? JSON.stringify(params.fjid):''
|
||||
qcckPost(params, url).then(() => {
|
||||
loading.value = false;
|
||||
proxy.$message.success("保存成功");
|
||||
emit("refresh");
|
||||
|
||||
Reference in New Issue
Block a user