3000.7be68f5b.js 6.4 KB

1
  1. "use strict";(self["webpackChunkyos_manage"]=self["webpackChunkyos_manage"]||[]).push([[3e3],{3e3:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}});var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.onShow}},[e._v("编 辑")]),r("el-drawer",{attrs:{title:"编辑关联竞争对手",visible:e.dialogFormVisible,size:"600px",direction:"rtl","show-close":!1,"append-to-body":""},on:{"update:visible":function(t){e.dialogFormVisible=t},close:e.onClose}},[r("div",{staticClass:"drawer__panel"},[r("el-row",{attrs:{gutter:20}},[r("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,size:"mini","label-position":"right","label-width":"90px"}},[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"企业名称:",prop:"enterprisename"}},[r("el-popover",{attrs:{placement:"bottom",width:"580",trigger:"click"},on:{show:e.enterpriseList},model:{value:e.enterpriseShow,callback:function(t){e.enterpriseShow=t},expression:"enterpriseShow"}},[r("el-table",{attrs:{data:e.enterprise.enterpriseData},on:{"row-click":e.enterpriseData}},[r("el-table-column",{attrs:{label:"品牌名称",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.brandname?t.row.brandname:"--"))])]}}])}),r("el-table-column",{attrs:{label:"企业名称",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.enterprisename?t.row.enterprisename:"--"))])]}}])}),r("el-table-column",{attrs:{label:"优势信息",width:"300"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.advantage?t.row.advantage:"--"))])]}}])}),r("el-table-column",{attrs:{label:"劣势信息",width:"300"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.industry?t.row.industry:"--"))])]}}])}),r("el-table-column",{attrs:{label:"备注",width:"300"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.remarks?t.row.remarks:"--"))])]}}])})],1),r("div",{staticClass:"container normal-panel",staticStyle:{"text-align":"right"}},[r("el-pagination",{attrs:{background:"",small:"","current-page":e.enterprise.currentPage,total:e.enterprise.total},on:{"size-change":e.handleSizeChangeProject,"current-change":e.handleCurrentChangeProject}})],1),r("el-input",{attrs:{slot:"reference",autocomplete:"off",placeholder:"请选择企业名称"},on:{input:e.selectEnterprise},slot:"reference",model:{value:e.form.enterprisename,callback:function(t){e.$set(e.form,"enterprisename",t)},expression:"form.enterprisename"}})],1)],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"品牌名称:"}},[r("el-input",{attrs:{autosize:"",placeholder:"品牌名称"},model:{value:e.form.brandname,callback:function(t){e.$set(e.form,"brandname",t)},expression:"form.brandname"}})],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"主要威胁:"}},[r("el-radio-group",{model:{value:e.form.important,callback:function(t){e.$set(e.form,"important",t)},expression:"form.important"}},[r("el-radio",{attrs:{label:1}},[e._v("是")]),r("el-radio",{attrs:{label:0}},[e._v("否")])],1)],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"优势信息:"}},[r("el-input",{attrs:{autosize:"",placeholder:"优势信息"},model:{value:e.form.advantage,callback:function(t){e.$set(e.form,"advantage",t)},expression:"form.advantage"}})],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"劣势信息:"}},[r("el-input",{attrs:{autosize:"",placeholder:"劣势信息"},model:{value:e.form.inferiority,callback:function(t){e.$set(e.form,"inferiority",t)},expression:"form.inferiority"}})],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"备注:"}},[r("el-input",{attrs:{autosize:"",placeholder:"备注"},model:{value:e.form.remarks,callback:function(t){e.$set(e.form,"remarks",t)},expression:"form.remarks"}})],1)],1)],1)],1)],1),r("div",{staticClass:"fixed__btn__panel"},[r("el-button",{staticClass:"normal-btn-width",attrs:{size:"small"},on:{click:e.onClose}},[e._v("取 消")]),r("el-button",{staticClass:"normal-btn-width",attrs:{size:"small",type:"primary"},on:{click:e.onSubmit}},[e._v("确 定")])],1)])],1)},s=[],i={name:"edit",props:["data"],data(){return{enterpriseShow:!1,dialogFormVisible:!1,enterprise:{enterpriseData:[],total:0,currentPage:0},enterpriseParam:{content:{isExport:!1,pageNumber:1,pageSize:20,where:{condition:"",tablefilter:{},sa_projectid:""}},id:20221018164302},form:{enterprisename:"",brandname:"",industry:"",sa_project_competeid:0,sa_projectid:1,contactsid:"",sa_competitorid:1,important:0,advantage:"",inferiority:"",remarks:""},rules:{enterprisename:[{required:!0,message:"还未选择企业",trigger:"change"}]}}},methods:{onShow(){this.dialogFormVisible=!0,console.log(this.data),this.form=Object.assign({},this.form,this.data)},async enterpriseList(){this.enterpriseParam.content.where.sa_projectid=this.data.sa_projectid;const e=await this.$api.requested(this.enterpriseParam);this.enterprise.enterpriseData=e.data,this.enterprise.total=e.total,this.enterprise.currentPage=e.pageNumber,console.log(e)},selectEnterprise(){this.enterpriseParam.content.where.condition=this.form.enterprisename,this.enterpriseList()},enterpriseData(e){this.form=Object.assign({},this.form,e),this.enterpriseShow=!1},onSubmit(){this.form.sa_projectid=this.data.sa_projectid,console.log(this.form),this.$refs.form.validate((async e=>{if(!e)return!1;const t=await this.$api.requested({id:20221019165802,content:this.form});this.tool.showMessage(t,(()=>{this.dialogFormVisible=!1,this.$refs.form.resetFields(),this.form={enterprisename:"",brandname:"",industry:"",sa_project_competeid:0,sa_projectid:"",contactsid:"",sa_competitorid:"",important:0,advantage:"",inferiority:"",remarks:""},this.$emit("updateSuccess")}))}))},onClose(){this.dialogFormVisible=!1,this.$refs.form.resetFields(),this.form={enterprisename:"",brandname:"",industry:"",sa_project_competeid:0,sa_projectid:"",contactsid:"",sa_competitorid:"",important:0,advantage:"",inferiority:"",remarks:""}},handleSizeChangeProject(e){this.enterpriseParam.content.pageSize=e,this.projectList()},handleCurrentChangeProject(e){this.enterpriseParam.content.pageNumber=e,this.projectList()}}},n=i,o=r(43736),l=(0,o.Z)(n,a,s,!1,null,"63315bd6",null),c=l.exports}}]);