"use strict"; (window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3], { "A+3r": function A3r(e, t, a) { e.exports = { root: "root___cfLR8" }; }, Idpw: function Idpw(e, t, a) { "use strict"; a.r(t); a("Dkba"); var n = a("UYM3"), r = (a("vWQn"), a("1vAp")), o = (a("XCdk"), a("b+ud")), l = (a("5aHp"), a("dzEL")), c = a("jehZ"), i = a.n(c), s = (a("XGli"), a("NHyu")), u = a("eHn4"), d = a.n(u), p = a("2Taf"), m = a.n(p), h = a("vZ4D"), f = a.n(h), v = a("l4Ni"), g = a.n(v), y = a("ujKo"), C = a.n(y), E = a("MhPg"), b = a.n(E), N = a("p0pE"), S = a.n(N), w = (a("e3Tq"), a("n+tp")), k = a("q1tI"), D = a.n(k), F = a("Qyje"), I = a("z/if"), T = a.n(I), P = a("MuoO"), R = a("3T1G"), U = a("xhYP"), x = a.n(U), O = a("Drk6"), j = a("jdli"), A = a.n(j), B = a("hj9L"), V = a.n(B), L = a("47e7"), _ = a("3a4m"), M = a.n(_), z = a("TOX0"), G = a.n(z), X = a("Aeqt"), q = a("qm43"), Q = a.n(q); function W(e) { return function () { var t, a = C()(e); if (Y()) { var n = C()(this).constructor; t = Reflect.construct(a, arguments, n); } else t = a.apply(this, arguments); return g()(this, t); }; } function Y() { if ("undefined" === typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" === typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), !0; } catch (e) { return !1; } } var H = w["a"].Item, J = function (e) { b()(a, e); var t = W(a); function a(e) { var n; m()(this, a), n = t.call(this, e), n.onTypeChange = function (e) { var t = n.props, a = t.deptName, r = t.userName, o = t.onChange, l = t.onTypeChange; n.setState({ type: e, senderName: { dept: a, personal: r }[e] }), l(e[0]), o({ dept: a, personal: r }[e]); }, n.onInputChange = function (e) { var t = n.props.onChange; n.setState({ senderName: e }), t(e); }; var r = e.value, o = e.senderType; return n.state = { type: [o], senderName: r }, n; } return f()(a, [{ key: "render", value: function value() { var e = this.state, t = e.type, a = e.senderName, n = [{ label: "\u90E8\u95E8", value: "dept" }, { label: "\u4E2A\u4EBA", value: "personal" }]; return D.a.createElement("div", { className: Q.a.root }, D.a.createElement(w["a"], null, D.a.createElement(r["a"], { cols: 1, data: n, extra: "\u8BF7\u9009\u62E9", value: t, onChange: this.onTypeChange, onOk: this.onTypeChange }, D.a.createElement(H, { arrow: "horizontal" }, D.a.createElement("span", { style: { color: "#F5222D" } }, "*"), "\u53D1\u5E03\u8005\u5C55\u793A")), D.a.createElement(l["a"], { maxLength: 50, clear: !0, placeholder: "\u8BF7\u8F93\u5165", value: a, className: "senderName", onChange: this.onInputChange }, D.a.createElement("span", { style: { color: "#F5222D" } }, "*"), "\u53D1\u5E03\u8005")), D.a.createElement("div", { className: "sender-footer" }, "\u53EF\u624B\u52A8\u4FEE\u6539")); } }]), a; }(k["Component"]), K = J, Z = a("A+3r"), $ = a.n(Z); function ee(e) { return function () { var t, a = C()(e); if (te()) { var n = C()(this).constructor; t = Reflect.construct(a, arguments, n); } else t = a.apply(this, arguments); return g()(this, t); }; } function te() { if ("undefined" === typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" === typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), !0; } catch (e) { return !1; } } var ae = w["a"].Item, ne = function (e) { b()(a, e); var t = ee(a); function a() { var e; m()(this, a); for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++) { r[o] = arguments[o]; } return e = t.call.apply(t, [this].concat(r)), e.onChange = function (t) { var a = e.props.onChange; a && a(t[0]); }, e; } return f()(a, [{ key: "render", value: function value() { var e = this.props.value, t = [{ label: "\u5168\u90E8\u4EBA\u5458", value: "1" }, { label: "\u65B0\u589E\u4EBA\u5458", value: "2" }, { label: "\u4E0D\u63D0\u9192", value: "3" }]; return D.a.createElement("div", { className: $.a.root }, D.a.createElement(r["a"], { cols: 1, data: t, extra: "\u8BF7\u9009\u62E9", value: e, onChange: this.onChange, onOk: this.onChange }, D.a.createElement(ae, { arrow: "horizontal" }, D.a.createElement("span", { style: { color: "#F5222D" } }, "*"), "\u6D88\u606F\u63D0\u9192"))); } }]), a; }(k["Component"]), re = ne, oe = a("DfCj"), le = a("VsR+"), ce = a.n(le), ie = a("9Exo"); function se(e) { return function () { var t, a = C()(e); if (ue()) { var n = C()(this).constructor; t = Reflect.construct(a, arguments, n); } else t = a.apply(this, arguments); return g()(this, t); }; } function ue() { if ("undefined" === typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" === typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), !0; } catch (e) { return !1; } } var de = function (e) { b()(a, e); var t = se(a); function a() { return m()(this, a), t.apply(this, arguments); } return f()(a, [{ key: "render", value: function value() { var e = this.props, t = e.selectResult, a = e.authorityFirstUser, n = e.authorityCount, r = e.formData, o = e.handleOk, l = e.handleCancel, c = r.senderName, i = r.pushSetting, u = r.fileCount, d = r.shared, p = "...\u5171".concat(n, "\u4EBA"), m = [{ title: "\u53D1\u5E03\u8005", content: c }, { title: "\u76F8\u5173\u6743\u9650\u4EBA", content: a ? "".concat(a).concat(n > 1 ? p : "") : "\u65E0" }, { title: "\u63A8\u9001\u63D0\u9192", content: { 1: "\u5168\u90E8\u4EBA\u5458", 2: "\u65B0\u589E\u4EBA\u5458", 3: "\u4E0D\u63D0\u9192" }[i] }, { title: "\u9644\u4EF6\u6570", content: "".concat(u || "0", "\u4E2A") }, { title: "\u5141\u8BB8\u8F6C\u53D1", content: 1 === d ? "\u662F" : "\u5426" }]; return D.a.createElement("div", { className: ce.a.root }, D.a.createElement(ie["a"], { title: "\u53D1\u5E03", onBack: l }), D.a.createElement("div", { className: "selected-user-list-body" }, D.a.createElement("div", { className: "title" }, "\u53D1\u5E03\u5BF9\u8C61"), D.a.createElement(oe["a"], { selectResult: t }), D.a.createElement("div", { className: "title" }, "\u53D1\u9001\u5C5E\u6027"), D.a.createElement("div", { className: "setting-list line-bottom" }, m.map(function (e) { var t = e.title, a = e.content; return D.a.createElement("div", { key: t, className: "setting-item" }, D.a.createElement("div", { className: "setting-title" }, t, "\uFF1A"), D.a.createElement("div", { className: "setting-content" }, a)); }))), D.a.createElement("div", { className: "footer-wrap line-top" }, D.a.createElement(s["a"], { type: "primary", onClick: o }, "\u786E\u8BA4\u63D0\u4EA4"))); } }]), a; }(k["Component"]), pe = de, me = (a("Me4a"), a("jGYM")), he = a.n(me), fe = a("XA8Y"), ve = (a("Pwec"), a("CtXQ")), ge = a("wyMu"), ye = a.n(ge), Ce = (a("YQfW"), window.wx); function Ee(e, t) { return new Promise(function (a, n) { if ("function" !== typeof Ce[e]) return n(new Error("wx.".concat(e, " is not function"))); Ce[e](S()({}, t, { success: function success(t) { var r = t.errMsg; r === "".concat(e, ":ok") ? a(t) : n(r); }, fail: function fail(e) { n(e.errMsg); } })); }); } function be(e) { return Ee("chooseImage", e); } function Ne(e) { return Ee("uploadImage", e); } function Se(e) { return Ee("getLocalImgData", e); } var we = a("ygAv"), ke = a("PBwp"), De = a.n(ke), Fe = a("a9aA"), Ie = a.n(Fe); function Te(e) { return function () { var t, a = C()(e); if (Pe()) { var n = C()(this).constructor; t = Reflect.construct(a, arguments, n); } else t = a.apply(this, arguments); return g()(this, t); }; } function Pe() { if ("undefined" === typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" === typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), !0; } catch (e) { return !1; } } var Re, Ue, xe, Oe = function (e) { b()(a, e); var t = Te(a); function a(e) { var n; m()(this, a), n = t.call(this, e); var r = e.show; return n.state = { show: r }, n; } return f()(a, [{ key: "render", value: function value() { var e = this.props.popupBody, t = this.state.show; return t ? D.a.createElement("div", { className: Ie.a.root }, D.a.createElement("div", { className: "popup-mask" }), D.a.createElement("div", { className: "popup-wrap" }, D.a.createElement("div", { className: "popup-body" }, e))) : null; } }], [{ key: "getDerivedStateFromProps", value: function value(e, t) { var a = e.show; return t.show !== e.show ? { show: a } : null; } }]), a; }(k["Component"]), je = Oe; function Ae(e) { return function () { var t, a = C()(e); if (Be()) { var n = C()(this).constructor; t = Reflect.construct(a, arguments, n); } else t = a.apply(this, arguments); return g()(this, t); }; } function Be() { if ("undefined" === typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" === typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), !0; } catch (e) { return !1; } } var Ve, Le, _e, Me = [], ze = (Re = Object(P["connect"])(), Re((xe = function (e) { b()(a, e); var t = Ae(a); function a(e) { var n; m()(this, a), n = t.call(this, e), n.handleTakePhone = function () { n.handlePopupCancel(), n.chooseImg(["camera"]); }, n.handleChooseImage = function () { n.handlePopupCancel(), n.chooseImg(["album"]); }, n.chooseImg = function (e) { be({ count: 1, sizeType: ["original"], sourceType: e }).then(function (e) { var t = e.localIds; console.log("localIds", t); var a = e.localIds[0].toString(); if ("Android" === Object(we["a"])() && "wxwork" === Object(R["GetBrowserType"])()) return Array.isArray(t) && t.length ? (A.a.loading("\u4E0A\u4F20\u4E2D", 100), n.uploadToWX(t)) : void 0; Se({ localId: a }).then(function (t) { console.log("getLocalImgData", e), "IOS" === Object(we["a"])() ? (console.log("ios"), n.setState({ imgUrl: t.localData })) : "Android" === Object(we["a"])() && n.setState({ imgUrl: "data:image/jpeg/png;base64,".concat(t.localData) }); }); }); }, n.uploadToWX = function (e) { if (!e.length) return n.uploadToBusiness(Me); var t = e.shift(); return Ne({ localId: t, isShowProgressTips: 0 }).then(function (t) { var a = t.serverId; Me.push(a), n.uploadToWX(e); })["catch"](function (e) { Me = [], A.a.hide(), A.a.info("\u4E0A\u4F20\u56FE\u7247\u81F3\u5FAE\u4FE1\u5931\u8D25\uFF1A".concat(e)); }); }, n.uploadToBusiness = function (e) { var t = n.props.dispatch, a = Object(F["parse"])(window.location.search.slice(1)), r = a.corpid; return t({ type: "global/getImgUrl", params: { corpid: r, serverIds: e } }).then(function (e) { console.log("uploadToBusiness", e), n.setState({ imgUrl: e[0] }), A.a.hide(); })["catch"](function (e) { A.a.hide(), A.a.info("\u56FE\u7247\u4E0A\u4F20\u670D\u52A1\u5931\u8D25\uFF1A".concat(e)); })["finally"](function () { Me = []; }); }, n.handleAddImg = function () { n.setState({ showPopup: !0 }); }, n.handleCoverSelected = function (e, t, a) { n.saveFormState({ coverUrl: e, coverName: t, newCoverFlag: a || 0 }); }, n.handlePopupCancel = function () { n.setState({ showPopup: !1 }); }, n.handleBack = function () { var e = n.props.handleShowPageChange; Object(R["SetTitle"])("\u53D1\u5E03"), n.setState({ showPage: !1, imgUrl: null }), e && e(!1); }, n.handleSubmit = function () { var e = n.state, t = e.coverUrl, a = e.coverName, r = e.newCoverFlag; n.saveFormState({ coverUrl: t, coverName: a, newCoverFlag: r || 0 }), n.handleBack(); }, n.handleCropCancel = function () { n.setState({ imgUrl: null }); }, n.handleCropOk = function () { n.cropper.getCroppedCanvas().toBlob(function (e) { var t = new File([e], "".concat(Date.now(), ".jpg")); n.handleImageUpload(t); }); }, n.handleImageUpload = function (e) { var t = new FormData(); t.append("files[]", e), t.append("type", "bigfile"), t.append("desc", "".concat(Date.now(), ".jpg")), t.append("groupId", ""); var a = n.state.moldName, r = n.props, o = r.dispatch, l = r.coverList; o({ type: "global/fetchFileUpdate", params: t }).then(function (e) { var t = e.urls, r = "".concat(a, "\u81EA\u5B9A\u4E49\u5C01\u9762"); o({ type: "form/saveFormState", payload: { coverList: l.unshift({ url: t[0], coverName: r, newCoverFlag: 1 }) } }), n.saveFormState({ coverName: r, coverUrl: t[0], newCoverFlag: 1 }), n.handleBack(); }); }, n.saveFormState = function (e) { var t = n.props.dispatch; t({ type: "form/saveFormState", payload: e }); }; var r = e.formData, o = void 0 === r ? {} : r, l = e.showPage, c = o.coverUrl, i = o.moldName, s = o.coverName, u = o.newCoverFlag; return n.state = { showPage: l, imgUrl: null, coverUrl: c, showPopup: !1, moldName: i, coverName: s, newCoverFlag: u }, n; } return f()(a, [{ key: "componentDidMount", value: function value() { Object(R["SetTitle"])("\u5C01\u9762\u9009\u62E9"); } }, { key: "render", value: function value() { var e = this, t = this.props.coverList, a = this.state, n = a.imgUrl, r = a.showPopup, o = a.coverUrl, l = a.showPage, c = D.a.createElement(D.a.Fragment, null, D.a.createElement("div", { className: "popup-item line-bottom", onClick: this.handleTakePhone }, "\u62CD\u6444"), D.a.createElement("div", { className: "popup-item", onClick: this.handleChooseImage }, "\u4ECE\u624B\u673A\u76F8\u518C\u9009\u62E9"), D.a.createElement("div", { className: "popup-item", onClick: this.handlePopupCancel }, "\u53D6\u6D88")); return l ? n ? D.a.createElement("div", { className: De.a.root }, D.a.createElement(ye.a, { ref: function ref(t) { e.cropper = t; }, src: n, style: { height: "100%", width: "100%" }, aspectRatio: 900 / 383, autoCropArea: 1, guides: !1, minCropBoxWidth: 300, toggleDragModeOnDblclick: !1, zoomable: !1, movable: !1, rotatable: !1, scalable: !1 }), D.a.createElement("div", { className: "line-top btn" }, D.a.createElement(s["a"], { onClick: this.handleCropCancel }, "\u53D6\u6D88"), D.a.createElement(s["a"], { type: "primary", onClick: this.handleCropOk }, "\u786E\u5B9A"))) : D.a.createElement("div", { className: De.a.root }, D.a.createElement("div", { className: "page-container" }, D.a.createElement(je, { show: r, popupBody: c }), D.a.createElement("div", { className: "cover-list" }, D.a.createElement("div", { className: "cover-item" }, D.a.createElement("div", { className: "add-container", onClick: this.handleAddImg }, D.a.createElement(ve["a"], { type: "plus" }), D.a.createElement("div", { className: "add-tip" }, "\u81EA\u5B9A\u4E49\u56FE\u7247"))), t.map(function (t) { var a = t.url, n = t.coverName, r = t.newCoverFlag; return D.a.createElement("div", { className: "cover-item", key: a, onClick: function onClick() { return e.handleCoverSelected(a, n, r); } }, D.a.createElement("div", { className: "img" }, D.a.createElement("img", { alt: "", src: a })), a === o && D.a.createElement("div", { className: "checked" }, D.a.createElement(ve["a"], { type: "check" }))); })), D.a.createElement("div", { className: "line-top btn" }, D.a.createElement(s["a"], { onClick: this.handleBack }, "\u8FD4\u56DE"), D.a.createElement(s["a"], { type: "primary", onClick: this.handleSubmit }, "\u786E\u5B9A")))) : null; } }], [{ key: "getDerivedStateFromProps", value: function value(e, t) { var a = e.showPage, n = e.formData; if (t.showPage !== e.showPage) return { showPage: a }; if (t.formData !== e.formData) { var r = n.coverUrl, o = n.moldName, l = n.coverName, c = n.newCoverFlag; return { coverUrl: r, moldName: o, coverName: l, newCoverFlag: c }; } return null; } }]), a; }(k["Component"]), Ue = xe)) || Ue), Ge = ze, Xe = a("+n12"); function qe(e) { return function () { var t, a = C()(e); if (Qe()) { var n = C()(this).constructor; t = Reflect.construct(a, arguments, n); } else t = a.apply(this, arguments); return g()(this, t); }; } function Qe() { if ("undefined" === typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" === typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), !0; } catch (e) { return !1; } } var We = w["a"].Item, Ye = (Ve = Object(P["connect"])(function (e) { var t = e.form, a = e.detail; return S()({}, t, { detailInfo: a.detailInfo }); }), Ve((_e = function (e) { b()(a, e); var t = qe(a); function a(e) { var n; return m()(this, a), n = t.call(this, e), n.handleOk = function (e, t) { var a = e.selectSignature, r = e.selectResult; n.getCheckedNodes({ selectSignature: a, selectResult: r }, t), n.handleVisibleChange(t, !1); }, n.handleError = function (e) { console.log("handleError", e), A.a.info(e); }, n.handleVisibleChange = function () { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "publish", t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], a = n.props.dispatch; a({ type: "form/save", payload: { selectUserType: e, visible: t, first: !1 } }); var r = "\u53D1\u901A\u77E5"; t && (r = "publish" === e ? "\u53D1\u5E03\u5BF9\u8C61" : "\u76F8\u5173\u6743\u9650\u4EBA"), Object(R["SetTitle"])(r), n.setState({ topBarTitle: r }); }, n.getCheckedNodes = function (e, t) { var a, r = e.selectSignature, o = e.selectResult, l = n.props, c = l.formData, i = l.dispatch, s = c.receiveUserTemplate, u = o || {}, p = u.all, m = p.selectedUserNum, h = p.users, f = p.depts; if (n.saveFormState((a = {}, d()(a, X["a"][t].id, void 0 !== r ? r : s), d()(a, X["a"][t].num, m), a)), "publish" === t) n.setState({ selectResult: o });else { var v = ""; if (h && h.length) v = h[0].userName;else if (f && f.length) { var g = f[0], y = g.key, C = g.deptName, E = g.tagName; v = "tag" === y ? E : C; } n.setState({ authorityFirstUser: v }); } i({ type: "form/save", payload: { first: !1 } }); }, n.handleSelectBack = function () { var e = n.props, t = e.visible, a = e.selectUserType, r = n.state.confirmVisible; t ? n.handleVisibleChange(a, !1) : r ? n.handlePublishConfirm() : M.a.push("".concat(Xe["a"], "/county/list?tabBarIndex=1")); }, n.handleFileGroupIdCallback = function (e, t) { n.saveFormState({ fileCount: t }); }, n.handleMoldChange = function (e) { var t = n.props, a = t.dispatch, r = t.moldDataList, o = (e[0] || "").split(","), l = r.find(function (e) { return e.moldId === Number(o[0]); }) || {}, c = l.coverList, i = c.find(function (e) { return 1 === e.type; }) || {}, s = i.url, u = i.coverName; n.saveFormState({ moldId: Number(o[0]), moldName: o[1], coverUrl: s, coverName: u, newCoverFlag: 0 }), a({ type: "form/save", payload: { selectMold: e, coverList: c } }); }, n.handleShowPageChange = function (e) { e ? Object(R["SetTitle"])("\u5C01\u9762\u9009\u62E9") : Object(R["SetTitle"])("\u53D1\u5E03"), n.setState({ showCoverPage: e }); }, n.startTimer = function () { n.interval || (n.interval = setInterval(function () { n.handleFetchSubmit({ isDraft: !0, autoSave: !0 }); }, 6e4)); }, n.handleTitleChange = function (e) { e && n.startTimer(); }, n.saveFormState = function (e) { var t = n.props.dispatch; t({ type: "form/saveFormState", payload: e }); }, n.handleFetchSubmit = function () { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, t = e.isDraft, a = e.autoSave, r = e.callback, o = n.props, l = o.form, c = o.dispatch, i = o.formData, s = o.type, u = l.getFieldsValue, d = n.state.draftId, p = S()({}, i, u()), m = p.id, h = p.title, f = p.message, v = /\ud83c[\udf00-\udfff]|\ud83d[\udc00-\ude4f]|\ud83d[\ude80-\udeff]/g; if (h && null !== h.match(v) || f && null !== f.match(v)) A.a.info("\u4E0D\u652F\u6301\u53D1\u5E03\u8868\u60C5\u7B49\u7B26\u53F7");else { var g = "form/fetchSubmit"; t && (g = "form/fetchSaveDraft"), A.a.loading(t ? "\u4FDD\u5B58\u4E2D" : "\u52A0\u8F7D\u4E2D", 0), n.setState({ uploadingAudio: !0 }), Object(O["uploadAudio"])().then(function (e) { var o = e.url, l = e.recordTime; n.setState({ uploadingAudio: !1 }), console.log("upload success, url => ", o), console.log("upload success, recordTime => ", l), c({ type: g, payload: { formData: S()({}, p, { tapUrl: o, duration: l, id: m || d }), type: s } }).then(function (e) { if (t) { if (!a) return void M.a.push("".concat(Xe["a"], "/county/list?tabBarIndex=1")); var o = n.state.saveDraftFirst; o && a && A.a.info("\u5185\u5BB9\u5DF2\u81EA\u52A8\u4FDD\u5B58\u81F3\u53D1\u4EF6\u7BB1"), n.setState({ saveDraftFirst: !1, draftId: e }); } r && r(); }); })["catch"](function (e) { console.error("upload err: ".concat(e)), A.a.hide(), A.a.info("".concat(e, ",\u8BF7\u91CD\u65B0\u5F55\u97F3")), n.setState({ uploadingAudio: !1 }); }); } }, n.handlePublishConfirm = function () { n.props.formData; var e = n.state.confirmVisible; n.setState({ confirmVisible: !e }); var t = "\u53D1\u901A\u77E5"; e || (t = "\u53D1\u5E03"), Object(R["SetTitle"])(t), n.setState({ topBarTitle: t }); }, n.handleConfirm = function () { n.handleFetchSubmit({ callback: n.handlePublishConfirm }); }, n.countDisabled = function () { for (var e = ["title", "message", "receiveUserTemplate"], t = n.props, a = t.form, r = t.formData, o = a.getFieldsValue, l = S()({}, r, o()), c = !1, i = 0, s = e.length; i < s; i += 1) { var u = e[i], d = l[u]; d && d.length || (c = !0); } return c; }, n.renderCreateButton = function () { var e = Object(F["parse"])(window.location.search.slice(1)), t = e.state, a = e.type, r = n.props, o = r.form, l = r.formData, c = n.countDisabled(), i = o.getFieldsValue, u = n.state.uploadingAudio, d = S()({}, l, i()), p = d.title, m = "draft" === t || "edit" !== a && "reEdit" !== a; return D.a.createElement("div", { className: "btn btn-list" }, m && D.a.createElement(s["a"], { onClick: function onClick() { return n.handleFetchSubmit({ isDraft: !0, autoSave: !1 }); }, disabled: !p }, "\u5B58\u4E3A\u8349\u7A3F"), D.a.createElement(s["a"], { type: "primary", onClick: n.handlePublishConfirm, disabled: c || u }, "\u63D0\u4EA4")); }, n.state = { uploadingAudio: !1, confirmVisible: !1, saveDraftFirst: !0, draftId: "", topBarTitle: "\u53D1\u901A\u77E5", selectResult: {}, authorityFirstUser: "", showCoverPage: !1 }, n; } return f()(a, [{ key: "componentDidMount", value: function value() { var e = this; Object(R["SetTitle"])("\u53D1\u901A\u77E5"); var t = this.props, a = t.dispatch, n = t.moldDataList; window.authcenter.ready(function () { a({ type: "global/fetchQueryRoute" }); var t = e.props, r = t.detailInfo, o = t.formData, l = (t.form, Object(F["parse"])(window.location.search.slice(1))), c = l.type, i = (l.state, o); if (("edit" === c || "reEdit" === c) && null !== r && void 0 !== r) { var s = r.title, u = void 0 === s ? "" : s, d = r.message, p = void 0 === d ? "" : d, m = r.relayContent, h = void 0 === m ? "" : m, f = r.picList, v = void 0 === f ? [] : f, g = r.selectId, y = void 0 === g ? "" : g, C = r.receiveUserTemplate, E = void 0 === C ? "" : C, b = r.receiverCount, N = void 0 === b ? 0 : b, S = r.senderName, w = void 0 === S ? "" : S, k = r.id, D = r.tapUrl, I = r.duration, T = r.annexGroupId, P = r.pushSetting, R = r.senderType, U = r.authoritySelectId, x = r.authorityCount, O = r.coverUrl, j = r.coverName; i = Object.assign({}, i, { title: u || "", message: p.match(/
.+<\/p>/) ? h || "" : p || "", picList: v || [], receiveUserTemplate: E || y || "", receiverCount: N || 0, senderType: R || "dept", senderName: w || "", id: k, tapUrl: D, duration: I, annexGroupId: T || "", pushSetting: P || "1", authoritySelectId: U || "", authorityCount: x || 0, coverUrl: O, coverName: j }); } a({ type: "form/save", payload: { type: c, formData: i, isAuthonReady: !0 } }), n && 0 !== n.length || a({ type: "form/fetchFormInfo" }); }), A.a.loading("\u52A0\u8F7D\u4E2D", 0); var r = document.querySelectorAll("input,textarea"); Array.prototype.forEach.call(r, function (e) { var t = 5; e.onblur = function () { document.body.scrollTop = ++t; }; }), a({ type: "form/getQuestionnaire" }); } }, { key: "componentWillUnmount", value: function value() { var e = this.props.dispatch; e({ type: "form/resetState" }), this.interval && clearInterval(this.interval); } }, { key: "render", value: function value() { var e = this, t = this.props, a = t.formData, c = t.visible, s = t.selectUserType, u = t.first, d = t.isAuthonReady, p = t.form, m = t.deptName, h = t.userName, f = t.moldList, v = t.selectMold, g = t.coverList, y = t.moldDataList, C = this.state, E = C.showCoverPage, b = C.confirmVisible, N = C.topBarTitle, k = C.selectResult, F = C.authorityFirstUser; if (!d) return null; var I = p.getFieldProps, P = (p.setFieldsValue, p.getFieldsValue), R = (p.getFieldDecorator, S()({}, a, P())), U = R.title, j = R.message, A = R.picList, B = R.receiveUserTemplate, L = R.authoritySelectId, _ = R.receiverCount, M = R.authorityCount, z = R.senderName, X = R.tapUrl, q = R.duration, Q = R.annexGroupId, W = R.senderType, Y = R.pushSetting, H = R.shared, J = R.moldName, Z = R.coverName, $ = T.a.session("corpid"), ee = T.a.session("currentUser"), te = ee.orgType, ae = { appId: "54", appName: "\u6D77\u6559\u53D1\u5E03", themeColor: "#fe892b", corpid: $, onOk: function onOk(t) { return e.handleOk(t, s); }, getCheckedNodes: function getCheckedNodes(t) { return e.getCheckedNodes(t, s); }, onCancel: this.handleVisibleChange, selectSignature: "publish" === s ? B || "" : L || "", selectType: "user", onError: this.handleError, orgType: te, showComp: c }, ne = function () { return _ > 0 ? "".concat(_, "\u4EBA") : "\u8BF7\u9009\u62E9"; }(), oe = function () { return M > 0 ? "".concat(M, "\u4EBA") : "\u8BF7\u9009\u62E9"; }(), le = { selectResult: k, authorityFirstUser: F, authorityCount: M, formData: S()({}, a, P()), handleOk: this.handleConfirm, handleCancel: this.handlePublishConfirm }; return D.a.createElement("div", { className: he.a.root }, !c && D.a.createElement(ie["a"], { title: N, onBack: this.handleSelectBack }), D.a.createElement("div", { className: "form-container" }, D.a.createElement(l["a"], i()({}, I("title", { initialValue: U, onChange: this.handleTitleChange }), { placeholder: "\u8BF7\u8F93\u5165\u901A\u77E5\u6807\u9898", maxLength: 100 })), D.a.createElement(o["a"], i()({}, I("message", { initialValue: j }), { autoHeight: !0, rows: 3, placeholder: "\u8BF7\u8F93\u5165\u672C\u6B21\u901A\u77E5\u5185\u5BB9" })), D.a.createElement("div", { className: "img-container" }, D.a.createElement(We, null, D.a.createElement(x.a, i()({}, I("picList", { initialValue: A, valuePropName: "fileList", getValueFromEvent: function getValueFromEvent(e) { var t = e.images; return (t || []).map(function (e) { var t = e.url, a = e.imgSize; return S()({ url: t, imgSize: a }, a); }); } }), { corpid: $, imgSize: !0, multiple: !0, className: "custom-image" })))), D.a.createElement("div", { className: "record-line" }, D.a.createElement("div", { className: "line-top" })), D.a.createElement(We, { className: "record-line-bottom" }, D.a.createElement(O["Record"], { type: X ? "edit" : "record", musicUrl: X, recordTime: q, className: "custom-audio", corpid: $, onError: this.handleError })), D.a.createElement(w["a"], null, D.a.createElement(V.a, i()({}, I("annexGroupId", { initialValue: Q, valuePropName: "groupId", trigger: "callback", getValueFromEvent: function getValueFromEvent(e) { return e; }, callback: this.handleFileGroupIdCallback }), { edit: 0, APIEnv: fe["a"], type: "mobile", groupId: Q, previewUrl: "//".concat(window.location.hostname, "/micro/app/notice/file") }))), D.a.createElement(w["a"], null, D.a.createElement(We, { extra: ne, arrow: "horizontal", className: _ > 0 ? "" : "unselected", onClick: function onClick() { e.handleVisibleChange("publish", !0); } }, D.a.createElement("span", { style: { color: "#F5222D" } }, "*"), "\u53D1\u5E03\u5BF9\u8C61")), D.a.createElement(K, i()({}, I("senderName", { initialValue: z }), { senderType: W, userName: h, deptName: m, onTypeChange: function onTypeChange(t) { e.saveFormState({ senderType: t }); } })), D.a.createElement(w["a"], { className: "border-top-none" }, D.a.createElement(r["a"], { data: f, title: "\u9009\u62E9\u7C7B\u578B", cols: 1, extra: J ? "".concat(J, "\u901A\u77E5") : "\u8BF7\u9009\u62E9", value: v, onChange: this.handleMoldChange }, D.a.createElement(We, { arrow: "horizontal" }, D.a.createElement("span", { style: { color: "#F5222D" } }, "*"), "\u7C7B\u578B")), D.a.createElement(We, { onClick: function onClick() { return e.handleShowPageChange(!0); }, extra: J ? Z : "\u8BF7\u9009\u62E9", arrow: "horizontal" }, D.a.createElement("span", { style: { color: "#F5222D" } }, "*"), "\u63A8\u9001\u5C01\u9762")), D.a.createElement(w["a"], { className: "border-top-none" }, D.a.createElement(We, { extra: oe, arrow: "horizontal", className: M > 0 ? "" : "unselected", onClick: function onClick() { e.handleVisibleChange("authority", !0); } }, "\u76F8\u5173\u6743\u9650\u4EBA"), D.a.createElement(re, { value: ["".concat(Y)], onChange: function onChange(t) { return e.saveFormState({ pushSetting: t }); } }), D.a.createElement(We, { extra: D.a.createElement(n["a"], { color: "#fe892b", checked: !!H, onChange: function onChange(t) { e.saveFormState({ shared: t ? 1 : 0 }); } }) }, "\u5141\u8BB8\u8F6C\u53D1")), D.a.createElement("section", null, this.renderCreateButton())), (!1 !== c || !1 !== u && "" !== B) && D.a.createElement(G.a, ae), !1 !== u && "" !== L && D.a.createElement(G.a, i()({}, ae, { onOk: function onOk(t) { return e.handleOk(t, "authority"); }, getCheckedNodes: function getCheckedNodes(t) { return e.getCheckedNodes(t, "authority"); }, selectSignature: L || "" })), b && D.a.createElement(pe, le), E && D.a.createElement(Ge, { formData: a, showPage: E, handleShowPageChange: this.handleShowPageChange, coverList: g, moldDataList: y })); } }]), a; }(k["Component"]), Le = _e)) || Le), He = Object(L["a"])()(Ye); t["default"] = He; }, PBwp: function PBwp(e, t, a) { e.exports = { root: "root___10zMg" }; }, "VsR+": function VsR(e, t, a) { e.exports = { root: "root___39vqe" }; }, a9aA: function a9aA(e, t, a) { e.exports = { root: "root___235fj" }; }, jGYM: function jGYM(e, t, a) { e.exports = { root: "root___3KQ_R" }; }, qm43: function qm43(e, t, a) { e.exports = { root: "root___33gkU" }; } }]);