1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d9defec"],{"12f0":function(t,e,a){var s=a("6f3e");"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var o=a("499e").default;o("74ca6a50",s,!0,{sourceMap:!1,shadowMode:!1})},"351b":function(t,e,a){var s=a("c9ff");"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var o=a("499e").default;o("d53f4c42",s,!0,{sourceMap:!1,shadowMode:!1})},"4c60":function(t,e,a){"use strict";var s=a("b0ea"),o=a.n(s);o.a},"6f3e":function(t,e,a){var s=a("24fb");e=s(!1),e.push([t.i,".addUser-form[data-v-319bf83d]{padding:20px;display:flex;justify-content:flex-start;flex-wrap:wrap}.addUser-form .custom-form-item[data-v-319bf83d]{width:100%}.addUser-form .custom-form-item .ivu-form-item-label[data-v-319bf83d]{margin:0 0}.addUser-form .custom-form-item .custom[data-v-319bf83d]{width:100%}.addUser-form .custom-form-item .custom[data-v-319bf83d] .el-input__inner,.addUser-form .custom-form-item .custom[data-v-319bf83d] .el-range-input{font-size:14px!important;color:#515a6e!important}.addUser-form .custom-form-item .tree-comment[data-v-319bf83d]{height:420px;overflow-y:scroll;overflow-x:hidden;text-align:left}.addUser-form .custom-form-item2[data-v-319bf83d],.addUser-form .custom-form-item2 .custom[data-v-319bf83d]{width:100%}.addUser-form .custom-form-item2 .custom[data-v-319bf83d] .el-input__inner,.addUser-form .custom-form-item2 .custom[data-v-319bf83d] .el-range-input{font-size:14px!important;color:#515a6e!important}.addUser-form .custom-form-item2 .ivu-form-item-label[data-v-319bf83d]{margin:0 0}.addUser-form .custom-form-item2 .tree-comment[data-v-319bf83d]{height:420px;overflow-y:scroll;overflow-x:hidden;text-align:left}.addUser-form .ivu-list-item-action[data-v-319bf83d]{margin-left:0;flex:2}.success_i[data-v-319bf83d]{color:#bebe84!important}.error_i[data-v-319bf83d]{color:red}",""]),t.exports=e},"98f9":function(t,e,a){"use strict";var s=a("351b"),o=a.n(s);o.a},a522:function(t,e,a){"use strict";var s=a("12f0"),o=a.n(s);o.a},b0ea:function(t,e,a){var s=a("dc90");"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var o=a("499e").default;o("3edc2368",s,!0,{sourceMap:!1,shadowMode:!1})},b7bc:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"project"},[a("ProjectSearch",{attrs:{showAddBoolean:!0},on:{searchEvent:t.searchEvent,openAddPop:t.openAddRolePop}}),a("Card",{staticClass:"userList-card",attrs:{bordered:!1,shadow:!0}},[a("div",{staticClass:"header-top-box",attrs:{slot:"title"},slot:"title"},[a("div",{staticClass:"title-value"},[t._v("项目列表")]),a("div",[t.$idAdminPower()?a("Button",{directives:[{name:"auth",rawName:"v-auth",value:"project:add",expression:"'project:add'"}],staticStyle:{"margin-right":"10px"},attrs:{type:"primary",icon:"ios-add-circle-outline"},on:{click:function(e){return t.openAddRolePop()}}},[t._v("新增项目")]):t._e()],1)]),a("Table",{ref:"selection",staticClass:"iv-custom-table",attrs:{columns:t.columns1,border:!0,data:t.tableList},on:{"on-sort-change":t.sortEvent},scopedSlots:t._u([{key:"action",fn:function(e){var s=e.row;e.index;return t.$idAdminPower()?a("div",{staticClass:"iv-button-box"},[a("Button",{directives:[{name:"auth",rawName:"v-auth",value:"project:update",expression:"'project:update'"}],staticClass:"iv-custom-button",attrs:{type:"primary"},on:{click:function(e){return t.openEditRolePop(s)}}},[t._v("编辑")]),a("Button",{directives:[{name:"auth",rawName:"v-auth",value:"project:del",expression:"'project:del'"}],staticClass:"iv-custom-button",attrs:{type:"error"},on:{click:function(e){return t.openDeletePop(s)}}},[t._v("删除")]),a("Button",{directives:[{name:"show",rawName:"v-show",value:1==s.status,expression:"row.status == 1"},{name:"auth",rawName:"v-auth",value:"project:update",expression:"'project:update'"}],staticClass:"iv-custom-button",attrs:{type:"warning"},on:{click:function(e){return t.endProject(s)}}},[t._v("结束")]),a("Button",{directives:[{name:"auth",rawName:"v-auth",value:"project:update",expression:"'project:update'"}],staticClass:"iv-custom-button",attrs:{type:"info"},on:{click:function(e){return t.getMsg(s,0)}}},[t._v("信息")])],1):a("div",{staticClass:"iv-button-box"},[a("Button",{staticClass:"iv-custom-button",attrs:{type:"info"},on:{click:function(e){return t.getMsg(s,1)}}},[t._v("信息")])],1)}},{key:"projectType",fn:function(e){var s=e.row;e.index;return a("div",{staticClass:"iv-button-box"},[t._v(" "+t._s(t.$formateDict(s.type,t.allList.project_type,1,">"))+" ")])}},{key:"shenhe",fn:function(e){var s=e.row;e.index;return a("div",{staticClass:"iv-button-box"},[2==s.status?a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"请在抽取记录评分~",placement:"top-start"}},[a("el-tag",{staticStyle:{cursor:"pointer"},attrs:{type:t.typeList[Number(s.status)],effect:"dark"},on:{click:function(e){return t.goToDpRecord(s)}}},[t._v(" "+t._s(t.$formateDict(s.status,t.allList.project_status))+" ")])],1):a("el-tag",{attrs:{type:t.typeList[Number(s.status)],effect:"dark"}},[t._v(" "+t._s(t.$formateDict(s.status,t.allList.project_status))+" ")])],1)}}],null,!0)}),a("div",{staticClass:"ivu-card-footer"},[a("Page",{attrs:{"class-name":"iv-custom-page",current:t.searchData.pageNum,total:t.searchData.totalNum,size:"small","show-total":"","show-sizer":"","show-elevator":""},on:{"on-change":t.pageNumChang,"on-page-size-change":t.sizeChange}})],1),t.displayPop?a("Modal",{attrs:{transfer:!1,title:t.popTitle,width:"760px",closable:!1},model:{value:t.displayPop,callback:function(e){t.displayPop=e},expression:"displayPop"}},[a("AddProjectPop",{ref:"AddprojectPopRefs"}),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{type:"error"},on:{click:t.closePop}},[t._v("取消")]),"add"===t.saveBtType?a("Button",{attrs:{type:"primary"},on:{click:t.addProjectSave}},[t._v("确认")]):t._e(),"edit"===t.saveBtType?a("Button",{attrs:{type:"primary"},on:{click:t.editProjectSave}},[t._v("确认")]):t._e()],1)],1):t._e(),t.displayPopMessage?a("Modal",{attrs:{transfer:!1,title:t.titleMsg,width:"410px"},model:{value:t.displayPopMessage,callback:function(e){t.displayPopMessage=e},expression:"displayPopMessage"}},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[a("el-tag",{attrs:{effect:"dark",type:"success"}},[t._v(t._s(t.selectedProject.name))])],1)]),t.messageList.length>0?a("div",{staticClass:"messageDiv"},t._l(t.messageList,(function(e,s){return a("div",{key:s,staticClass:"message"},[a("div",{staticClass:"name"},[a("el-tag",{attrs:{type:"primary",effect:"dark"}},[t._v(t._s(t.expertList[e.expertId]))])],1),a("div",{staticClass:"content"},[a("div",[t._v(t._s(e.receiveTime))]),a("i",{staticClass:"el-icon-message"},[t._v(t._s(e.doctorMessage))]),a("i",{class:e.icon})])])})),0):a("el-empty",{attrs:{description:"暂无信息"}})],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{on:{click:function(e){t.displayPopMessage=!1}}},[t._v("关闭")])],1)],1):t._e()],1)],1)},o=[],i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("Form",{ref:"addRoleForm",staticClass:"addUser-form",attrs:{model:t.formData,rules:t.ruleFormData,"label-width":120,inline:!0}},[a("FormItem",{staticClass:"custom-form-item",attrs:{prop:"name",label:"项目名称:"}},[a("Input",{attrs:{type:"text",placeholder:"请输入项目名称"},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1),a("FormItem",{staticClass:"custom-form-item",staticStyle:{"text-align":"left"},attrs:{prop:"date",label:"项目日期:"}},[a("el-date-picker",{staticClass:"custom",staticStyle:{"text-align":"left"},attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd HH:mm:ss","end-placeholder":"结束日期"},model:{value:t.formData.date,callback:function(e){t.$set(t.formData,"date",e)},expression:"formData.date"}})],1),a("FormItem",{staticClass:"custom-form-item",attrs:{prop:"originator",label:"发起单位:"}},[a("Input",{attrs:{type:"text",placeholder:"请输入项目发起单位"},model:{value:t.formData.originator,callback:function(e){t.$set(t.formData,"originator",e)},expression:"formData.originator"}})],1),a("FormItem",{staticClass:"custom-form-item2",staticStyle:{"text-align":"left"},attrs:{prop:"type",label:"项目类型:"}},[a("el-cascader",{staticClass:"custom",attrs:{options:t.allList.project_type1,props:{label:"val",value:"k"},clearable:""},on:{change:t.handleChange},model:{value:t.formData.type,callback:function(e){t.$set(t.formData,"type",e)},expression:"formData.type"}})],1),a("FormItem",{staticClass:"custom-form-item",attrs:{prop:"projectExpertNum",label:"项目人数:"}},[a("InputNumber",{staticClass:"custom",attrs:{min:1},model:{value:t.formData.projectExpertNum,callback:function(e){t.$set(t.formData,"projectExpertNum",e)},expression:"formData.projectExpertNum"}})],1),a("FormItem",{staticClass:"custom-form-item",attrs:{label:"所属区域:",prop:"region"}},[a("Cascader",{staticClass:"lg-fm-Cascader",attrs:{value:t.formData.region,transfer:!1,data:t.regionList,"load-data":t.loadData,placeholder:"所属区域",filterable:""},model:{value:t.formData.region,callback:function(e){t.$set(t.formData,"region",e)},expression:"formData.region"}})],1),a("FormItem",{staticClass:"custom-form-item",attrs:{label:"项目地址:",prop:"address"}},[a("Input",{attrs:{type:"textarea",rows:2,placeholder:""},model:{value:t.formData.address,callback:function(e){t.$set(t.formData,"address",e)},expression:"formData.address"}})],1),a("FormItem",{staticClass:"custom-form-item",attrs:{prop:"remarks",label:"项目描述:"}},[a("Input",{attrs:{type:"textarea",rows:2,placeholder:""},model:{value:t.formData.remarks,callback:function(e){t.$set(t.formData,"remarks",e)},expression:"formData.remarks"}})],1),a("FormItem",{staticClass:"custom-form-item",attrs:{label:"选择专家:"}},[a("Input",{attrs:{type:"textarea",rows:2,placeholder:""},on:{"on-focus":t.showDoctorSelect},model:{value:t.formData.expertNames,callback:function(e){t.$set(t.formData,"expertNames",e)},expression:"formData.expertNames"}})],1),a("FormItem",{staticClass:"custom-form-item",attrs:{label:"发送信息:"}},[a("CheckboxGroup",{staticStyle:{"text-align":"left"},on:{"on-change":t.changeSocial},model:{value:t.formData.social,callback:function(e){t.$set(t.formData,"social",e)},expression:"formData.social"}},[a("Checkbox",{attrs:{label:1}},[a("Icon",{attrs:{type:"md-phone-portrait"}}),a("span",[t._v("短信")])],1)],1)],1),t.displayPop?a("Modal",{attrs:{transfer:!1,title:"专家抽取",width:"1200px"},model:{value:t.displayPop,callback:function(e){t.displayPop=e},expression:"displayPop"}},[a("div",{staticStyle:{display:"flex","min-height":"600px"}},[a("div",{staticStyle:{flex:"2.5"}},[a("Scroll",{attrs:{height:"600"}},[a("List",{attrs:{header:"已选择专家("+t.selectedDoctorList.length+")",border:""}},t._l(t.selectedDoctorList,(function(e,s){return a("ListItem",{key:s,staticStyle:{padding:"10px"}},[a("span",{staticStyle:{flex:"3"}},[a("el-popover",{attrs:{placement:"top",width:"600",trigger:"click"}},[a("el-descriptions",{attrs:{title:"用户信息",column:2,border:""}},[a("el-descriptions-item",{attrs:{"label-class-name":"my-label","content-class-name":"my-content"}},[a("template",{slot:"label"},[a("i",{staticClass:"el-icon-paperclip"}),t._v(" 用户名 ")]),t._v(" "+t._s(e.name)+" ")],2),a("el-descriptions-item",{attrs:{label:""}},[a("template",{slot:"label"},[a("i",{staticClass:"el-icon-paperclip"}),t._v(" 手机号 ")]),t._v(" "+t._s(e.phone)+" ")],2),a("el-descriptions-item",{attrs:{label:"",span:2}},[a("template",{slot:"label"},[a("i",{staticClass:"el-icon-paperclip"}),t._v(" 所属区域 ")]),t._v(" "+t._s(e.fullPosition)+" ")],2),a("el-descriptions-item",{attrs:{label:"",span:2}},[a("template",{slot:"label"},[a("i",{staticClass:"el-icon-paperclip"}),t._v(" 研究方向 ")]),t._v(" "+t._s(e.researchDirection)+" ")],2),a("el-descriptions-item",{attrs:{label:"",span:2}},[a("template",{slot:"label"},[a("i",{staticClass:"el-icon-paperclip"}),t._v(" 擅长项目分类 ")]),t._v(" "+t._s(t.$formateDict(e.projectType,t.allList.project_type,1,",",1))+" ")],2)],1),a("el-tag",{attrs:{slot:"reference",type:"primary",effect:"dark"},slot:"reference"},[t._v(t._s(e.phone)+"-"+t._s(e.name))])],1)],1),a("template",{staticStyle:{flex:"1"},slot:"action"},[a("li",[t.selectedDoctorMsg[e.id]&&t.selectedDoctorMsg[e.id].length>0?a("el-popover",{staticStyle:{"margin-right":"10px"},attrs:{placement:"right",width:"200",trigger:"click"}},[a("div",t._l(t.selectedDoctorMsg[e.id],(function(e,s){return a("div",{key:s,staticStyle:{"font-weight":"bold"}},[a("div",[t._v(t._s(e.receiveTime))]),a("i",{staticClass:"el-icon-message"},[t._v(t._s(e.doctorMessage))]),a("i",{class:e.icon})])})),0),a("el-badge",{staticClass:"item",attrs:{slot:"reference",value:t.selectedDoctorMsg[e.id].length,type:"warning"},slot:"reference"},[a("el-button",{attrs:{size:"mini",icon:"el-icon-chat-dot-round"}})],1)],1):t._e(),a("i",{staticClass:"el-icon-remove",staticStyle:{"font-size":"16px"},attrs:{title:"移除该专家"},on:{click:function(e){return t.removeDoctor(s)}}})],1)])],2)})),1)],1)],1),a("div",{staticStyle:{flex:"7.5"}},[a("DoctorSearch",{ref:"doctorSearchRefs",on:{selectDoctor:t.selectDoctor}})],1)]),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{type:"primary"},on:{click:t.save}},[t._v("确定")]),a("Button",{attrs:{type:"error"},on:{click:function(e){t.displayPop=!1}}},[t._v("取消")])],1)]):t._e()],1)},r=[],c=a("2f62"),l=a("bca8"),n={name:"AddUserPop",components:{DoctorSearch:l["a"]},data(){const t=(t,e,a)=>{e&&0!=e.length?a():a("参数不能为空")};return{formData:{id:"",name:"",date:[],originator:"",type:"",region:[],address:"",expertNames:"",message:"",social:["1"],projectExpertNum:1},ruleFormData:{name:[{required:!0,validator:t,trigger:"blur"}],date:[{required:!0,validator:t,trigger:"change"}],originator:[{required:!0,validator:t,trigger:"blur"}],address:[{required:!0,validator:t,trigger:"blur"}],type:[{required:!0,validator:t,trigger:"change"}],region:[{required:!0,validator:t,trigger:"change"}],projectExpertNum:[{required:!0,validator:t,trigger:"blur"}]},regionList:[],doctorList:[],displayPop:!1,selectedDoctorList:[],allList:{},selectedDoctorMsg:{}}},computed:{...Object(c["b"])({dictSexList:t=>{const e=t.dictTypeList.filter(t=>"sex"===t.type?t:null);return e},dictIndustryList:t=>{const e=t.dictTypeList.filter(t=>"industry"===t.type?t:null);return e},rolesList:t=>t.rolesList})},mounted(){this.getDictionaryData(),this.allList=this.$filterDict(["project_type"],this.$Store.getters.getDictTypeList),this.allList.project_type1=this.allList.project_type.filter(t=>"项目分类"==t.val)[0].children},methods:{changeSocial(){console.log(this.formData.social)},async getCityByProvinceId(t){let e="";if(t.provinceId){const a=await this.$Api.areaGetMap.getProvinceList();if("200"===a.code){let s=a.data.filter(e=>e.id==t.provinceId);e=s.length>0?s[0].name:""}const s=await this.$Api.areaGetMap.getCityByProvinceId({id:t.provinceId});if("200"===s.code){let a=s.data.filter(e=>e.id==t.cityId);e+="-"+(a.length>0?a[0].name:"")}const o=await this.$Api.areaGetMap.getCityByProvinceId({id:t.cityId});if("200"===o.code){let a=o.data.filter(e=>e.id==t.areaId);e+="-"+(a.length>0?a[0].name:"")}}return e},async save(){if(this.selectedDoctorList.length>0){let t=this.selectedDoctorList.map(t=>t.name);this.formData.expertNames=t.join(",")}else this.formData.expertNames="",this.formData.expertIds="";this.displayPop=!1},selectDoctor(t){let e=this.selectedDoctorList.filter(e=>{if(e.id==t.id)return this.selectedDoctorMsg[e.id]=[],e.id==t.id});0==e.length&&this.selectedDoctorList.push(t)},removeDoctor(t){this.selectedDoctorList.splice(t,1)},handleChange(t){console.log(t)},showDoctorSelect(){this.displayPop=!0,0==this.selectedDoctorList.length&&(this.formData.expertNames=""),this.$nextTick(()=>{this.formData.type.length>0&&(this.$refs.doctorSearchRefs.formData.projectType=[this.formData.type]),this.getProjectMsg(this.formData.id)})},async industryEvent(t){const e=this.$store.state.dictTypeList;let a={};for(var s in this.dictIndustryList)this.dictIndustryList[s].k===t.value&&(a=this.dictIndustryList[s]);const o=e.filter(t=>{if("applyEnterpriseType"===t.type&&t.pid===a.id)return t});this.applyEnterpriseTypeList=o},async getProjectMsg(t){this.selectedDoctorList.map(t=>{this.selectedDoctorMsg[t.id]=[]});const e=await this.$Api.projectGetMap.smsQuery({businessId:t});200==e.code&&e.data.length>0&&e.data.map(t=>{let e=null!=t.receiveTime?t.receiveTime:new Date;var a=new Date(e).getTime()-new Date(t.sendTime).getTime(),s=a%864e5,o=s%36e5,i=Math.floor(o/6e4);i>30?(t.outTime=!0,t.doctorMessage="超时,已拒绝!!",t.icon="el-icon-error error_i"):i<=30&&(t.outTime=!1,t.doctorMessage="暂未回复!!",t.icon="el-icon-loading",null!=t.content&&(t.doctorMessage=1==t.content?"已同意":"已拒绝",t.icon=1==t.content?"el-icon-success success_i":"el-icon-error error_i")),this.selectedDoctorMsg.hasOwnProperty(t.expertId)&&(this.selectedDoctorMsg[t.expertId]=[...this.selectedDoctorMsg[t.expertId],t])})},async editFromData(t){await JSON.parse("["+t.provinceId+","+t.cityId+","+t.areaId+"]");if(t.type=t.type.split(","),t.date=[],t.date.push(t.startTime),t.date.push(t.endTime),t.region=[],t.region.push(t.provinceId),t.region.push(t.cityId),t.region.push(t.areaId),this.formData=t,t.expertNames&&t.expertIds){let e=t.expertIds.split(",");this.selectedDoctorList=await Promise.all(e.map(t=>(this.selectedDoctorMsg[t]=[],this.getDoctorInfoById(t))))}this.getProjectMsg(t.id)},async getDoctorInfoById(t){const e=await this.$Api.doctorGetMap.getDoctorById(t);if(200==e.code)return e.data.fullPosition=await this.getCityByProvinceId(e.data),e.data},addFromData(){this.showPassword=!0,this.formData={id:"",name:"",date:[],originator:"",type:"",region:[],address:""}},async getDictionaryList(){const t=await this.$Api.publicGetMap.dictionaryData({type:"sex"});"200"===t.code&&(this.sexList=t.data.records);const e=await this.$Api.publicGetMap.dictionaryData({type:"industry"});"200"===e.code&&(this.industryList=e.data.records);const a=await this.$Api.roleGetMap.getAllRoles();a.code},async backData(){const t=await JSON.parse(JSON.stringify(this.formData));await this.$utils.breadthQuery(this.regionList,t.region);if(t.provinceId=t.region[0],t.cityId=t.region[1],t.areaId=t.region[2],t.startTime=t.date[0],t.endTime=t.date[1],t.type=t.type.join(","),delete t.region,delete t.date,this.selectedDoctorList.length>0){let e=this.selectedDoctorList.map(t=>t.id),a=this.selectedDoctorList.map(t=>t.name),s=await Promise.all(this.selectedDoctorList.map(async t=>{if(t.phone&&null!=t.phone)return t.phone;const e=await this.$Api.roleGetMap.getUserById(t.userId);return e.phone}));t.expertIds=e.join(","),t.expertNames=a.join(","),t.phoneNumbers=s.join(","),t.isSendSms=t.social&&t.social.length>0?1:0}return t},async getDictionaryData(){const t=await this.$Api.areaGetMap.getProvinceList();if("200"===t.code){let e=t.data.map(t=>({value:t.id,label:t.name,children:[],loading:!1,type:"shengJi"}));this.regionList=e}},async loadData(t,e){t.loading=!0;const a=await this.$Api.areaGetMap.getCityByProvinceId({id:t.value});if("200"===a.code){let s=[];"shengJi"===t.type?s=a.data.map(t=>({value:t.id,label:t.name,children:[],loading:!1,type:"shiJi"})):"shiJi"===t.type&&(s=a.data.map(t=>({value:t.id,label:t.name,type:"xianJi"}))),t.children=s,t.loading=!1,e()}}}},d=n,p=(a("a522"),a("2877")),m=Object(p["a"])(d,i,r,!1,null,"319bf83d",null),u=m.exports,h=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("Card",{staticClass:"us-card",attrs:{bordered:!1,shadow:!0}},[a("Form",{staticClass:"pt-card-form",attrs:{"label-width":110,inline:!0}},[a("FormItem",{staticClass:"pt-form-item",attrs:{label:"名称"}},[a("Input",{attrs:{type:"text",placeholder:"项目名称",clearable:""},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1),a("FormItem",{staticClass:"custom-form-item",attrs:{prop:"date",label:"项目日期:"}},[a("el-date-picker",{staticClass:"custom",attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd HH:ss:mm"},model:{value:t.formData.date,callback:function(e){t.$set(t.formData,"date",e)},expression:"formData.date"}})],1),a("FormItem",{staticClass:"custom-form-item",attrs:{label:"项目分类:"}},[a("el-cascader",{staticClass:"custom",attrs:{options:t.allList.project_type,props:{label:"val",value:"k"},clearable:""},on:{change:t.handleChange},model:{value:t.formData.type,callback:function(e){t.$set(t.formData,"type",e)},expression:"formData.type"}})],1),a("FormItem",{staticClass:"pt-form-item",attrs:{label:"项目状态:"}},[a("Select",{staticClass:"lg-fm-item-Select",attrs:{transfer:!1,placeholder:"请选择",clearable:""},model:{value:t.formData.status,callback:function(e){t.$set(t.formData,"status",e)},expression:"formData.status"}},t._l(t.allList.project_status,(function(e){return a("Option",{key:e.k,attrs:{value:e.k}},[t._v(t._s(e.val))])})),1)],1),a("Button",{directives:[{name:"auth",rawName:"v-auth",value:"project:query",expression:"'project:query'"}],attrs:{icon:"md-search",type:"primary"},on:{click:t.searchEvent}},[t._v("查询")])],1)],1)},f=[],g={name:"ProjectSearch",data(){return{formData:{name:"",type:[],status:"",date:[]},allList:{}}},created(){this.allList=this.$filterDict(["project_status","project_type"],this.$Store.getters.getDictTypeList),this.allList.project_type=this.allList.project_type.filter(t=>"项目分类"==t.val)[0].children},methods:{handleChange(t){console.log(t)},addEvent(){this.$emit("openAddPop")},searchEvent(){this.$emit("searchEvent",this.formData)}}},v=g,y=(a("4c60"),Object(p["a"])(v,h,f,!1,null,"26318660",null)),D=y.exports,b=a("b72c"),x={name:"UserList",components:{AddProjectPop:u,ProjectSearch:D,ProjectPopScore:b["a"]},data(){return{columns1:[{type:"index",title:"序号",align:"center"},{title:"项目名称",key:"name",align:"center"},{title:"开始时间",key:"startTime",align:"center"},{title:"结束时间",key:"endTime",align:"center"},{title:"项目分类",slot:"projectType",width:260,align:"center"},{title:"状态",slot:"shenhe",width:200,align:"center"},{title:"创建时间",key:"createTime",width:200,align:"center",sortable:"custom"},{title:"操作",slot:"action",width:260,align:"center"}],tableList:[],displayPop:!1,popTitle:"",saveBtType:"add",searchData:{pageNum:1,pageSize:10,pageTole:0,totalNum:0,isAsc:!1},allList:{},model1:"",displayPopScore:!1,popScoreTitle:"",typeList:["","info","warning","success"],displayPopMessage:!1,messageList:[],expertList:{},titleMsg:"专家回复信息",selectedProject:{}}},mounted(){this.doSearch(),this.allList=this.$filterDict(["project_status","project_type"],this.$Store.getters.getDictTypeList)},methods:{async sortEvent(t,e,a){this.searchData.isAsc=!this.searchData.isAsc,await this.doSearch()},async getDoctorInfoById(t){const e=await this.$Api.doctorGetMap.getDoctorById(t);if(200==e.code)return e.data},async getMsg(t,e){if(this.selectedProject=t,this.expertList={},t.expertIds){let a=t.expertIds.split(",");this.expertList={};let s=[],o={businessId:t.id};if(0==e)s=await Promise.all(a.map(t=>this.getDoctorInfoById(t))),this.titleMsg="专家回复信息";else{let t={offset:1,limit:1,isAsc:this.searchData.isAsc,orderColumn:"u.createTime"};const e=await this.$Api.doctorGetMap.getDoctorList(t);console.log(e),s=e.data.records,o.expertId=s[0].id,this.titleMsg="我的回复信息"}s.map(t=>{this.expertList[t.id]=`${t.name}-${t.phone}`,this.expertList[t.id+"_name"]=""+t.name}),this.messageList=[];const i=await this.$Api.projectGetMap.smsQuery(o);200==i.code&&(this.messageList=i.data,this.messageList.map(async t=>{let e=null!=t.receiveTime?t.receiveTime:new Date;var a=new Date(e).getTime()-new Date(t.sendTime).getTime(),s=a%864e5,o=s%36e5,i=Math.floor(o/6e4);console.log(i),i>30?(t.outTime=!0,t.doctorMessage="超时,已拒绝!!",t.icon="el-icon-error error_i"):i<=30&&(t.outTime=!1,t.doctorMessage="暂未回复!!",t.icon="el-icon-loading",null!=t.content&&(t.doctorMessage=1==t.content?"已同意":"已拒绝",t.icon=1==t.content?"el-icon-success success_i":"el-icon-error error_i"))}))}this.displayPopMessage=!0},async goToDpRecord(t){this.$router.push({path:"/dpRecord",query:{name:t.name}})},async endProject(t){this.$confirm("此操作将结束项目,状态由进行中->已结束待评分, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(async()=>{t.status=2;const e=await this.$Api.projectGetMap.addEditProject(t);"200"===e.code&&(this.$Message.success({content:"编辑项目成功!"}),this.doSearch())}).catch(()=>{})},openScore(t){this.displayPopScore=!0,this.popScoreTitle=t.name+"-项目评分",this.$nextTick(()=>{this.$refs.ProjectPopScoreRefs.getProjectData(t.id)})},downloadProject(){},searchEvent(t){this.searchData.name=t.name,this.searchData.type=t.type.length>0?t.type.join(","):"",this.searchData.status=t.status,this.searchData.startTime=null!=t.date&&t.date.length>0?t.date[0]:"",this.searchData.endTime=null!=t.date&&t.date.length>0?t.date[1]:"",this.doSearch()},async examineEvent(t){let e={id:t.id,status:t.status};const a=await this.$Api.roleGetMap.updateUsers(e);"200"===a.code&&(this.$Message.success({content:"修改用户状态成功!新注册审核用户请在“编辑”中添加角色!",duration:4}),this.doSearch())},async openEditRolePop(t){if(0!=t.status){const e=await this.$confirm("此项目状态已经开始, 是否继续修改信息?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).catch(()=>{});if(e){const e=await this.$Api.projectGetMap.getProjectById(t.id);this.saveBtType="edit",this.popTitle="编辑项目--"+t.name,this.displayPop=!0,this.$nextTick(()=>{this.$refs.AddprojectPopRefs.editFromData(e.data)})}}else{const e=await this.$Api.projectGetMap.getProjectById(t.id);this.saveBtType="edit",this.popTitle="编辑项目--"+t.name,this.displayPop=!0,this.$nextTick(()=>{this.$refs.AddprojectPopRefs.editFromData(e.data)})}},openDeletePop(t){this.$Modal.confirm({title:"删除--"+t.name,content:"<p>确认删除项目"+t.name+"</p>",onOk:()=>{this.$Api.projectGetMap.deleteProject(t.id).then(e=>{"200"===e.code&&(this.$Message.success({content:t.name+"--项目删除成功!",duration:2}),this.doSearch())})},onCancel:()=>{}})},openAddRolePop(){this.displayPop=!0,this.saveBtType="add",this.$nextTick(()=>{this.popTitle="新增项目",this.$refs.AddprojectPopRefs.addFromData()})},closePop(){this.displayPop=!1},async addProjectSave(){const t=await this.$refs.AddprojectPopRefs.backData(),e=await this.$refs.AddprojectPopRefs.$refs.addRoleForm.validate();if(e){t.status=0;const e=await this.$Api.projectGetMap.addEditProject(t);"200"===e.code&&(this.$Message.success({content:"新增项目成功!"}),this.displayPop=!1,this.doSearch())}},async editProjectSave(){const t=await this.$refs.AddprojectPopRefs.backData(),e=await this.$refs.AddprojectPopRefs.$refs.addRoleForm.validate();if(e){const e=await this.$Api.projectGetMap.addEditProject(t);"200"===e.code&&(this.$Message.success({content:"编辑项目成功!"}),this.displayPop=!1,this.doSearch())}},pageNumChang(t){this.searchData.pageNum=t,this.doSearch()},sizeChange(t){this.searchData.pageSize=t,this.searchData.pageNum=1,this.doSearch()},async doSearch(){let t={offset:this.searchData.pageNum,limit:this.searchData.pageSize,name:this.searchData.name,type:this.searchData.type,status:this.searchData.status,startTime:this.searchData.startTime,endTime:this.searchData.endTime,orderColumn:"p.createTime",isAsc:this.searchData.isAsc};const e=await this.$Api.projectGetMap.getProjectList(t);"200"===e.code&&(this.tableList=e.data.records,this.searchData.pageTole=e.data.pages,this.searchData.pageNum=e.data.current,this.searchData.totalNum=e.data.total)},handleSelectAll(t){this.$refs.selection.selectAll(t)}}},w=x,j=(a("98f9"),Object(p["a"])(w,s,o,!1,null,null,null));e["default"]=j.exports},c9ff:function(t,e,a){var s=a("24fb");e=s(!1),e.push([t.i,".project .userList-card{\n /*!*overflow-y: auto;*!*/}.project .userList-card .header-top-box{height:auto;display:flex;justify-content:space-between}.project .userList-card .header-top-box .title-value{line-height:32px;text-align:left;font-size:24px;color:#2760b7;font-weight:700}.project .userList-card .iv-custom-table .ivu-table .ivu-table-tip td{width:100%!important}.project .userList-card .iv-custom-table .iv-button-box{position:relative;width:100%;justify-content:space-around}.project .userList-card .iv-custom-table .iv-button-box .iv-custom-button{margin:0 4px}.project .userList-card .ivu-card-footer{margin-top:10px}.project .userList-card .ivu-card-footer .footer-botton{float:left;margin-right:10px;color:#4862ea}.project .userList-card .ivu-card-footer .footer-botton:focus{box-shadow:0 0 0 0 transparent;color:#131d26}.project .messageDiv{height:400px;overflow-y:auto}.project .messageDiv .message{display:flex;border-bottom:1px dashed #bebe84;align-items:center}.project .messageDiv .message .name{flex:4;text-align:left;margin:10px 0}.project .messageDiv .message .content{flex:4;text-align:right;padding-right:10px}.project .messageDiv .success_i{color:#bebe84!important}.project .messageDiv .error_i{color:red}",""]),t.exports=e},dc90:function(t,e,a){var s=a("24fb");e=s(!1),e.push([t.i,".us-card[data-v-26318660]{margin-bottom:14px}.us-card .ivu-card-body .pt-card-form[data-v-26318660]{width:100%;text-align:left}.us-card .ivu-card-body .pt-card-form .pt-form-item[data-v-26318660]{width:280px;min-width:200px;margin-bottom:0}.us-card .ivu-card-body .pt-card-form .custom[data-v-26318660] .el-input__inner,.us-card .ivu-card-body .pt-card-form .custom[data-v-26318660] .el-range-input{font-size:14px!important;color:#515a6e!important}",""]),t.exports=e}}]);
|