chunk-e2fd4352.620a965c.js 17 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e2fd4352"],{"035f":function(t,e,a){},1831:function(t,e,a){},"24d2":function(t,e,a){"use strict";a.d(e,"g",(function(){return o})),a.d(e,"a",(function(){return r})),a.d(e,"i",(function(){return i})),a.d(e,"e",(function(){return s})),a.d(e,"c",(function(){return l})),a.d(e,"h",(function(){return c})),a.d(e,"b",(function(){return u})),a.d(e,"j",(function(){return d})),a.d(e,"f",(function(){return m})),a.d(e,"d",(function(){return p}));var n=a("b775");function o(t){return Object(n["a"])({url:"/project/category/search",method:"post",data:t})}function r(t){return Object(n["a"])({url:"/project/category/create",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/project/category/update",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/project/category/info",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/project/category/delete",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/project/search",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/project/create",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/project/update",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/project/info",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/project/delete",method:"post",data:t})}},"319b":function(t,e,a){},3672:function(t,e,a){"use strict";a("eb4d")},"424e":function(t,e,a){"use strict";a.d(e,"h",(function(){return o})),a.d(e,"i",(function(){return r})),a.d(e,"e",(function(){return i})),a.d(e,"m",(function(){return s})),a.d(e,"a",(function(){return l})),a.d(e,"g",(function(){return c})),a.d(e,"c",(function(){return u})),a.d(e,"j",(function(){return d})),a.d(e,"b",(function(){return m})),a.d(e,"n",(function(){return p})),a.d(e,"f",(function(){return f})),a.d(e,"d",(function(){return g})),a.d(e,"k",(function(){return h})),a.d(e,"l",(function(){return b}));var n=a("b775");function o(t){return Object(n["a"])({url:"/document/pageDocument",method:"post",data:t})}function r(t){return Object(n["a"])({url:"/document/search",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/document/export",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/document/update",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/document/create",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/document/info",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/document/delete",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/document/category/search",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/document/category/create",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/document/category/update",method:"post",data:t})}function f(t){return Object(n["a"])({url:"/document/category/info",method:"post",data:t})}function g(t){return Object(n["a"])({url:"/document/category/delete",method:"post",data:t})}function h(t){return Object(n["a"])({url:"/template/searchList",method:"post",data:t})}function b(t){return Object(n["a"])({url:"/document/searchlistDoc",method:"post",data:t})}},5869:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"project-search"},[a("dataSearch",{on:{bindSetQuery:t.setQuery}}),a("dataList",{attrs:{queryForm:t.queryForm}})],1)},o=[],r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"data-search"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.queryForm}},[a("el-form-item",{attrs:{label:"项目名称:"}},[a("el-input",{attrs:{placeholder:"请填写项目名称"},model:{value:t.queryForm.name,callback:function(e){t.$set(t.queryForm,"name",e)},expression:"queryForm.name"}})],1),a("el-form-item",{attrs:{label:"所属分类:"}},[a("el-select",{staticClass:"m-2",attrs:{placeholder:"请选择分类",size:"large"},model:{value:t.queryForm.categoryId,callback:function(e){t.$set(t.queryForm,"categoryId",e)},expression:"queryForm.categoryId"}},t._l(t.categoryList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),a("el-form-item",{attrs:{label:"状态:"}},[a("el-select",{staticClass:"m-2",attrs:{placeholder:"请选择状态",size:"large"},model:{value:t.queryForm.status,callback:function(e){t.$set(t.queryForm,"status",e)},expression:"queryForm.status"}},t._l(t.statusOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[a("svg-icon",{attrs:{"icon-class":"search"}}),t._v(" 搜索")],1),a("el-button",{attrs:{type:"success"},on:{click:t.onCreate}},[a("svg-icon",{attrs:{"icon-class":"edit"}}),t._v(" 新项目")],1)],1)],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.dialogVisible,"append-to-body":"","custom-class":"prod-verify",title:"创建新项目"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("dataInfo",{on:{onClose:t.onClose}})],1)],1)},i=[],s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"data-info"},[a("el-card",[a("el-form",{ref:"dataFormRef",attrs:{model:t.dataForm,rules:t.rules,"label-width":"120px"}},[a("el-form-item",{staticClass:"form-item-half",attrs:{label:"项目名称:",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入项目名称"},model:{value:t.dataForm.name,callback:function(e){t.$set(t.dataForm,"name",e)},expression:"dataForm.name"}})],1),a("el-form-item",{staticClass:"form-item-half",attrs:{label:"所属分类:",prop:"category_id"}},[a("el-select",{attrs:{placeholder:"请选择所属分类",size:"large"},model:{value:t.dataForm.category_id,callback:function(e){t.$set(t.dataForm,"category_id",e)},expression:"dataForm.category_id"}},t._l(t.allCategories,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),a("el-form-item",{staticClass:"form-item-half",attrs:{label:"项目状态:",prop:"status"}},[a("el-select",{attrs:{placeholder:"请选择状态",size:"large"},model:{value:t.dataForm.status,callback:function(e){t.$set(t.dataForm,"status",e)},expression:"dataForm.status"}},t._l(t.statusOptions,(function(t){return a("el-option",{key:t.status,attrs:{label:t.name,value:t.status}})})),1)],1),a("el-form-item",{staticClass:"form-item-half",attrs:{label:"项目介绍:",prop:"intro"}},[a("el-input",{attrs:{rows:"3",placeholder:"请输入项目介绍",type:"textarea"},model:{value:t.dataForm.intro,callback:function(e){t.$set(t.dataForm,"intro",e)},expression:"dataForm.intro"}})],1)],1)],1),a("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[a("el-button",{attrs:{type:"warning"},on:{click:t.btnSave}},[t._v("确认保存")])],1)],1)},l=[],c=(a("a9e3"),a("8256")),u=a("24d2"),d=a("f6b0"),m=a("424e"),p={components:{Tinymce:c["default"]},emits:["onClose"],props:{id:{type:Number,default:0}},watch:{id:{handler:function(t){var e=this;null!=t&&(0!=t?e.getInfo(t):this.dataForm={id:0,name:"",intro:"",customer_id:"",category_id:"",status:5})},immediate:!0,deep:!0}},data:function(){return{activeName:"base",currentCategory:[],allCategories:[],imageUrl:"",customerList:[],articleList:[],dataForm:{id:0,name:"",intro:"",customer_id:"",category_id:"",status:5},statusOptions:[{status:5,name:"启用"},{status:6,name:"停用"}],rules:{name:[{required:!0,message:"请输入项目名称",trigger:"blur"},{min:1,max:50,message:"长度在 1 到 50 个字符之间",trigger:"blur"}],category_id:[{required:!0,message:"请选择所属分类",trigger:"change"}],status:[{required:!0,message:"请选择项目状态",trigger:"change"}]}}},mounted:function(){var t=this;t.uploadUrl="http://183.195.216.54:8084/upload",t.initAllCategory(),this.initCustomer()},methods:{initDocList:function(){var t=this;Object(m["i"])({page:1,pageSize:10}).then((function(e){200==e.status&&(t.articleList=e.data.dataList)}))},onUploadSuccess:function(t){console.log("onUploadSuccess",t)},btnSave:function(t){var e=this;e.$refs.dataFormRef.validate((function(t){if(!t)return!1;var a=e.dataForm.id>0?Object(u["j"])(e.dataForm):Object(u["b"])(e.dataForm);a.then((function(t){200===t.status&&(e.$message.success(e.dataForm.id>0?"项目信息更新成功":"项目信息创建成功"),setTimeout((function(){e.$emit("onClose",!0)}),0))})).catch((function(t){console.error("Save failed:",t)}))}))},getInfo:function(t){var e=this,a={id:t};Object(u["f"])(a).then((function(t){t&&200==t.status&&(e.dataForm=t.data,e.dataForm.category_id=t.data.categoryId,e.dataForm.customer_id=t.data.customerId)}))},onChangeStatus:function(t){this.dataForm.status=t},onChangeCategory:function(t){var e=this;e.dataForm.categoryId=t},initAllCategory:function(){var t=this,e={page:1,pageSize:9999,status:5};Object(u["g"])(e).then((function(e){t.allCategories=e.data.dataList}))},initCustomer:function(){var t=this,e={page:1,pageSize:99};Object(d["a"])(e).then((function(e){t.customerList=e.data.dataList}))}}},f=p,g=(a("ce6c"),a("2877")),h=Object(g["a"])(f,s,l,!1,null,null,null),b=h.exports,y=a("a888"),v={components:{dataInfo:b},directives:{elDragDialog:y["a"]},props:{queryForm:{type:Object,default:function(){return{page:1,pageSize:10,name:"",category_id:"",status:"",isUpdate:!1}}}},data:function(){return{statusOptions:[{value:5,label:"启用"},{value:6,label:"停用"}],dialogVisible:!1,categoryList:[]}},created:function(){this.initCategory()},methods:{initCategory:function(){var t=this,e={page:1,pageSize:999,status:5};Object(u["g"])(e).then((function(e){t.categoryList=e.data.dataList}))},onCreate:function(t){this.dialogVisible=!0},onClose:function(t){this.dialogVisible=!1,this.queryForm.isUpdate=!this.queryForm.isUpdate},onSubmit:function(){this.queryForm.isUpdate=!this.queryForm.isUpdate,this.$emit("bindSetQuery",this.$props.queryForm)}}},j=v,F=(a("f7d1"),Object(g["a"])(j,r,i,!1,null,null,null)),w=F.exports,C=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"data-list"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.dataList,"header-row-class-name":"headerBg","empty-text":"没有项目信息"}},[a("el-table-column",{attrs:{prop:"id",label:"ID",align:"center",width:"80"}}),a("el-table-column",{attrs:{prop:"categoryId",label:"所属分类",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getCategoryName(e.row.categoryId)))])]}}])}),a("el-table-column",{attrs:{prop:"name",label:"项目名称",align:"left"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间",align:"center"}}),a("el-table-column",{attrs:{prop:"statusName",label:"项目状态",align:"center",width:"180"},scopedSlots:t._u([{key:"default",fn:function(e){return[5==e.row.status?a("div",[t._v("启用")]):t._e(),6==e.row.status?a("div",[t._v("停用")]):t._e()]}}])}),a("el-table-column",{attrs:{label:"操作",align:"center",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-dropdown",{attrs:{data:e.row},on:{command:t.handleCommand},scopedSlots:t._u([{key:"dropdown",fn:function(){return[a("el-dropdown-menu",[a("el-dropdown-item",{attrs:{command:{type:"template",row:e.row}}},[t._v("选择模版")]),a("el-dropdown-item",{attrs:{command:{type:"enter",row:e.row}}},[t._v("输入项目")]),a("el-dropdown-item",{attrs:{command:{type:"edit",row:e.row}}},[a("svg-icon",{attrs:{"icon-class":"edit"}}),t._v("编辑 ")],1),a("el-dropdown-item",{attrs:{command:{type:"delete",row:e.row}}},[a("svg-icon",{attrs:{"icon-class":"delete"}}),t._v("删除 ")],1)],1)]},proxy:!0}],null,!0)},[a("span",{staticClass:"el-dropdown-link"},[a("el-button",{staticClass:"operation-button",staticStyle:{"font-size":"15px","margin-left":"10px"},attrs:{type:"text",size:"small",circle:"",icon:"el-icon-more"}})],1)])]}}])})],1),a("div",{staticClass:"page-info"},[a("el-pagination",{attrs:{currentPage:t.queryForm.page,"page-size":t.queryForm.pageSize,total:t.recordCount,"page-count":t.pageTotal,background:"",layout:"prev, pager, next"},on:{"current-change":t.ChangePage}})],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.dialogVisible,"append-to-body":"","custom-class":"prod-verify",title:"创建项目信息"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("dataInfo",{attrs:{id:t.currentDataId},on:{onClose:t.onClose}})],1),a("el-dialog",{attrs:{title:"选择模版",visible:t.templateDialogVisible,width:"50%","append-to-body":""},on:{"update:visible":function(e){t.templateDialogVisible=e}}},[a("el-table",{ref:"templateTable",staticStyle:{width:"100%"},attrs:{data:t.templateList},on:{"selection-change":t.handleTemplateSelect}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{prop:"id",label:"ID",width:"80",align:"center"}}),a("el-table-column",{attrs:{prop:"title",label:"模版名称",align:"left"}}),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间",align:"center"}})],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.templateDialogVisible=!1}}},[t._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:t.confirmTemplateSelection}},[t._v("确 定")])],1)],1)],1)},O=[],_=(a("7db0"),a("b0c0"),a("d3b7"),a("ac1f"),a("841c"),{components:{dataInfo:b},directives:{elDragDialog:y["a"]},props:{queryForm:{type:Object,default:function(){return{page:1,pageSize:10,name:"",category_id:"",status:""}}}},watch:{queryForm:{handler:function(t){this.search()},deep:!0}},data:function(){return{dialogVisible:!1,currentDataId:0,recordCount:0,pageTotal:1,dataList:[],currentData:{},categoryList:[],templateDialogVisible:!1,templateList:[],selectedTemplates:[]}},mounted:function(){this.search(),this.init()},methods:{handleCommand:function(t){switch(t.type){case"template":this.selTemplate(t.row);break;case"enter":this.enterPro(t.row);break;case"edit":this.btnEdit(t.row);break;case"delete":this.btnDelete(t.row.id);break}},selTemplate:function(t){var e=this;this.currentData=t,this.selectedTemplates=[],Object(m["k"])().then((function(t){200===t.status&&(e.templateList=t.data.dataList,e.templateDialogVisible=!0,e.$nextTick((function(){})))}))},handleTemplateSelect:function(t){this.selectedTemplates=t},closeTemplateDialog:function(){this.templateDialogVisible=!1,this.selectedTemplates=[],this.$refs.templateTable.clearSelection()},confirmTemplateSelection:function(){0!==this.selectedTemplates.length?(console.log("Selected templates:",this.selectedTemplates),console.log("Current project:",this.currentData),this.$message.success("模版选择成功"),this.closeTemplateDialog()):this.$message.warning("请至少选择一个模版")},toggleRowSelection:function(t,e){this.$refs.templateTable.toggleRowSelection(t,e)},toggleAllSelection:function(){this.$refs.templateTable.toggleAllSelection()},enterPro:function(t){this.$router.push({path:"/project/ProjectInput",query:{id:t.id}})},getCategoryName:function(t){var e=this.categoryList.find((function(e){return e.id===t}));return e?e.name:t},searchData:function(){var t=this;t.dialogVisible=!1,t.search()},btnDelete:function(t){var e=this,a={id:t};e.$confirm("您是否确认删除该记录?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then((function(t){Object(u["d"])(a).then((function(t){e.search()}))})).catch((function(){}))},btnEdit:function(t){var e=this;e.currentDataId=t.id,e.dialogVisible=!0},onClose:function(t){console.log("onClose triggered with needRefresh:",t),this.currentDataId=0,this.dialogVisible=!1,t&&this.search()},handleUpdate:function(){this.search()},search:function(){console.log("search triggered");var t=this;Object(u["h"])(t.queryForm).then((function(e){e&&(t.dataList=e.data.dataList,t.recordCount=e.data.totalRecord,t.pageTotal=e.data.totalPage)}))},ChangePage:function(t){var e=this;e.queryForm.page=t,e.search()},init:function(){var t=this;Object(u["g"])().then((function(e){200===e.status&&(t.categoryList=e.data.dataList)}))}}}),S=_,k=(a("c36c"),Object(g["a"])(S,C,O,!1,null,null,null)),q=k.exports,x={components:{dataSearch:w,dataList:q},data:function(){return{queryForm:{page:1,pageSize:10,name:"",category_id:"",status:"",isUpdate:!1}}},methods:{setQuery:function(t){this.queryForm=t}}},D=x,L=(a("3672"),Object(g["a"])(D,n,o,!1,null,null,null));e["default"]=L.exports},c36c:function(t,e,a){"use strict";a("319b")},ce6c:function(t,e,a){"use strict";a("1831")},eb4d:function(t,e,a){},f6b0:function(t,e,a){"use strict";a.d(e,"a",(function(){return o})),a.d(e,"b",(function(){return r}));var n=a("b775");function o(t){return Object(n["a"])({url:"/customer/search",method:"post",data:t})}function r(){return Object(n["a"])({url:"/customer/sync",method:"post"})}},f7d1:function(t,e,a){"use strict";a("035f")}}]);