QAList.cb36d732.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["QAList"],{6999:function(e,t,a){"use strict";a.r(t);a("ac1f"),a("841c");var n=function(){var e,t,a=this,n=a._self._c;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:a.pictLoading,expression:"pictLoading"}],staticClass:"view",attrs:{id:"web_Video","element-loading-background":"rgba(43, 48, 67, 0.65)","element-loading-spinner":"el-icon-loading"}},[n("div",{staticClass:"crm_search"},[n("el-form",{ref:"form",attrs:{"label-position":"",model:a.search,"label-width":""}},[n("el-row",[n("el-col",{attrs:{span:24,md:24,lg:24}},[n("el-form-item",{staticStyle:{"margin-right":"10px"}},[n("el-select",{staticClass:"crm_search_down_special crm-border-radius-no",attrs:{size:"small",placeholder:a.$t("Placeholder.Choose")},model:{value:a.search.lang,callback:function(e){a.$set(a.search,"lang",e)},expression:"search.lang"}},[n("el-option",{attrs:{label:a.$t("Web_info.All"),value:null},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.cn"),value:"cn"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.zhHant"),value:"zhHant"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.en"),value:"en"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.vn"),value:"vn"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.th"),value:"th"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.ar"),value:"ar"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.de"),value:"de"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.es"),value:"es"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.id"),value:"id"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.ms"),value:"ms"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.ko"),value:"ko"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.pt"),value:"pt"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.fa"),value:"fa"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}}),n("el-option",{attrs:{label:a.$t("Web_info.tr"),value:"tr"},nativeOn:{click:function(e){return a.toSearch.apply(null,arguments)}}})],1)],1),n("el-form-item",{staticStyle:{"margin-right":"10px"}},[n("el-input",{staticClass:"crm-border-radius-no",staticStyle:{"margin-top":"5px"},attrs:{size:"small",clearable:"",placeholder:a.$t("Placeholder.Input")},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&a._k(e.keyCode,"enter",13,e.key,"Enter")?null:a.toSearch.apply(null,arguments)}},model:{value:a.search.subject,callback:function(e){a.$set(a.search,"subject",e)},expression:"search.subject"}},[n("template",{slot:"prepend"},[n("span",{directives:[{name:"t",rawName:"v-t",value:"Label.Question",expression:"'Label.Question'"}],staticClass:"crm-cursor crm-border-radius-no"})])],2)],1),n("el-form-item",[n("el-date-picker",{staticClass:"crm_date_pick crm-border-radius-no",attrs:{type:"daterange",align:"right","unlink-panels":"","value-format":"yyyy-MM-dd","range-separator":"-",size:"small","start-placeholder":a.$t("Placeholder.Start"),"end-placeholder":a.$t("Placeholder.End")},on:{input:a.getSearchDate},model:{value:a.search.date,callback:function(e){a.$set(a.search,"date",e)},expression:"search.date"}}),n("el-button",{staticClass:"crm-border-radius-no crm-border-left-no",attrs:{size:"small",icon:"el-icon-search"},on:{click:a.toSearch}})],1)],1)],1),n("el-form-item",[n("div",{staticClass:"search_action_btn"},[n("span",{staticClass:"crm-cursor",on:{click:a.toNew}},[n("i",{staticClass:"el-icon-plus"}),null!==(e=a.display["R-System-QAList-Add"])&&void 0!==e&&e.show?n("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Add",expression:"'Btn.Add'"}]}):a._e()]),null!==(t=a.display["R-System-QAList-Delete"])&&void 0!==t&&t.show?n("span",{staticClass:"crm-cursor delete",class:{active:this.multipleSelection.length},on:{click:a.toDeleteBatch}},[n("i",{staticClass:"el-icon-minus"}),n("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Delete",expression:"'Btn.Delete'"}]})]):a._e()])])],1)],1),n("el-table",{staticStyle:{width:"100%"},attrs:{data:a.mock_tableData,stripe:""},on:{"selection-change":a.handleSelectionChange}},[n("el-table-column",{attrs:{align:"left",type:"selection",width:"55"}}),n("el-table-column",{attrs:{prop:"",label:a.$i18n.t("Label.Question")},scopedSlots:a._u([{key:"default",fn:function(e){return[e.row.subject?n("span",{staticClass:"crm-text-underline crm-cursor crm-one-font",on:{click:function(t){return a.accountOpen(e.row.id)}}},[n("i",{staticClass:"el-icon-caret-right"}),a._v(a._s(e.row.subject||"--"))]):n("span",[a._v(a._s("--"))])]}}])}),n("el-table-column",{attrs:{prop:"",width:"180",label:a.$i18n.t("Label.modifyTime")},scopedSlots:a._u([{key:"default",fn:function(e){return[n("span",[a._v(a._s(e.row.modifyTime||e.row.addTime))])]}}])}),n("el-table-column",{attrs:{prop:"",width:"300",align:"center",label:a.$i18n.t("Label.Action")},scopedSlots:a._u([{key:"default",fn:function(e){var t,i,r;return[n("el-dropdown",{attrs:{trigger:"click"},on:{command:a.handleCommand}},[n("span",{staticClass:"el-dropdown-link crm-cursor"},[n("i",{staticClass:"iconfont iconcaidan",staticStyle:{"font-weight":"bold","font-size":"20px"}})]),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[null!==(t=a.display["R-System-QAList-Update"])&&void 0!==t&&t.show?n("el-dropdown-item",{attrs:{command:{type:"editor",id:e.row.id}}},[n("i",{staticClass:"iconfont iconbianji3"}),n("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Editor",expression:"'Btn.Editor'"}]})]):a._e(),null!==(i=a.display["R-System-QAList-Delete"])&&void 0!==i&&i.show?n("el-dropdown-item",{attrs:{command:{type:"delete",id:e.row.id}}},[n("i",{staticClass:"iconfont iconshanchu"}),n("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Delete",expression:"'Btn.Delete'"}]})]):a._e(),null!==(r=a.display["R-System-QAList-Search"])&&void 0!==r&&r.show?n("el-dropdown-item",{attrs:{command:{type:"detailed",id:e.row.id}}},[n("i",{staticClass:"el-icon-tickets"}),n("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Detailed",expression:"'Btn.Detailed'"}]})]):a._e()],1)],1)]}}])})],1),a.pagerInfo.rowTotal?n("div",{staticClass:"crm_pagination"},[n("div",{staticClass:"crm_page_total"},[n("span",{directives:[{name:"t",rawName:"v-t",value:"Page.total.item1",expression:"'Page.total.item1'"}]}),n("span",[a._v(a._s(a.pagerInfo.rowTotal))]),n("span",{directives:[{name:"t",rawName:"v-t",value:"Page.total.item2",expression:"'Page.total.item2'"}]})]),n("el-pagination",{staticClass:"page",attrs:{background:"",layout:"sizes, prev, pager, next","page-sizes":[10,20,50,100],"page-size":a.pagerInfo.row,total:a.pagerInfo.rowTotal},on:{"current-change":a.handleCurrentChange,"size-change":a.handleSizeChange}})],1):a._e()],1)},i=[],r=a("c7eb"),s=a("5530"),l=a("1da1"),o=(a("14d9"),a("e9f5"),a("7d54"),a("d3b7"),a("159b"),a("da7c")),c=a("f121"),u=a.n(c),p=u.a.Code,d={name:"Video",data:function(){return{pictLoading:!1,mock_tableData:[],search:{subject:"",lang:null,date:[],startDate:"",endDate:""},multipleSelection:[],pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:0}}},computed:{display:function(){return this.Session.GetDisplay()}},methods:{handleCommand:function(e){"delete"==e.type?this.toDelete(e.id):"editor"==e.type?this.toUpdate(e.id):"detailed"==e.type&&this.accountOpen(e.id)},accountOpen:function(e){this.$router.push({path:"/system/qa/add",query:{id:e,type:"check"}}).catch((function(e){return e}))},searchFunc:function(){var e=this;return Object(l["a"])(Object(r["a"])().mark((function t(){var a,n;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.pictLoading=!0,null!==(a=e.display["R-System-QAList-Search"])&&void 0!==a&&a.show){t.next=5;break}return e.$pigeon.MessageWarning(e.$i18n.t("Msg.NotDisplay")),e.pictLoading=!1,t.abrupt("return");case 5:return null==e.search.date||0==e.search.date.length?(e.search.startDate="",e.search.endDate=""):(e.search.startDate=e.search.date[0],e.search.endDate=e.search.date[1]),t.next=8,o["a"].getQAList(Object(s["a"])(Object(s["a"])({},e.search),{},{page:{current:e.pagerInfo.current,row:e.pagerInfo.row}}));case 8:n=t.sent,n.code==p.StatusOK?(e.mock_tableData=n.data,null!=n.page?(e.pagerInfo.rowTotal=n.page.rowTotal,e.pagerInfo.pageTotal=n.page.pageTotal):e.pagerInfo.rowTotal=0,e.$pigeon.MessageOK(e.$i18n.t("Msg.SearchSuccess")),e.pictLoading=!1):(e.$pigeon.MessageError(n.msg),e.pictLoading=!1);case 10:case"end":return t.stop()}}),t)})))()},getSearchDate:function(e){this.search.date=e},toSearch:function(){this.pagerInfo.current=1,this.searchFunc()},getDate:function(){var e,t,a=2,n=(new Date).getTimezoneOffset(),i=(new Date).getTime(),r=new Date(i+60*n*1e3+60*a*60*1e3),s=r.getFullYear(),l=r.getMonth()+1,o=r.getDate();l<10&&(l="0"+l),o<10&&(o="0"+o),e=s+"-"+l+"-01";var c=r.getMonth(),u=++c,p=new Date(r.getFullYear(),u,1),d=864e5,h=new Date(p-d),f=h.getDate();f<10&&(f="0"+f),t=s+"-"+l+"-"+f,this.search.date=[e,t]},toNew:function(){this.$router.push({path:"/system/qa/add",query:{type:"add"}}).catch((function(e){return e}))},toCheck:function(e){this.$router.push({path:"/system/qa/add",query:{id:e,type:"check"}}).catch((function(e){return e}))},toUpdate:function(e){this.$router.push({path:"/system/qa/add",query:{id:e,type:"update"}}).catch((function(e){return e}))},toDelete:function(){var e=Object(l["a"])(Object(r["a"])().mark((function e(t){var a;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=this,this.$pigeon.MessageConfirm(this.$i18n.t("Msg.Delete"),this.$i18n.t("Msg.SystemPrompt"),this.$i18n.t("Btn.Confirm"),this.$i18n.t("Btn.Cancel"),Object(l["a"])(Object(r["a"])().mark((function e(){var n,i;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[],n.push(t),e.next=4,o["a"].webQADelete({ids:n});case 4:i=e.sent,i.code==p.StatusOK?(a.$pigeon.MessageOK(a.$i18n.t("Msg.DeleteSuccess")),a.searchFunc()):a.$pigeon.MessageError(i.msg);case 6:case"end":return e.stop()}}),e)}))),(function(){}));case 2:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),toDeleteBatch:function(){var e=Object(l["a"])(Object(r["a"])().mark((function e(){var t;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.multipleSelection.length){e.next=2;break}return e.abrupt("return");case 2:t=this,this.$pigeon.MessageConfirm(this.$i18n.t("Msg.Delete"),this.$i18n.t("Msg.SystemPrompt"),this.$i18n.t("Btn.Confirm"),this.$i18n.t("Btn.Cancel"),Object(l["a"])(Object(r["a"])().mark((function e(){var a;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["a"].webQADelete({ids:t.multipleSelection});case 2:a=e.sent,a.code==p.StatusOK?(t.$pigeon.MessageOK(t.$i18n.t("Msg.DeleteSuccess")),t.searchFunc()):t.$pigeon.MessageError(a.msg);case 4:case"end":return e.stop()}}),e)}))),(function(){}));case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),handleSelectionChange:function(e){var t=this;this.multipleSelection=[],e.forEach((function(e){t.multipleSelection.push(e.id)}))},handleSizeChange:function(e){this.pagerInfo.row=e,this.searchFunc()},handleCurrentChange:function(e){this.pagerInfo.current=e,this.searchFunc()}},mounted:function(){this.searchFunc()}},h=d,f=(a("bf70"),a("2877")),m=Object(f["a"])(h,n,i,!1,null,"080ca010",null);t["default"]=m.exports},bf70:function(e,t,a){"use strict";a("fe30")},fe30:function(e,t,a){}}]);