1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-745aff2c"],{"0946":function(e,t,l){},1269:function(e,t,l){"use strict";l("0946")},"31df3":function(e,t,l){},3227:function(e,t,l){"use strict";l.r(t);var a=l("7a23"),o=l("2e9d"),r=l("ad28"),c=l("1090"),n=l("2d16"),i=l("1d22"),b=l("c5cb");l("d1d3");const d={key:0,class:"dialog"},s={class:"head_box"},u={class:"title"},p=Object(a["createTextVNode"])("保存"),f=Object(a["createTextVNode"])("关闭"),j={class:"form_cnt"};var g={__name:"editAddForm",props:{dic:Object},emits:["updateDate"],setup(e,{expose:t,emit:l}){const{proxy:o}=Object(a["getCurrentInstance"])(),r=Object(a["ref"])(!1),c=Object(a["reactive"])({jymc:[{required:!0,message:"请输入经验名称",trigger:"blur"}],fbnr:[{required:!0,message:"请输入经验内容",trigger:"blur"}]}),n=Object(a["ref"])([]),g=Object(a["ref"])({}),O=Object(a["ref"])(!1),h=Object(a["ref"])(),m=Object(a["ref"])(""),y=(e,t)=>{r.value=!0,m.value="add"==e?"新增":"编辑",t?(console.log(t,"xxxxx"),n.value=[{label:"经验名称",prop:"jymc",type:"input",width:"100%"},{label:"发布时间",prop:"fbsj",type:"input",width:"50%",disabled:!0},{label:"发布人",prop:"fbr",type:"input",width:"50%",disabled:!0},{label:"经验内容",prop:"fbnr",type:"textarea",width:"100%"}],g.value=t):n.value=[{label:"经验名称",prop:"jymc",type:"input",width:"100%"},{label:"任务内容",prop:"fbnr",type:"textarea",width:"100%"}]},w=()=>{h.value.submit(e=>{let t="新增"==m.value?"/mosty-gsxt/gsxt/jyfx/add":"/mosty-gsxt/gsxt/jyfx/edit",a={...e};Object(b["d"])(a,t).then(()=>{O.value=!1,o.$message({type:"success",message:m.value+"成功"}),l("updateDate"),v()}).catch(()=>{O.value=!1})})},v=()=>{g.value={},O.value=!1,r.value=!1,g.value={}};return t({init:y}),(e,t)=>{const l=Object(a["resolveComponent"])("el-button");return r.value?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",d,[Object(a["createElementVNode"])("div",s,[Object(a["createElementVNode"])("span",u,"经验分享"+Object(a["toDisplayString"])(m.value),1),Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(l,{type:"primary",size:"small",loading:O.value,onClick:w},{default:Object(a["withCtx"])(()=>[p]),_:1},8,["loading"]),Object(a["createVNode"])(l,{size:"small",onClick:v},{default:Object(a["withCtx"])(()=>[f]),_:1})])]),Object(a["createElementVNode"])("div",j,[Object(a["createVNode"])(i["a"],{formList:n.value,modelValue:g.value,"onUpdate:modelValue":t[0]||(t[0]=e=>g.value=e),ref_key:"elform",ref:h,rules:c},null,8,["formList","modelValue","rules"])])])):Object(a["createCommentVNode"])("",!0)}}},O=(l("84ad"),l("d959")),h=l.n(O);const m=h()(g,[["__scopeId","data-v-53637aa2"]]);var y=m;const w={class:"titleBox"},v=Object(a["createElementVNode"])("span",{style:{"vertical-align":"middle"}},"新增",-1),C={class:"tabBox"},x=Object(a["createTextVNode"])("编辑"),k=Object(a["createTextVNode"])("删除");var _={__name:"index",setup(e){const{proxy:t}=Object(a["getCurrentInstance"])(),l=Object(a["ref"])(),i=Object(a["ref"])(!1),d=Object(a["ref"])(),s=Object(a["ref"])([{label:"发布人",prop:"fbr",placeholder:"请输入发布人",showType:"input"},{label:"经验标题",prop:"jymc",placeholder:"请输入经验标题",showType:"input"},{label:"发布时间",prop:"startTime",placeholder:"请选择发布时间",showType:"daterange"}]),u=Object(a["ref"])({}),p=Object(a["reactive"])({tableData:[],keyCount:0,tableConfiger:{rowHieght:61,showSelectType:"null",loading:!1},total:0,pageConfiger:{pageSize:20,pageCurrent:1},controlsWidth:160,tableColumn:[{label:"发布人",prop:"fbr"},{label:"经验名称",prop:"jymc"},{label:"发布时间",prop:"fbsj"},{label:"发布内容",prop:"fbnr",showOverflowTooltip:!0}]});Object(a["onMounted"])(()=>{_(),O()});const f=e=>{u.value={...e,startTime:e.startTime&&e.startTime.length>0?e.startTime[0]:"",endTime:e.startTime&&e.startTime.length>0?e.startTime[1]:""},p.pageConfiger.pageCurrent=1,O()},j=e=>{p.pageConfiger.pageCurrent=e,O()},g=e=>{p.pageConfiger.pageSize=e,O()},O=()=>{p.tableConfiger.loading=!0,Object(b["d"])(u.value,"/mosty-gsxt/g
|