water-ldht/dist/static/js/chunk-3210efee.dc07a9c4.js

7 lines
14 KiB
JavaScript

/*!
* build: vue-admin-beautiful
* vue-admin-beautiful author: chuzhixin 1204505056@qq.com
* vue-admin-beautiful QQ Group(QQ群): 972435319、1139183756
* time: 2024-10-10 11:14:28
*/
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3210efee","chunk-a76972a0","chunk-c64d6900"],{"307a":function(e,t,o){"use strict";o("6ba4")},"6ac1":function(e,t,o){"use strict";o("895f")},"6ba4":function(e,t,o){},"895f":function(e,t,o){},"91aa":function(e,t,o){"use strict";o.r(t);var a=o("f2bf");const l={class:"manage-container"},i={class:"manage-input"},c={class:"manage-button"},r=["innerHTML"];function d(e,t,o,d,n,s){const u=Object(a["resolveComponent"])("el-input"),b=Object(a["resolveComponent"])("el-form-item"),m=Object(a["resolveComponent"])("el-date-picker"),h=Object(a["resolveComponent"])("el-option"),f=Object(a["resolveComponent"])("el-select"),g=Object(a["resolveComponent"])("vab-query-form"),p=Object(a["resolveComponent"])("el-form"),j=Object(a["resolveComponent"])("el-button"),O=Object(a["resolveComponent"])("el-table-column"),C=Object(a["resolveComponent"])("el-table"),V=Object(a["resolveComponent"])("el-pagination"),y=Object(a["resolveComponent"])("knowledge-edit"),w=Object(a["resolveComponent"])("detail");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",l,[Object(a["createElementVNode"])("div",i,[Object(a["createVNode"])(p,{ref:"queryForm",model:n.queryForm,"label-width":"80px"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(g,null,{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{width:"100",prop:"title",label:"项目标题"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{modelValue:n.queryForm.title,"onUpdate:modelValue":t[0]||(t[0]=e=>n.queryForm.title=e),size:"small",placeholder:"请输入标题"},null,8,["modelValue"])]),_:1}),Object(a["createVNode"])(b,{width:"100",prop:"date",label:e.$t("defalult.rq")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{modelValue:n.queryForm.date,"onUpdate:modelValue":t[1]||(t[1]=e=>n.queryForm.date=e),size:"small",type:"date",placeholder:e.$t("defalult.xzrq")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),Object(a["createVNode"])(b,{width:"100",prop:"category",label:"分类"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(f,{modelValue:n.queryForm.category,"onUpdate:modelValue":t[2]||(t[2]=e=>n.queryForm.category=e),size:"small",filterable:"",placeholder:"请选择分类"},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.dictData,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(h,{key:e.dataCode,label:e.dataValue,value:e.dataCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model"])]),Object(a["createElementVNode"])("div",c,[Object(a["createVNode"])(j,{size:"small",onClick:t[3]||(t[3]=e=>s.resetForm())},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$t("defalult.chongz")),1)]),_:1}),Object(a["createVNode"])(j,{type:"primary",size:"small",onClick:s.search},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$t("defalult.cx")),1)]),_:1},8,["onClick"]),Object(a["createVNode"])(j,{type:"primary",size:"small",onClick:t[4]||(t[4]=e=>s.handleAdd())},{default:Object(a["withCtx"])(()=>t[5]||(t[5]=[Object(a["createTextVNode"])(" 添加知识库 ")])),_:1}),Object(a["createVNode"])(j,{type:"primary",size:"small",onClick:s.deletes},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$t("defalult.plsc")),1)]),_:1},8,["onClick"])]),Object(a["createVNode"])(C,{data:n.tableData,stripe:"",border:"",style:{width:"100%"},onSelectionChange:s.handleSelectionChange},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(O,{fixed:"",type:"selection",width:"60",align:"center"}),Object(a["createVNode"])(O,{prop:"id",label:"Id",width:"50",align:"center"}),Object(a["createVNode"])(O,{prop:"addUser",label:"添加人",width:"250",align:"center"}),Object(a["createVNode"])(O,{prop:"title",label:"标题",width:"250",align:"center"}),Object(a["createVNode"])(O,{prop:"introduction",label:"简介",width:"150",align:"center"},{default:Object(a["withCtx"])(({row:e})=>[Object(a["createElementVNode"])("p",{innerHTML:e.introduction},null,8,r)]),_:1}),Object(a["createVNode"])(O,{prop:"createTime",label:e.$t("grouping.cjsj"),width:"150",align:"center"},null,8,["label"]),Object(a["createVNode"])(O,{label:e.$t("defalult.cz"),align:"center"},{default:Object(a["withCtx"])(({row:o})=>[Object(a["createVNode"])(j,{type:"text",onClick:e=>s.handleshow(o)},{default:Object(a["withCtx"])(()=>t[6]||(t[6]=[Object(a["createTextVNode"])("查看")])),_:2},1032,["onClick"]),Object(a["createVNode"])(j,{type:"text",onClick:e=>s.handleEdit(o)},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$t("defalult.bj")),1)]),_:2},1032,["onClick"]),Object(a["createVNode"])(j,{type:"text",onClick:e=>s.handleDelete(o)},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$t("defalult.sc")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data","onSelectionChange"]),Object(a["createVNode"])(V,{background:n.background,"current-page":n.queryForm.page,layout:n.layout,"page-size":n.queryForm.size,total:n.total,style:{"text-align":"right"},onCurrentChange:s.handleCurrentChange,onSizeChange:s.handleSizeChange},null,8,["background","current-page","layout","page-size","total","onCurrentChange","onSizeChange"]),Object(a["createVNode"])(y,{ref:"edit"},null,512),Object(a["createVNode"])(w,{ref:"detail"},null,512)])}o("14d9");var n=o("b862"),s=o("977f"),u=o("db6a"),b={components:{knowledgeEdit:n["default"],detail:s["default"]},data(){return{tableData:[],dialogTableVisible:!1,dialogFormVisible:!1,lazy:!0,layout:"total, sizes, prev, pager, next, jumper",total:0,ids:[],dictData:[],background:!0,listLoading:!1,elementLoadingText:"正在加载...",queryForm:{page:1,size:20,title:"",date:"",category:""}}},created(){this.fetchData(),this.getCategoryDict()},methods:{search(){this.fetchData()},async getCategoryDict(){const{data:e}=await Object(u["getCategoryDict"])();this.dictData=e},async fetchData(){this.listLoading=!0;const{data:e}=await Object(u["getList"])(this.queryForm);this.tableData=e.items,this.total=e.total,setTimeout(()=>{this.listLoading=!1},500)},resetForm(){this.$refs.queryForm.resetFields()},handleAdd(){this.$refs["edit"].showEdit()},handleEdit(e){this.$refs["edit"].showEdit(e)},handleshow(e){this.$refs["detail"].showData(e)},handleSelectionChange(e){const t=[];e.forEach(e=>{t.push(e.id)}),this.ids=t},deletes(){const e=this.ids;if(0==e.length)return this.$message({type:"info",message:"没有选中任何项"}),!1;this.deleteData(e)},deleteData(e){const t=this;this.$confirm("你确定要删除当前项吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const{msg:o}=Object(u["doDelete"])(e);this.$message({type:"success",message:void 0==o?"删除成功":o}),setTimeout((function(){t.fetchData()}),1e3)}).catch(()=>{this.$message({type:"info",message:"已取消删除"})})},handleDelete(e){const t=this;t.deletes([e.id])},handleQuery(){this.queryForm.page=1,this.fetchData()},handleSizeChange(e){this.queryForm.size=e,this.fetchData()},handleCurrentChange(e){this.queryForm.page=e,this.fetchData()}}},m=(o("ec5c"),o("6ac1"),o("d959")),h=o.n(m);const f=h()(b,[["render",d],["__scopeId","data-v-48fcbe30"]]);t["default"]=f},"977f":function(e,t,o){"use strict";o.r(t);var a=o("f2bf");const l=["innerHTML"];function i(e,t,o,i,c,r){const d=Object(a["resolveComponent"])("el-dialog");return Object(a["openBlock"])(),Object(a["createBlock"])(d,{modelValue:c.dialogFormVisible,"onUpdate:modelValue":t[0]||(t[0]=e=>c.dialogFormVisible=e),title:c.title,width:"500px",onClose:r.close},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("p",{innerHTML:c.form.detail},null,8,l)]),_:1},8,["modelValue","title","onClose"])}var c={data(){return{form:{id:"",title:"",introduction:"",detail:"",category:"",addUser:""},dialogFormVisible:!1,title:""}},created(){},methods:{showData(e){this.title="知识库内容",this.form=Object.assign({},e),this.dialogFormVisible=!0},close(){this.dialogFormVisible=!1,this.$emit("fetch-data")}}},r=(o("307a"),o("d959")),d=o.n(r);const n=d()(c,[["render",i],["__scopeId","data-v-278dbf80"]]);t["default"]=n},b862:function(e,t,o){"use strict";o.r(t);var a=o("f2bf");const l={class:"dialog-footer"};function i(e,t,o,i,c,r){const d=Object(a["resolveComponent"])("el-input"),n=Object(a["resolveComponent"])("el-form-item"),s=Object(a["resolveComponent"])("el-option"),u=Object(a["resolveComponent"])("el-select"),b=Object(a["resolveComponent"])("ckeditor"),m=Object(a["resolveComponent"])("el-form"),h=Object(a["resolveComponent"])("el-button"),f=Object(a["resolveComponent"])("el-dialog");return Object(a["openBlock"])(),Object(a["createBlock"])(f,{modelValue:c.dialogFormVisible,"onUpdate:modelValue":t[4]||(t[4]=e=>c.dialogFormVisible=e),title:c.title,width:"800px",onClose:r.close},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{ref:"form",model:c.form,rules:c.rules,"label-width":"80px","label-position":"left"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(n,{label:"标题",prop:"title"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(d,{modelValue:c.form.title,"onUpdate:modelValue":t[0]||(t[0]=e=>c.form.title=e),modelModifiers:{trim:!0},size:"small",autocomplete:"off"},null,8,["modelValue"])]),_:1}),Object(a["createVNode"])(n,{label:"分类",prop:"category"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{modelValue:c.form.category,"onUpdate:modelValue":t[1]||(t[1]=e=>c.form.category=e),size:"small",filterable:"",placeholder:"请选择分类"},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(c.dictData,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:e.dataCode,label:e.dataValue,value:e.dataCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),Object(a["createVNode"])(n,{label:"简介",prop:"introduction"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:c.form.introduction,"onUpdate:modelValue":t[2]||(t[2]=e=>c.form.introduction=e),size:"small",editor:c.editor,config:c.editorConfig},null,8,["modelValue","editor","config"])]),_:1}),Object(a["createVNode"])(n,{label:"详情",prop:"detail"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:c.form.detail,"onUpdate:modelValue":t[3]||(t[3]=e=>c.form.detail=e),size:"small",editor:c.editor,config:c.editorConfig},null,8,["modelValue","editor","config"])]),_:1})]),_:1},8,["model","rules"]),Object(a["createElementVNode"])("div",l,[Object(a["createVNode"])(h,{type:"primary",size:"small",onClick:r.save},{default:Object(a["withCtx"])(()=>t[5]||(t[5]=[Object(a["createTextVNode"])("确 定")])),_:1},8,["onClick"]),Object(a["createVNode"])(h,{size:"small",onClick:r.close},{default:Object(a["withCtx"])(()=>t[6]||(t[6]=[Object(a["createTextVNode"])("取 消")])),_:1},8,["onClick"])])]),_:1},8,["modelValue","title","onClose"])}var c=o("db6a"),r=o("c471"),d=o.n(r),n=(o("cd6d"),o("5847")),s={data(){return{form:{id:"",title:"",introduction:"",detail:"",category:""},rules:{title:[{required:!0,trigger:"blur",message:"请输入标题"}],category:[{required:!0,trigger:"change",message:"请选择分类"}],introduction:[{required:!0,trigger:"blur",message:"请输入简介"}],detail:[{required:!0,trigger:"blur",message:"请输入详情"}]},dictData:[],roleData:[],clearable:!0,roleId:"",parentData:[],title:"",dialogFormVisible:!1,editor:d.a,editorConfig:n["knowledgeEditorConfig"]}},created(){},methods:{showEdit(e){if(e){this.title="编辑知识库";const t=Object.assign({},e);this.form.category=t.category.dataCode,this.form.id=t.id,this.form.title=t.title,this.form.introduction=t.introduction,this.form.detail=t.detail}else this.title="添加知识库";this.dialogFormVisible=!0,this.getCategoryDict()},async getCategoryDict(){const{data:e}=await Object(c["getCategoryDict"])();this.dictData=e},close(){this.$refs["form"].resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1,this.$emit("fetch-data")},save(){this.$refs["form"].validate(async e=>{if(!e)return!1;if(this.form.id){const{msg:e}=await Object(c["doEdit"])(this.form);this.$notify({title:e,type:"success"})}else{delete this.form.id;const{msg:e}=await Object(c["doAdd"])(this.form);this.$notify({title:e,type:"success"})}this.$refs["form"].resetFields(),this.$parent.fetchData(),this.dialogFormVisible=!1})}}},u=o("d959"),b=o.n(u);const m=b()(s,[["render",i]]);t["default"]=m},c67c:function(e,t,o){},db6a:function(e,t,o){"use strict";o.r(t),o.d(t,"getList",(function(){return l})),o.d(t,"doDelete",(function(){return i})),o.d(t,"doEdit",(function(){return c})),o.d(t,"doAdd",(function(){return r})),o.d(t,"getCategoryDict",(function(){return d}));var a=o("b775");function l(e){let t="?page="+e.page+"&size="+e.size;return void 0!=e.title&&""!=e.title&&(t+="&title="+e.title),void 0!=e.date&&""!=e.date&&(t+="&date="+e.date),Object(a["default"])({url:"/knowledge/list"+t,method:"get",data:e})}function i(e){return Object(a["default"])({url:"/knowledge/remove",method:"post",data:e})}function c(e){return Object(a["default"])({url:"/knowledge/update",method:"post",data:e})}function r(e){return Object(a["default"])({url:"/knowledge/insert",method:"post",data:e})}function d(e){return Object(a["default"])({url:"/knowledge/categoryDict",method:"get",data:e})}},ec5c:function(e,t,o){"use strict";o("c67c")}}]);