1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-be07077e"],{"035f":function(t,e,a){},1831:function(t,e,a){},"24d2":function(t,e,a){"use strict";a.d(e,"g",(function(){return n})),a.d(e,"a",(function(){return o})),a.d(e,"i",(function(){return i})),a.d(e,"e",(function(){return s})),a.d(e,"c",(function(){return c})),a.d(e,"h",(function(){return u})),a.d(e,"b",(function(){return l})),a.d(e,"j",(function(){return d})),a.d(e,"f",(function(){return m})),a.d(e,"d",(function(){return f}));var r=a("b775");function n(t){return Object(r["a"])({url:"/project/category/search",method:"post",data:t})}function o(t){return Object(r["a"])({url:"/project/category/create",method:"post",data:t})}function i(t){return Object(r["a"])({url:"/project/category/update",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/project/category/info",method:"post",data:t})}function c(t){return Object(r["a"])({url:"/project/category/delete",method:"post",data:t})}function u(t){return Object(r["a"])({url:"/project/search",method:"post",data:t})}function l(t){return Object(r["a"])({url:"/project/create",method:"post",data:t})}function d(t){return Object(r["a"])({url:"/project/update",method:"post",data:t})}function m(t){return Object(r["a"])({url:"/project/info",method:"post",data:t})}function f(t){return Object(r["a"])({url:"/project/delete",method:"post",data:t})}},3672:function(t,e,a){"use strict";a("eb4d")},"424e":function(t,e,a){"use strict";a.d(e,"h",(function(){return n})),a.d(e,"i",(function(){return o})),a.d(e,"e",(function(){return i})),a.d(e,"m",(function(){return s})),a.d(e,"a",(function(){return c})),a.d(e,"g",(function(){return u})),a.d(e,"c",(function(){return l})),a.d(e,"j",(function(){return d})),a.d(e,"b",(function(){return m})),a.d(e,"n",(function(){return f})),a.d(e,"f",(function(){return p})),a.d(e,"d",(function(){return g})),a.d(e,"k",(function(){return h})),a.d(e,"l",(function(){return b}));var r=a("b775");function n(t){return Object(r["a"])({url:"/document/pageDocument",method:"post",data:t})}function o(t){return Object(r["a"])({url:"/document/search",method:"post",data:t})}function i(t){return Object(r["a"])({url:"/document/export",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/document/update",method:"post",data:t})}function c(t){return Object(r["a"])({url:"/document/create",method:"post",data:t})}function u(t){return Object(r["a"])({url:"/document/info",method:"post",data:t})}function l(t){return Object(r["a"])({url:"/document/delete",method:"post",data:t})}function d(t){return Object(r["a"])({url:"/document/category/search",method:"post",data:t})}function m(t){return Object(r["a"])({url:"/document/category/create",method:"post",data:t})}function f(t){return Object(r["a"])({url:"/document/category/update",method:"post",data:t})}function p(t){return Object(r["a"])({url:"/document/category/info",method:"post",data:t})}function g(t){return Object(r["a"])({url:"/document/category/delete",method:"post",data:t})}function h(t){return Object(r["a"])({url:"/template/searchList",method:"post",data:t})}function b(t){return Object(r["a"])({url:"/document/searchlistDoc",method:"post",data:t})}},5869:function(t,e,a){"use strict";a.r(e);var r=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)},n=[],o=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)},c=[],u=(a("a9e3"),a("8256")),l=a("24d2"),d=a("f6b0"),m=a("424e"),f={components:{Tinymce:u["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(l["j"])(e.dataForm):Object(l["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(l["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(l["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}))}}},p=f,g=(a("ce6c"),a("2877")),h=Object(g["a"])(p,s,c,!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(l["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,o,i,!1,null,null,null)),O=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","min-width":"180"},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","min-width":"180"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间",align:"center",width:"180"}}),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",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"btns"},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(a){return t.btnEdit(e.row)}}},[a("svg-icon",{attrs:{"icon-class":"edit"}}),t._v("编辑")],1),a("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(a){return t.btnDelete(e.row.id)}}},[a("svg-icon",{attrs:{"icon-class":"delete"}}),t._v("删除")],1)],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)],1)},_=[],q=(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:[]}},mounted:function(){this.search(),this.init()},methods:{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(l["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(l["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(l["g"])().then((function(e){200===e.status&&(t.categoryList=e.data.dataList)}))}}}),w=q,S=(a("d2dd"),Object(g["a"])(w,C,_,!1,null,null,null)),k=S.exports,L={components:{dataSearch:O,dataList:k},data:function(){return{queryForm:{page:1,pageSize:10,name:"",category_id:"",status:"",isUpdate:!1}}},methods:{setQuery:function(t){this.queryForm=t}}},x=L,I=(a("3672"),Object(g["a"])(x,r,n,!1,null,null,null));e["default"]=I.exports},"91a5":function(t,e,a){},ce6c:function(t,e,a){"use strict";a("1831")},d2dd:function(t,e,a){"use strict";a("91a5")},eb4d:function(t,e,a){},f6b0:function(t,e,a){"use strict";a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return o}));var r=a("b775");function n(t){return Object(r["a"])({url:"/customer/search",method:"post",data:t})}function o(){return Object(r["a"])({url:"/customer/sync",method:"post"})}},f7d1:function(t,e,a){"use strict";a("035f")}}]);
|