Files
wysite/hc-etms.sqygj.cn/static/js/chunk-378bab12.8dccdda0.js

1 line
48 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-378bab12"],{"00b6":function(t,e,i){"use strict";i.d(e,"d",(function(){return a})),i.d(e,"b",(function(){return s})),i.d(e,"e",(function(){return r})),i.d(e,"c",(function(){return o})),i.d(e,"j",(function(){return l})),i.d(e,"f",(function(){return c})),i.d(e,"g",(function(){return u})),i.d(e,"i",(function(){return d})),i.d(e,"k",(function(){return p})),i.d(e,"m",(function(){return m})),i.d(e,"h",(function(){return h})),i.d(e,"l",(function(){return f})),i.d(e,"a",(function(){return g}));var n=i("b775");function a(t){return Object(n["a"])({url:"/hakocompany/house/listPrecinctByCodes",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/hakocompany/house/listBuildByCodes",method:"post",data:t})}function r(t){return Object(n["a"])({url:"/hakocompany/house/listUnitByCodes",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/hakocompany/house/listHouseByCodes",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/question/Theme/pageList",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/hakocompany/Question/theme/create",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/hakocompany/Question/theme/delete",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/hakocompany/Question/questions/delete",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/hakocompany/Question/option/delete",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/hakocompany/Question/theme/update",method:"post",data:t})}function h(t){return Object(n["a"])({url:"/hakocompany/Question/theme/findById",method:"post",data:t})}function f(t){return Object(n["a"])({url:"/question/Theme/total",method:"post",data:t})}function g(t){return Object(n["a"])({url:"/question/Theme/finish",method:"post",data:t})}},"0b37":function(t,e,i){"use strict";i.d(e,"a",(function(){return n})),i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return s})),i.d(e,"d",(function(){return r})),i.d(e,"f",(function(){return o})),i.d(e,"e",(function(){return l}));i("8dee"),i("e680"),i("4057"),i("fc02");function n(t,e){var i,n,a,s;try{i=t.toString().split(".")[1].length}catch(o){i=0}try{n=e.toString().split(".")[1].length}catch(o){n=0}if(s=Math.abs(i-n),a=Math.pow(10,Math.max(i,n)),s>0){var r=Math.pow(10,s);i>n?(t=Number(t.toString().replace(".","")),e=Number(e.toString().replace(".",""))*r):(t=Number(t.toString().replace(".",""))*r,e=Number(e.toString().replace(".","")))}else t=Number(t.toString().replace(".","")),e=Number(e.toString().replace(".",""));return(t+e)/a}function a(t,e){var i,n,a=0,s=0;try{a=t.toString().split(".")[1].length}catch(r){}try{s=e.toString().split(".")[1].length}catch(r){}return i=Number(t.toString().replace(".","")),n=Number(e.toString().replace(".","")),i/n*Math.pow(10,s-a)}function s(t,e){var i=0,n=t.toString(),a=e.toString();try{i+=n.split(".")[1].length}catch(s){}try{i+=a.split(".")[1].length}catch(s){}return Number(n.replace(".",""))*Number(a.replace(".",""))/Math.pow(10,i)}function r(t,e){var i,n,a,s;try{i=t.toString().split(".")[1].length}catch(r){i=0}try{n=e.toString().split(".")[1].length}catch(r){n=0}return a=Math.pow(10,Math.max(i,n)),s=i>=n?i:n,(Math.round(t*a-e*a)/a).toFixed(s)}function o(t,e){if(0==t&&(t=0),/[^[\-|0-9][0-9]*]/.test(t))return"0";if(null==t||""===t)return"";t=t.toString().replace(/^(-\d*)$/,"$1."),t=t.toString().replace(/^(\d*)$/,"$1."),t=(t+"00").replace(/(\d*\.\d\d)\d*/,"$1"),t=t.replace(".",",");var i=/(\d)(\d{3},)/;while(i.test(t))t=t.replace(i,"$1,$2");if(t=t.replace(/,(\d\d)$/,".$1"),0===e||void 0===e){var n=t.split(".");"00"==n[1]&&(t=n[0])}return t}function l(t,e){t=t.toString();var i=t.indexOf(".");return t=-1!==i?t.substring(0,e+i+1):t.substring(0),parseFloat(t).toFixed(e)}},"20e1":function(t,e,i){"use strict";i.d(e,"l",(function(){return a})),i.d(e,"k",(function(){return s})),i.d(e,"h",(function(){return r})),i.d(e,"a",(function(){return o})),i.d(e,"e",(function(){return l})),i.d(e,"b",(function(){return c})),i.d(e,"c",(function(){return u})),i.d(e,"d",(function(){return d})),i.d(e,"m",(function(){return p})),i.d(e,"f",(function(){return m})),i.d(e,"i",(function(){return h})),i.d(e,"g",(function(){return f})),i.d(e,"j",(function(){return g}));var n=i("b775");function a(t){return Object(n["a"])({url:"/hakocompany/YdRule/pageList",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/hakocompany/YdPool/create",method:"post",data:t})}function r(t){return Object(n["a"])({url:"/hakocompany/YdPool/findOsProjectYdPageList",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/hakocompany/YdPool/countYdTotalByProject",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/hakocompany/YdPool/getDetail",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/hakocompany/YdMemberAccount/findMemberYdPageList",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/hakocompany/YdMemberAccount/findById",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/hakocompany/YdPool/pageList",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/hakocompany/YdPool/update",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/hakocompany/YdMemberAccount/memberTradeRecordPageList",method:"post",data:t})}function h(t){return Object(n["a"])({url:"/company/YdMemberAccount/findTradeRecordDetail",method:"post",data:t})}function f(t){return Object(n["a"])({url:"/hakocompany/Project/orderPricePage",method:"post",data:t})}function g(t){return Object(n["a"])({url:"/hakocompany/Project/updateOrderPrice",method:"post",data:t})}},"24db":function(t,e,i){"use strict";i("c06f")},"48aa":function(t,e,i){},"49bf":function(t,e,i){"use strict";i("984b")},5153:function(t,e,i){},"67d5":function(t,e,i){"use strict";i.d(e,"i",(function(){return a})),i.d(e,"j",(function(){return s})),i.d(e,"f",(function(){return r})),i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return l})),i.d(e,"k",(function(){return c})),i.d(e,"e",(function(){return u})),i.d(e,"d",(function(){return d})),i.d(e,"h",(function(){return p})),i.d(e,"a",(function(){return m})),i.d(e,"g",(function(){return h}));var n=i("b775");function a(t){return Object(n["a"])({url:"/hakocompany/Role/pageList",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/company/organizationalStructure/selectOsList",method:"post",data:t})}function r(t){return Object(n["a"])({url:"/company/organizationalStructure/findOsTree",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/hakocompany/Role/create",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/hakocompany/Role/delete",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/hakocompany/Role/update",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/hakocompany/RoleMenuRel/findByRoleIdAndClienId",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/hakocompany/OrganizationRoleRel/findByRoleId",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/company/member/pageListForRole",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/company/MemberRoleRel/batchDelete",method:"post",data:t})}function h(t){return Object(n["a"])({url:"/hakocompany/account/findProjectByRole",method:"post",data:t})}},"73be":function(t,e,i){"use strict";i("5153")},"90e7":function(t,e,i){"use strict";i.d(e,"g",(function(){return a})),i.d(e,"m",(function(){return s})),i.d(e,"f",(function(){return r})),i.d(e,"l",(function(){return o})),i.d(e,"h",(function(){return l})),i.d(e,"n",(function(){return c})),i.d(e,"a",(function(){return u})),i.d(e,"b",(function(){return d})),i.d(e,"c",(function(){return p})),i.d(e,"e",(function(){return m})),i.d(e,"d",(function(){return h})),i.d(e,"i",(function(){return f})),i.d(e,"j",(function(){return g})),i.d(e,"o",(function(){return v})),i.d(e,"k",(function(){return b}));var n=i("b775");function a(t){return Object(n["a"])({url:"/hakocompany/DeductionInfo/findById",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/hakocompany/DeductionInfo/update",method:"post",data:t})}function r(t){return Object(n["a"])({url:"/hakocompany/CollectionInfoApi/findById",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/hakocompany/CollectionInfoApi/update",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/hakocompany/ChargePushConfigApi/findById",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/hakocompany/ChargePushConfigApi/update",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/company/ProjectSatisfactionConfig/pageList",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/company/ProjectSatisfactionConfig/update",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/hakocompany/CockpitConfig/create",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/hakocompany/CockpitConfig/findByCompanyIdAndType",method:"post",data:t})}function h(t){return Object(n["a"])({url:"/hakocompany/CockpitConfig/sceneMenuList",method:"post",data:t})}function f(t){return Object(n["a"])({url:"/hakocompany/ProjectConfig/pageList",method:"post",data:t})}function g(t){return Object(n["a"])({url:"/hakocompany/ProjectConfig/updateExponentByProjectUuid",method:"post",data:t})}function v(t,e){return Object(n["a"])({url:"/oss/upload",isFile:!0,isReturnResponse:!0,headers:{"Content-Type":"multipart/form-data;charset=UTF-8"},method:"post",data:t,onUploadProgress:e&&e.onUploadProgress})}function b(t){return Object(n["a"])({url:"/hakocompany/ProjectConfig/updateVisitPollRateByProjectUuid",method:"post",data:t})}},"984b":function(t,e,i){},b860:function(t,e,i){"use strict";i("d7bc")},c06f:function(t,e,i){},cc57:function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[[i("el-upload",{staticClass:"upload-demo",attrs:{action:"","http-request":t.handleUpload,disabled:t.disabled,"on-preview":t.handlePreview,"on-remove":t.handleRemove,"on-success":t.handleSuccess,"before-remove":t.beforeRemove,"show-file-list":t.isShowFileList,accept:t.accept,multiple:t.multiple,limit:t.limit,"on-exceed":t.handleExceed,"file-list":t.fileList,"list-type":t.listType}},["picture-card"!==t.listType?[i("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传")]),t._v(" "),t.disabled?t._e():i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("\n 只能上传"+t._s(t.seeTrans[t.uploadType])+"文件,且不超过"+t._s(t.fileSizeLimit)+"MB\n ")])]:[!t.isShowFileList&&t.fileList.length>0?i("img",{staticClass:"avatar",attrs:{src:t.fileList[0].url}}):i("i",{staticClass:"el-icon-picture-outline avatar-uploader-icon"}),t._v(" "),t.disabled?t._e():i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("\n 只能上传"+t._s(t.seeTrans[t.uploadType])+"文件,且不超过"+t._s(t.fileSizeLimit)+"MB\n ")])]],2),t._v(" "),i("el-dialog",{attrs:{visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("img",{attrs:{width:"100%",src:t.dialogImageUrl,alt:""}})])]],2)},a=[],s=(i("b5aa"),i("3ef1")),r=(i("d31c"),i("aa18"),i("982e"),i("fc02"),i("a450"),i("e680"),i("90e7")),o=(i("4057"),function(){function t(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return"".concat(+new Date,"_").concat(t()).concat(t())});function l(t){var e=t.lastIndexOf("."),i="";return-1!=e&&(i=t.substring(e)),i}var c={name:"Upload",props:{value:String,tip:{type:String,default:"上传大小不能超过80M"},limit:{type:Number,default:1},action:{type:String,default:""},headers:{type:Object,default:function(){}},name:{type:String,default:""},listType:{type:String,default:"picture"},fileSizeLimit:{type:Number,default:1},accept:{type:String,default:"image/jpeg,image/png,image/JPG,image/jpg,image/PNG"},uploadType:{type:String,default:function(){return"images"}},multiple:{type:Boolean,default:!1},isShowFileList:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},imgStore:{type:String},isChangeFileName:{type:Boolean,default:!0}},data:function(){return{uploadTypeTrans:{images:{accept:"image/jpeg,image/png,image/JPG,image/jpg,image/PNG"},music:{accept:"audio/mp3,video/mp4"},doc:{accept:"text/plain,application/msword,application/excel,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.wordprocessingml.document"},pdf:{accept:"application/pdf"}},seeTrans:{music:"歌曲",images:"图片",doc:"文档",xlsx:"execl文件",pdf:"pdf文档"},dialogVisible:!1,dialogImageUrl:""}},computed:{imageUrl:function(){return this.value},imageName:function(){return null!=this.value&&""!==this.value&&void 0!=this.value?this.value.substr(this.value.lastIndexOf("/")+1):null},fileList:function(){return null!=this.value&&""!==this.value&&void 0!=this.value?[{name:this.imageName?this.imageName:"",url:this.imageUrl?this.imageUrl:""}]:[]},showFileList:{get:function(){return null!==this.value&&""!==this.value&&void 0!==this.value},set:function(t){}}},mounted:function(){this.uploadType&&this.uploadTypeTrans[this.uploadType].accept&&(this.accept=this.uploadTypeTrans[this.uploadType].accept)},methods:{emitInput:function(t){this.$emit("input",t)},handleRemove:function(t,e){this.emitInput("")},handlePreview:function(t){this.dialogImageUrl=t.url,this.dialogVisible=!0},handleExceed:function(t,e){console.log("fileList",e),this.$message.warning("每次只能上传 ".concat(this.limit," 个文件"))},beforeRemove:function(t,e){return this.$confirm("确定移除 ".concat(t.name,""))},beforeAvatarUpload:function(t){var e=t.size/1024/1024<this.fileSizeLimit;if(!e)return this.$message.error("上传文件大小不能超过"+this.fileSizeLimit+"MB!"),!1;var i=this.accept.split(","),n=i.some((function(e){return t.type===e.trim()||e.includes("*")&&t.type.startsWith(e.split("*")[0])}));return!(!n&&i.length>0)||(this.$message.error("上传文件类型不符合要求!"),!1)},handleSuccess:function(t,e,i){this.fileList=i,this.$emit("on-success",e,i)},add0:function(t){return t<10?"0"+t:t},getYearMonthDay:function(){var t=new Date,e=t.getFullYear(),i=t.getMonth()+1,n=t.getDate();return""+e+this.add0(i)+this.add0(n)},handleUpload:function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(e){var i,n,a,s,c;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,console.log("option",e),i="",i=this.isChangeFileName?o()+l(e.file.name):e.file.name,n=new FormData,n.append("file",e.file),n.append("imgStore",this.imgStore),n.append("fileName",i),n.append("yearMonthDay",this.getYearMonthDay()),t.next=1,Object(r["o"])(n);case 1:if(a=t.sent,!a||!a.data||0!==a.data.code){t.next=2;break}s=a.data.data.fullUrl||a.data.data.url,e.onSuccess({name:e.file.name,url:s}),this.fileList.pop(),this.fileList.push({name:e.file.name,url:s}),this.emitInput(s),this.$message.success("文件上传成功"),t.next=3;break;case 2:throw new Error(a.data.message||"上传失败");case 3:t.next=5;break;case 4:t.prev=4,c=t["catch"](0),console.error("上传失败:",c),this.$message.error("文件上传失败: ".concat(c.message||"未知错误")),e.onError("上传失败");case 5:case"end":return t.stop()}}),t,this,[[0,4]])})));function e(e){return t.apply(this,arguments)}return e}()}},u=c,d=(i("b860"),i("829d")),p=Object(d["a"])(u,n,a,!1,null,"20ab94cc",null);e["a"]=p.exports},d6d9:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"workPointsManage"},[t.infoList?i("div",{staticClass:"workPointsRuleList"},[i("el-card",{staticClass:"box-card"},[i("el-row",[i("el-col",{staticClass:"elCol",attrs:{span:4}},[i("el-input",{attrs:{type:"text",clearable:"",placeholder:"投票主题"},model:{value:t.query.title,callback:function(e){t.$set(t.query,"title","string"===typeof e?e.trim():e)},expression:"query.title"}})],1),t._v(" "),i("el-col",{staticClass:"elCol",attrs:{span:4}},[i("el-select",{attrs:{clearable:"",placeholder:"请选择项目"},model:{value:t.query.projectUuid,callback:function(e){t.$set(t.query,"projectUuid",e)},expression:"query.projectUuid"}},t._l(t.projectList,(function(t){return i("el-option",{key:t.uuid,attrs:{label:t.name,value:t.uuid}})})),1)],1),t._v(" "),i("el-col",{staticClass:"elCol",attrs:{span:4}},[i("el-input",{attrs:{type:"text",clearable:"",placeholder:"创建人"},model:{value:t.query.createBy,callback:function(e){t.$set(t.query,"createBy","string"===typeof e?e.trim():e)},expression:"query.createBy"}})],1),t._v(" "),i("el-col",{staticClass:"elCol",attrs:{span:8}},[i("el-date-picker",{attrs:{type:"daterange","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd HH:mm:ss","default-time":["00:00:00","23:59:59"]},model:{value:t.query.createDate,callback:function(e){t.$set(t.query,"createDate",e)},expression:"query.createDate"}})],1),t._v(" "),i("el-col",{staticClass:"elCol",attrs:{span:4}},[i("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],on:{click:function(e){return t.resetForm()}}},[t._v("重置")]),t._v(" "),i("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],attrs:{type:"primary"},on:{click:t.onSearch}},[t._v("查询")])],1)],1)],1),t._v(" "),i("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"15px"}},[i("div",{staticClass:"planLst"},[i("span",{staticStyle:{color:"#2f2c2c","font-size":"16px"}},[t._v("投票列表")]),t._v(" "),i("span",{staticClass:"add"},[i("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],attrs:{type:"primary"},on:{click:t.addRuleGroup}},[t._v("新建投票")])],1)]),t._v(" "),i("el-table",{staticStyle:{width:"100%","margin-top":"15px"},attrs:{border:"",data:t.tableData,"header-cell-style":t.headClass}},[i("el-table-column",{attrs:{label:"#",align:"center","min-width":"50",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(e.$index+(t.query.pageNumber-1)*t.query.pageSize+1)+" ")])]}}],null,!1,3830243315)}),t._v(" "),i("el-table-column",{attrs:{align:"center",prop:"title",label:"投票主题",fixed:"","min-width":"180","show-overflow-tooltip":""}}),t._v(" "),i("el-table-column",{attrs:{align:"center",prop:"projectNames",label:"所属小区","min-width":"180","show-overflow-tooltip":""}}),t._v(" "),i("el-table-column",{attrs:{align:"center",prop:"isAnonymous",label:"是否匿名"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(2===e.row.isAnonymous?"否":"是")+"\n ")]}}],null,!1,627058839)}),t._v(" "),i("el-table-column",{attrs:{align:"center",prop:"status",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(1===e.row.status?"未发布":2===e.row.status?"投票中":"已截止")+"\n ")]}}],null,!1,3821127212)}),t._v(" "),i("el-table-column",{attrs:{align:"center",prop:"total",label:"投票人数"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",prop:"createBy",label:"创建人","show-overflow-tooltip":""}}),t._v(" "),i("el-table-column",{attrs:{align:"center",prop:"endDate",label:"截止时间","min-width":"160"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",prop:"updateDate",label:"创建时间","min-width":"160"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",prop:"address",fixed:"right",label:"操作","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row?i("span",[i("el-button",{attrs:{type:"text"},on:{click:function(i){return t.detailsClick(e.row,"view")}}},[t._v("查看")])],1):t._e(),t._v(" "),1===e.row.status?i("span",[i("el-button",{attrs:{type:"text"},on:{click:function(i){return t.detailsClick(e.row,"edit")}}},[t._v("编辑")])],1):t._e(),t._v(" "),1===e.row.status?i("span",[i("el-button",{attrs:{type:"text"},on:{click:function(i){return t.deleteClick(e.row)}}},[t._v("删除")])],1):t._e(),t._v(" "),e.row.total>0?i("span",[i("el-button",{attrs:{type:"text"},on:{click:function(i){return t.gotoVoteStatisic(e.row)}}},[t._v("统计")])],1):t._e(),t._v(" "),2===e.row.status?i("span",[i("el-button",{attrs:{type:"text"},on:{click:function(i){return t.gotoEnd(e.row)}}},[t._v("提前结束")])],1):t._e()]}}],null,!1,2672412912)})],1),t._v(" "),i("div",{staticClass:"paginations"},[i("el-pagination",{attrs:{background:"","current-page":t.query.pageNumber,"page-sizes":[10,20,30,50],"page-size":t.query.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.pageTotal},on:{"update:currentPage":function(e){return t.$set(t.query,"pageNumber",e)},"update:current-page":function(e){return t.$set(t.query,"pageNumber",e)},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)],1):t._e(),t._v(" "),t.viewInfo?i("div",{staticClass:"viewDetails"},[i("addVote",{ref:"addVote",attrs:{type:t.type},on:{goBack:t.goBack}})],1):t._e(),t._v(" "),t.statisic?i("div",{staticClass:"viewDetails"},[i("voteStatisic",{ref:"statisic",on:{goBack:t.goBack}})],1):t._e()])},a=[],s=(i("20e1"),i("67d5")),r=i("00b6"),o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"ruleGroupInfo"},[i("el-card",{staticClass:"box-card"},[i("el-page-header",{attrs:{content:t.content},on:{back:t.goBack}}),t._v(" "),i("div",{staticClass:"rule typeface"},[t._v("投票设置")]),t._v(" "),i("div",{staticClass:"vote-form"},[i("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.ruleForm,rules:t.rules,"label-width":"130px"}},[i("el-row",[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:"投票主题:",prop:"title"}},[i("el-input",{attrs:{disabled:t.disabled,placeholder:"请输入投票主题",maxlength:"128","show-word-limit":""},model:{value:t.ruleForm.title,callback:function(e){t.$set(t.ruleForm,"title","string"===typeof e?e.trim():e)},expression:"ruleForm.title"}})],1)],1)],1),t._v(" "),i("el-row",[i("el-form-item",{attrs:{label:"截止日期",required:""}},[i("el-col",{attrs:{span:4}},[i("el-form-item",{attrs:{prop:"expiryDate"}},[i("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",disabled:t.disabled,format:"yyyy-MM-dd","value-format":"yyyy-MM-dd","picker-options":t.pickerOptions,placeholder:"选择投票截止日期"},model:{value:t.ruleForm.expiryDate,callback:function(e){t.$set(t.ruleForm,"expiryDate",e)},expression:"ruleForm.expiryDate"}})],1)],1),t._v(" "),i("el-col",{staticClass:"line",attrs:{span:1}},[t._v("-")]),t._v(" "),i("el-col",{attrs:{span:4}},[i("el-form-item",{attrs:{prop:"dateTime"}},[i("el-time-picker",{staticStyle:{width:"100%"},attrs:{placeholder:"选择时间",disabled:t.disabled,"value-format":"HH:mm:ss",format:"HH:mm:ss"},model:{value:t.ruleForm.dateTime,callback:function(e){t.$set(t.ruleForm,"dateTime",e)},expression:"ruleForm.dateTime"}})],1)],1)],1)],1),t._v(" "),i("el-row",[i("el-col",[i("el-form-item",{attrs:{label:"投票说明:",prop:"remarks"}},[i("el-input",{attrs:{type:"textarea",disabled:t.disabled,rows:"5",placeholder:"请输入投票说明",maxlength:"300","show-word-limit":""},model:{value:t.ruleForm.remarks,callback:function(e){t.$set(t.ruleForm,"remarks","string"===typeof e?e.trim():e)},expression:"ruleForm.remarks"}})],1)],1)],1),t._v(" "),i("el-row",[i("el-col",[i("el-form-item",{staticClass:"is-required",attrs:{label:"适用范围:",prop:"itemsProject"}},[i("div",{staticClass:"vote-projects"},[t._l(t.rangeList,(function(e,n){return e.children.length>0?i("div",{key:n,staticClass:"vote-projects-items"},[i("div",{staticClass:"projects-list"},[i("label",{staticClass:"projects-list-item-title"},[t._v(t._s(e.name)+":")]),t._v(" "),i("el-checkbox",{staticClass:"projects-checkAll",attrs:{disabled:t.disabled,indeterminate:e.isIndeterminate},on:{change:function(e){return t.handleCheckAllChange(e,n)}},model:{value:e.checkAll,callback:function(i){t.$set(e,"checkAll",i)},expression:"r.checkAll"}},[t._v("全选")])],1),t._v(" "),i("div",{staticClass:"projects-checkbox"},[i("el-checkbox-group",{staticClass:"projects-checkbox-checkbox",style:{height:e.show?"auto":e.children.length>5?"80px":"40px"},attrs:{disabled:t.disabled},on:{change:function(e){return t.handleCheckedCitiesChange(e,n)}},model:{value:e.select,callback:function(i){t.$set(e,"select",i)},expression:"r.select"}},t._l(e.children,(function(e){return i("el-checkbox",{key:0===n?e.uuid:e.id,staticClass:"projects-checkbox-item",attrs:{label:0===n?e.uuid:e.id}},[t._v(t._s(4===n?e.roomNum:e.name))])})),1),t._v(" "),e.children.length>10?i("el-button",{staticClass:"projects-show",attrs:{type:"primary",icon:e.show?"el-icon-arrow-up":"el-icon-arrow-down",size:"mini"},on:{click:function(e){return t.showSelects(n)}}},[t._v(t._s(e.show?"收缩":"展开"))]):t._e()],1)]):t._e()})),t._v(" "),i("div",{staticClass:"vote-projects-items"},[i("div",{staticClass:"projects-list projects-list-radio"},[i("label",{staticClass:"projects-list-item-title"},[t._v("选择身份:")]),t._v(" "),i("el-radio-group",{staticClass:"projects-checkAll",attrs:{disabled:t.disabled},model:{value:t.identity,callback:function(e){t.identity=e},expression:"identity"}},[i("el-radio",{attrs:{label:1}},[t._v("所有人")]),t._v(" "),i("el-radio",{attrs:{label:2}},[t._v("住户")]),t._v(" "),i("el-radio",{attrs:{label:3}},[t._v("产权人")])],1)],1)])],2)])],1)],1),t._v(" "),i("el-row",[i("el-col",[i("el-form-item",{attrs:{label:"是否匿名:",prop:"isAnonymous"}},[i("el-radio",{attrs:{label:1,disabled:t.disabled},model:{value:t.ruleForm.isAnonymous,callback:function(e){t.$set(t.ruleForm,"isAnonymous",e)},expression:"ruleForm.isAnonymous"}},[t._v("是")]),t._v(" "),i("el-radio",{attrs:{label:2,disabled:t.disabled},model:{value:t.ruleForm.isAnonymous,callback:function(e){t.$set(t.ruleForm,"isAnonymous",e)},expression:"ruleForm.isAnonymous"}},[t._v("否")])],1)],1)],1)],1)],1),t._v(" "),i("div",{staticClass:"rule typeface"},[t._v("投票选项")]),t._v(" "),i("div",{staticClass:"vote-questions"},[t.questionsList.length>0?i("div",{staticClass:"vote-questions-list"},[i("draggable",{staticClass:"dragArea",attrs:{list:t.questionsList,group:"article",animation:"10",disabled:"view"===t.type},on:{sort:t.draggableSort,end:t.draggableEnd}},t._l(t.questionsList,(function(e,n){return i("div",{key:n,staticClass:"vote-questions-item"},[i("div",{staticClass:"vote-questions-item-index"},[t._v("问题"+t._s(n+1))]),t._v(" "),i("div",{staticClass:"vote-questions-item-detl"},[i("el-row",[i("el-col",{attrs:{span:2,offset:1}},[i("span",{staticClass:"item-detl-title"},[t._v("标题")])]),t._v(" "),i("el-col",{attrs:{span:10}},[i("el-input",{staticClass:"options-input",attrs:{type:"text",disabled:t.disabled,placeholder:"请输入该项题目标题","show-word-limit":"",maxlength:"128"},model:{value:e.title,callback:function(i){t.$set(e,"title","string"===typeof i?i.trim():i)},expression:"item.title"}})],1)],1),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"item.show"}]},[i("el-row",[i("el-col",{attrs:{span:2,offset:1}},[i("span",{staticClass:"item-detl-title"},[t._v("题型")])]),t._v(" "),i("el-col",{attrs:{span:20}},[i("el-radio-group",{staticClass:"questionsType",attrs:{disabled:void 0!=e.id&&"edit"===t.type||t.disabled},on:{change:function(e){return t.questionsTypeChange(e,n)}},model:{value:e.type,callback:function(i){t.$set(e,"type",i)},expression:"item.type"}},[i("el-radio",{attrs:{label:1}},[t._v("单选")]),t._v(" "),i("el-radio",{attrs:{label:2}},[t._v("多选")]),t._v(" "),i("el-radio",{attrs:{label:3}},[t._v("填写")])],1)],1)],1),t._v(" "),t._l(e.questionOptionRelaList,(function(a,s){return i("div",{key:s},[1===e.type||2===e.type?i("el-row",{staticClass:"options-box"},[i("el-col",{attrs:{span:2,offset:1}},[i("span",{staticClass:"item-detl-title"},[t._v("选项"+t._s(s+1))])]),t._v(" "),i("el-col",{attrs:{span:10}},[i("el-input",{staticClass:"options-input",attrs:{disabled:t.disabled,type:"text",placeholder:"请输入该选项内容","show-word-limit":"",maxlength:"128"},model:{value:a.name,callback:function(e){t.$set(a,"name","string"===typeof e?e.trim():e)},expression:"op.name"}})],1),t._v(" "),i("el-col",{attrs:{span:3}},[i("uploadOss",{staticClass:"upload-img",attrs:{disabled:t.disabled,imgStore:t.imgStore,isShowFileList:!1,listType:t.listType},model:{value:a.imageUrl,callback:function(e){t.$set(a,"imageUrl",e)},expression:"op.imageUrl"}})],1),t._v(" "),i("el-col",{attrs:{span:1,offset:1}},[s<e.questionOptionRelaList.length-1?i("el-button",{attrs:{disabled:t.disabled,type:"primary",icon:"el-icon-delete",size:"mini"},on:{click:function(e){return t.deleteOptions(n,s)}}}):t._e(),t._v(" "),s===e.questionOptionRelaList.length-1?i("el-button",{attrs:{disabled:t.disabled,type:"primary",icon:"el-icon-circle-plus-outline",size:"mini"},on:{click:function(e){return t.addOptions(n,s)}}}):t._e()],1)],1):t._e()],1)}))],2)],1),t._v(" "),i("el-button",{staticClass:"qt-show",style:{right:t.questionsList.length>1?"80px":"30px"},attrs:{type:"primary",icon:e.show?"el-icon-arrow-up":"el-icon-arrow-down",size:"mini"},on:{click:function(e){return t.showQuestions(n)}}},[t._v(t._s(e.show?"收缩":"展开"))]),t._v(" "),t.questionsList.length>1?i("el-button",{staticClass:"qt-delete",attrs:{disabled:t.disabled,type:"primary",icon:"el-icon-delete",size:"mini"},on:{click:function(e){return t.deleteQuestions(n)}}}):t._e()],1)})),0)],1):i("div",{staticClass:"vote-none-questions"},[t._v("暂无投票内容,请点击左下方“添加问题”按钮添加投票内容")]),t._v(" "),i("div",{staticClass:"add-questions"},[i("el-dropdown",{on:{command:t.handleCommand}},[i("el-button",{attrs:{type:"primary",size:"small",disabled:t.disabled}},[t._v("\n 添加问题"),i("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[i("el-dropdown-item",{attrs:{command:1,disabled:t.disabled}},[t._v("单选")]),t._v(" "),i("el-dropdown-item",{attrs:{command:2,disabled:t.disabled}},[t._v("多选")]),t._v(" "),i("el-dropdown-item",{attrs:{command:3,disabled:t.disabled}},[t._v("填写")])],1)],1)],1)]),t._v(" "),i("div",{staticClass:"vote-submit-options"},[i("el-button",{attrs:{size:"small"},on:{click:t.cancel}},[t._v("取消")]),t._v(" "),i("el-button",{attrs:{type:"primary",size:"small",disabled:t.disabled},on:{click:t.save}},[t._v("保存")]),t._v(" "),i("el-button",{attrs:{type:"primary",size:"small",disabled:t.disabled},on:{click:t.publish}},[t._v("发布")])],1)],1)],1)},l=[],c=(i("e680"),i("fc02"),i("a450"),i("ed08"),i("cc57")),u=i("8ecb"),d=i.n(u),p={components:{draggable:d.a,uploadOss:c["a"]},props:{type:{type:String,default:""}},data:function(){return{listType:"picture-card",imgStore:"vote/",content:"新建投票",rangeList:[{name:"选择小区",show:!1,checkAll:!0,isIndeterminate:!1,select:[],children:[]},{name:"选择管理区",show:!1,checkAll:!0,isIndeterminate:!1,select:[],children:[]},{name:"选择楼栋",show:!1,checkAll:!0,isIndeterminate:!1,select:[],children:[]},{name:"选择单元",show:!1,checkAll:!0,isIndeterminate:!1,select:[],children:[]},{name:"选择房间",show:!1,checkAll:!0,isIndeterminate:!1,select:[],children:[]}],identity:1,pickerOptions:{disabledDate:function(t){return t.getTime()<Date.now()}},ruleForm:{title:"",expiryDate:null,dateTime:null,remarks:"",isAnonymous:1},rules:{title:[{required:!0,message:"请输入投票主题",trigger:"blur"}],expiryDate:[{required:!0,message:"请选择日期",trigger:"change"}],dateTime:[{required:!0,message:"请选择时间",trigger:"change"}]},pages:1,totalPage:1,questionId:0,questionTitle:"标题",questionsList:[{show:!0,title:"",type:1,sortNumber:1,questionOptionRelaList:[{name:"",imageUrl:""},{name:"",imageUrl:""},{name:"",imageUrl:""},{name:"",imageUrl:""}]}],sortNumber:1,reviewThemeProject:{},disabled:!1}},mounted:function(){},methods:{getInfoLst:function(t){void 0!=t&&t.id&&(this.questionId=t.id),this.getProjectInfo(),this.content="add"===this.type?"新建投票":"编辑投票","view"===this.type||"edit"===this.type?"view"===this.type?this.disabled=!0:this.disabled=!1:this.type},getQuestionFindById:function(t){var e=this;Object(r["h"])({id:t}).then((function(t){if(0===t.code&&t.data){var i=t.data,n=i.title,a=i.endDate,s=i.isAnonymous,r=i.remarks,o=i.questionsRespDTOList,l=i.themeProjectRelaRespDTO;e.ruleForm={title:n,expiryDate:a.substring(0,10),isAnonymous:s,remarks:r,dateTime:a.substring(11,a.length)};var c=[];o.map((function(t){var e=[],i=t.id,n=t.title,a=t.type,s=t.themeId,r=t.sortNumber;t.questionOptionRelaRespDTOList.map((function(t){var i=t.id,n=t.name,a=t.imageUrl,s=t.questionsId;e.push({id:i,name:n,imageUrl:a,questionsId:s})})),c.push({id:i,title:n,type:a,themeId:s,questionOptionRelaList:e,show:!0,sortNumber:r})})),e.reviewRangeList(l),e.questionsList=c}}))},reviewRangeList:function(t){var e=t.projectUuid,i=t.precinctId,n=t.buildingId,a=t.unitId,s=t.houseId,r=t.identity,o=t.id,l=t.themeId;if(this.reviewThemeProject={projectUuid:e,precinctId:i,buildingId:n,unitId:a,houseId:s,id:o,themeId:l},this.identity=r,e.indexOf(",")>0){var c=e.split(",");this.rangeList[0].select=c,c.length===this.rangeList[0].children.length?(this.rangeList[0].checkAll=!0,this.rangeList[0].isIndeterminate=!1):(this.rangeList[0].checkAll=!1,this.rangeList[0].isIndeterminate=!0)}else this.$set(this.rangeList[0],"checkAll",!1),this.$set(this.rangeList[0],"isIndeterminate",!0),this.$set(this.rangeList[0],"select",[e]),i.length>0&&this.getPrecinctList()},getProjectInfo:function(){var t=this,e=JSON.parse(window.localStorage.getItem("companyInfo")).osId;Object(s["j"])({id:e,attribute:1}).then((function(e){var i=e.data;t.rangeList[0].children=i,"view"===t.type||"edit"===t.type?(t.rangeList[0].select=[],t.getQuestionFindById(t.questionId)):"add"===t.type&&(t.rangeList[0].select=i.length>0?i.map((function(t){return t["uuid"]})):[]),1===i.length&&t.getPrecinctList()}))},handleCheckAllChange:function(t,e){var i=0===e?"uuid":"id",n=t?this.rangeList[e].children.map((function(t){return t[i]})):[];this.rangeList[e].select=n,this.rangeList[e].isIndeterminate=!0,t&&this.clearItemArr(e)},handleCheckedCitiesChange:function(t,e){var i=t.length;this.rangeList[e].checkAll=i===this.rangeList[e].children.length,this.rangeList[e].isIndeterminate=i>0&&i<this.rangeList[e].children.length,0===e?1===i?this.getPrecinctList():this.clearItemArr(0):1===e?1===i?this.getbuildingList():this.clearItemArr(1):2===e?1===i?this.getUnitList():this.clearItemArr(2):3===e&&(1===i?this.getHouseList():this.clearItemArr(3))},clearItemArr:function(t){this.rangeList.map((function(e,i){i>t&&(e.checkAll=!0,e.isIndeterminate=!1,e.select=[],e.children=[])}))},getPrecinctList:function(){var t=this;if(0===this.rangeList[0].select.length)return!1;Object(r["d"])({projectUuidS:this.rangeList[0].select}).then((function(e){if(0===e.code&&e.data){var i=e.data;if(t.rangeList[1].children=i,"view"===t.type||"edit"===t.type){var n=t.reviewThemeProject,a=n.precinctId,s=n.buildingId;if(a.indexOf(",")>0){var r=a.split(",").map(Number);t.rangeList[1].select=r,r.length===t.rangeList[1].children.length?(t.rangeList[1].checkAll=!0,t.rangeList[1].isIndeterminate=!1):(t.rangeList[1].checkAll=!1,t.rangeList[1].isIndeterminate=!0)}else t.rangeList[1].select=a?[Number(a)]:[],t.rangeList[1].checkAll=!1,t.rangeList[1].isIndeterminate=!0,s.length>0?t.getbuildingList():(t.rangeList[1].checkAll=!0,t.rangeList[1].isIndeterminate=!1,t.rangeList[1].select=i.length>0?i.map((function(t){return t["id"]})):[])}else"add"===t.type&&(t.rangeList[1].select=i.length>0?i.map((function(t){return t["id"]})):[]);1===i.length&&t.getbuildingList()}}))},getbuildingList:function(){var t=this;if(0===this.rangeList[1].select.length)return!1;Object(r["b"])({projectUuidS:this.rangeList[0].select,precinctId:this.rangeList[1].select}).then((function(e){if(0===e.code&&e.data){var i=e.data;if(t.rangeList[2].children=i,"view"===t.type||"edit"===t.type){var n=t.reviewThemeProject,a=n.buildingId,s=n.unitId;if(a.indexOf(",")>0){var r=a.split(",").map(Number);t.rangeList[2].select=r,r.length===t.rangeList[2].children.length?(t.rangeList[2].checkAll=!0,t.rangeList[2].isIndeterminate=!1):(t.rangeList[2].checkAll=!1,t.rangeList[2].isIndeterminate=!0)}else t.rangeList[2].select=a?[Number(a)]:[],t.rangeList[2].checkAll=!1,t.rangeList[2].isIndeterminate=!0,s.length>0?t.getUnitList():(t.rangeList[2].checkAll=!0,t.rangeList[2].isIndeterminate=!1,t.rangeList[2].select=i.length>0?i.map((function(t){return t["id"]})):[])}else"add"===t.type&&(t.rangeList[2].select=i.length>0?i.map((function(t){return t["id"]})):[]);1===i.length&&t.getUnitList()}}))},getUnitList:function(){var t=this;if(0===this.rangeList[2].select.length)return!1;Object(r["e"])({projectUuidS:this.rangeList[0].select,buildingIds:this.rangeList[2].select}).then((function(e){if(0===e.code&&e.data){var i=e.data;if(t.rangeList[3].children=i,"view"===t.type||"edit"===t.type){var n=t.reviewThemeProject,a=n.unitId,s=n.houseId;if(a.indexOf(",")>0){var r=a.split(",").map(Number);t.rangeList[3].select=r,r.length===t.rangeList[3].children.length?(t.rangeList[3].checkAll=!0,t.rangeList[3].isIndeterminate=!1):(t.rangeList[3].checkAll=!1,t.rangeList[3].isIndeterminate=!0)}else t.rangeList[3].select=a?[Number(a)]:[],t.rangeList[3].checkAll=!1,t.rangeList[3].isIndeterminate=!0,s.length>0?t.getHouseList():(t.rangeList[3].checkAll=!0,t.rangeList[3].isIndeterminate=!1,t.rangeList[3].select=i.length>0?i.map((function(t){return t["id"]})):[])}else"add"===t.type&&(t.rangeList[3].select=i.length>0?i.map((function(t){return t["id"]})):[]);1===i.length&&t.getHouseList()}}))},getHouseList:function(){var t=this;if(0===this.rangeList[3].select.length)return!1;Object(r["c"])({projectUuidS:this.rangeList[0].select,buildingId:this.rangeList[2].select,unitId:this.rangeList[3].select}).then((function(e){if(0===e.code&&e.data){var i=e.data;if(t.rangeList[4].children=i,"view"===t.type||"edit"===t.type){var n=t.reviewThemeProject.houseId;if(n.indexOf(",")>0){var a=n.split(",").map(Number);t.rangeList[4].select=a,a.length===t.rangeList[4].children.length?(t.rangeList[4].checkAll=!0,t.rangeList[4].isIndeterminate=!1):(t.rangeList[4].checkAll=!1,t.rangeList[4].isIndeterminate=!0)}else t.rangeList[4].select=n?[Number(n)]:[],t.rangeList[4].checkAll=!1,t.rangeList[4].isIndeterminate=!0,0===n.length&&(t.rangeList[4].checkAll=!0,t.rangeList[4].isIndeterminate=!1,t.rangeList[4].select=i.length>0?i.map((function(t){return t["id"]})):[])}else"add"===t.type&&(t.rangeList[4].select=i.length>0?i.map((function(t){return t["id"]})):[])}}))},draggableSort:function(t){},draggableEnd:function(){var t=this,e=JSON.parse(JSON.stringify(this.questionsList)),i=1;setTimeout((function(){e.map((function(t,e){var n=i++;return t.sortNumber=n})),t.questionsList=e}),100)},handleCommand:function(t){var e=[];e=t<=2?[{name:"",imageUrl:""},{name:"",imageUrl:""},{name:"",imageUrl:""},{name:"",imageUrl:""}]:[{name:""}],this.sortNumber+=1,this.questionsList.push({show:!0,title:"",type:t,sortNumber:this.sortNumber,questionOptionRelaList:e})},questionsTypeChange:function(t,e){var i=[];i=1===t||2===t?[{name:"",imageUrl:""},{name:"",imageUrl:""},{name:"",imageUrl:""},{name:"",imageUrl:""}]:[{name:""}],this.$set(this.questionsList[e],"questionOptionRelaList",i)},deleteQuestions:function(t){var e=this;this.questionsList.length>1?this.$confirm("确定该问题吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"info",center:!0}).then((function(){var i=JSON.parse(JSON.stringify(e.questionsList)),n=i[t];void 0!=n.id?Object(r["i"])({id:n.id}).then((function(n){0===n.code&&(i.splice(t,1),e.questionsList=i,e.draggableEnd(),e.$message({type:"success",message:"删除成功"}))})):(i.splice(t,1),e.questionsList=i,e.draggableEnd())})).catch((function(){})):this.$message({type:"error",message:"至少保留一个问题选项"})},showQuestions:function(t){var e=!this.questionsList[t].show;this.$set(this.questionsList[t],"show",e)},showSelects:function(t){var e=!this.rangeList[t].show;this.$set(this.rangeList[t],"show",e)},deleteOptions:function(t,e){var i=this;this.$confirm("确定该选项吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"info",center:!0}).then((function(){var n=i.questionsList[t].questionOptionRelaList,a=n[e];void 0!=a.id?Object(r["k"])({id:a.id}).then((function(a){0===a.code&&(n.splice(e,1),i.$set(i.questionsList[t],"questionOptionRelaList",n),i.$message({type:"success",message:"删除成功"}))})):(n.splice(e,1),i.$set(i.questionsList[t],"questionOptionRelaList",n))})).catch((function(){}))},addOptions:function(t,e){var i=this.questionsList[t].questionOptionRelaList;i.length<5?(i.push({name:"",imageUrl:""}),this.$set(this.questionsList[t],"questionOptionRelaList",i)):this.$message({type:"error",message:"问题选项最多为5项"})},addOptionsPage:function(){this.pages=this.pages+1,this.totalPage=this.totalPage+1,this.questionsList.push({isQt:!1,pagesId:this.pages,totalPage:this.totalPage})},cancel:function(){this.goBack()},save:function(){this.submitQuestionInfor(0)},publish:function(){this.submitQuestionInfor(1)},submitQuestionInfor:function(t){var e=this,i={identity:this.identity,projectUuid:this.rangeList[0].select.join(","),precinctId:this.rangeList[1].select.join(","),buildingId:this.rangeList[2].select.join(","),unitId:this.rangeList[3].select.join(","),houseId:this.rangeList[4].select.join(",")};0!==this.questionId&&(i=Object.assign(i,{id:this.reviewThemeProject.id,themeId:this.questionId}));var n=JSON.parse(window.localStorage.getItem("companyInfo")).osId,a=Object.assign(this.ruleForm,{companyId:n,isPublish:t,questionsList:this.questionsList,themeProjectRela:i,createId:JSON.parse(localStorage.getItem("companyInfo")).id,operatorName:JSON.parse(localStorage.getItem("companyInfo")).abbreviation,createBy:JSON.parse(localStorage.getItem("companyInfo")).abbreviation});0!==this.questionId&&(a=Object.assign(a,{id:this.questionId})),this.$refs["ruleForm"].validate((function(t){if(!t)return e.$message({type:"error",message:"请检查投票主题和截止时间是否输入和选择."}),!1;if(0===e.rangeList[0].select.length)return e.$message({type:"error",message:"投票范围必须选择,请先选择小区"}),!1;if(!(e.questionsList.length>0))return e.$message({type:"error",message:"请点击左下方“添加问题”按钮添加投票内容"}),!1;var i=e.questionsList.every((function(t,e){return""!==t.title}));if(!i)return e.$message({type:"error",message:"某项投票内容标题为空,请填写相关内容"}),!1;var n=!0;e.questionsList.map((function(t){var e=3==t.type||t.questionOptionRelaList.every((function(t){return""!==t.name}));n=!e})),n?e.$message({type:"error",message:"某项投票选项内容为空,请填写相关内容"}):(console.log("全部填写完毕"),a.endDate=a.expiryDate+" "+a.dateTime,0===e.questionId?Object(r["f"])(a).then((function(t){0===t.code&&(e.$message({type:"success",message:"创建投票成功"}),e.goBack())})):Object(r["m"])(a).then((function(t){0===t.code&&(e.$message({type:"success",message:"更新投票成功"}),e.goBack())})))}))},goBack:function(){this.$emit("goBack")}}},m=p,h=(i("73be"),i("829d")),f=Object(h["a"])(m,o,l,!1,null,"e964727a",null),g=f.exports,v=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"ruleGroupInfo"},[i("el-card",{staticClass:"box-card"},[i("el-page-header",{attrs:{content:t.content},on:{back:t.goBack}}),t._v(" "),i("div",{staticClass:"vote-statisic"},[i("div",{staticClass:"vote-title"},[t._v(t._s(t.infor.title))]),t._v(" "),i("div",{staticClass:"vote-des"},[t._v(t._s(t.infor.remarks))]),t._v(" "),t._l(t.infor.questions,(function(e,n){return i("div",{key:n,staticClass:"vote-questions-item"},[i("div",{staticClass:"vote-questions-title"},[t._v(t._s(t.culTitleFormat(e.title,n))),i("span",{staticClass:"questions-type"},[t._v(""+t._s(1===e.type?"单选题":2===e.type?"多选题":3===e.type?"问答题":"填空题")+"")])]),t._v(" "),i("div",{staticClass:"vote-questions-detaile"},[i("div",{staticClass:"detaile-table detaile-header"},[i("div",{staticClass:"detaile-table-item"},[t._v("选项")]),t._v(" "),i("div",{staticClass:"detaile-table-item"},[t._v("小计")]),t._v(" "),i("div",{staticClass:"detaile-table-item"},[t._v("比例")])]),t._v(" "),t._l(e.answerTotalRespDTOS,(function(e,n){return i("div",{key:n,staticClass:"detaile-table detaile-section"},[i("div",{staticClass:"detaile-table-item"},[t._v(t._s(e.name))]),t._v(" "),i("div",{staticClass:"detaile-table-item"},[t._v(t._s(e.total?e.total:0))]),t._v(" "),i("div",{staticClass:"detaile-table-item"},[i("el-progress",{staticClass:"detaile-table-progress",attrs:{"text-inside":!0,"stroke-width":20,percentage:t.transLatToPer(e.proportion)}})],1)])})),t._v(" "),i("div",{staticClass:"detaile-table detaile-footer"},[i("div",{staticClass:"detaile-table-item"},[t._v("本题有效投票数")]),t._v(" "),i("div",{staticClass:"detaile-table-item"},[t._v(t._s(e.total))]),t._v(" "),i("div",{staticClass:"detaile-table-item"})])],2)])}))],2)],1)],1)},b=[],y=(i("aa18"),i("982e"),i("0b37")),L={data:function(){return{content:"投票统计分析",infor:{}}},mounted:function(){},methods:{getInfoLst:function(t){this.getQuestionFindById(t.id)},getQuestionFindById:function(t){var e=this;Object(r["l"])({id:t}).then((function(t){0===t.code&&(e.infor=t.data)}))},transLatToPer:function(t){return t?Object(y["c"])(t,100):0},goBack:function(){this.$emit("goBack")},culTitleFormat:function(t,e){return t.includes("".concat(e+1,"、"))?t:"".concat(e+1,"、").concat(t)}}},_=L,k=(i("da78"),Object(h["a"])(_,v,b,!1,null,"0e3db64b",null)),w=k.exports,j={components:{addVote:g,voteStatisic:w},data:function(){return{type:"",pageTotal:0,viewInfo:!1,infoList:!0,statisic:!1,projectList:[],statusList:[{name:"未发布",value:1},{name:"投票中",value:2},{name:"已截止",value:3}],query:{title:"",createBy:"",companyId:JSON.parse(window.localStorage.getItem("companyInfo")).osId,projectUuid:"",createDate:"",pageNumber:1,pageSize:10},tableData:[]}},mounted:function(){this.headClass(),this.getProjectInfo(),this.getlistData()},beforeRouteLeave:function(t,e,i){this.viewInfo=!1,this.statisic=!1,this.infoList=!0,i()},methods:{getProjectInfo:function(){var t=this,e=JSON.parse(window.localStorage.getItem("companyInfo")).osId;Object(s["j"])({id:e,attribute:1}).then((function(e){0===e.code&&e.data?t.projectList=e.data:t.projectList=[]}))},deleteClick:function(t){var e=this;this.$confirm("确定删除该数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"info",center:!0}).then((function(){Object(r["g"])({id:t.id}).then((function(t){0===t.code&&(e.getlistData(),e.$message({type:"success",message:"删除投票成功"}))}))})).catch((function(){}))},gotoEnd:function(t){var e=this;this.$confirm("确定要提前结束当前问卷吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"info",center:!0}).then((function(){Object(r["a"])({id:t.id}).then((function(t){0===t.code&&(e.getlistData(),e.$message({type:"success",message:"提前结束成功"}))}))})).catch((function(){}))},detailsClick:function(t,e){var i=this,n=t;this.type=e,this.viewInfo=!0,this.infoList=!1,this.statisic=!1,this.$nextTick((function(){i.$refs.addVote.getInfoLst(n)}))},addRuleGroup:function(){var t=this;this.type="add",this.viewInfo=!0,this.infoList=!1,this.statisic=!1,this.$nextTick((function(){t.$refs.addVote.getInfoLst()}))},gotoVoteStatisic:function(t){var e=this,i=t;this.viewInfo=!1,this.infoList=!1,this.statisic=!0,this.$nextTick((function(){e.$refs.statisic.getInfoLst(i)}))},onSearch:function(){this.query.pageNumber=1,this.getlistData()},getlistData:function(){var t=this,e={title:this.query.title,createBy:this.query.createBy,companyId:JSON.parse(window.localStorage.getItem("companyInfo")).osId,projectUuid:this.query.projectUuid,start:this.query.createDate?this.query.createDate[0]:"",end:this.query.createDate?this.query.createDate[1]:"",pageNumber:this.query.pageNumber,pageSize:this.query.pageSize};Object(r["j"])(e).then((function(e){0===e.code&&e.data?(t.tableData=e.data.records,t.pageTotal=e.data.rowsCount):t.tableData=[]}))},goBack:function(){this.viewInfo=!1,this.statisic=!1,this.infoList=!0,this.getlistData()},handleSizeChange:function(t){this.query.pageSize=t,this.getlistData()},handleCurrentChange:function(t){this.query.pageNumber=t,this.getlistData()},resetForm:function(){this.query.pageNumber=1,this.query.title="",this.query.createBy="",this.query.projectUuid="",this.query.createDate="",this.getlistData()},headClass:function(){return"text-align:center;background:#FAFAFA;"}}},I=j,C=(i("24db"),i("49bf"),Object(h["a"])(I,n,a,!1,null,"15a0cb49",null));e["default"]=C.exports},d7bc:function(t,e,i){},da78:function(t,e,i){"use strict";i("48aa")}}]);