xydata-tools 1.0.25 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as DictionaryFront}from"./dictionary";export{default as OrganizationFront}from"./organization";export{default as OutExcel}from"./outExcel";export{default as Sso}from"./sso";export{default as Aaa}from"./aaa";export{default as BothSecurityLayout}from"./both";export{default as UploadFile}from"./uploadFile";export{default as DownloadFile}from"./downloadFile";
|
|
1
|
+
export{default as DictionaryFront}from"./dictionary";export{default as OrganizationFront}from"./organization";export{default as OutExcel}from"./outExcel";export{default as Sso}from"./sso";export{default as Aaa}from"./aaa";export{default as BothSecurityLayout}from"./both";export{default as UploadFile}from"./uploadFile";export{default as DownloadFile}from"./downloadFile";export{default as Version}from"./tools/version";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){_defineProperty(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(e){var r=_toPrimitive(e,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(e,r){if("object"!=_typeof(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function(){return r};var e,r={},t=Object.prototype,n=t.hasOwnProperty,o=Object.defineProperty||function(e,r,t){e[r]=t.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,r,t){return Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[r]}try{l({},"")}catch(e){l=function(e,r,t){return e[r]=t}}function u(e,r,t,n){var i=r&&r.prototype instanceof _?r:_,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:O(e,t,c)}),a}function d(e,r,t){try{return{type:"normal",arg:e.call(r,t)}}catch(e){return{type:"throw",arg:e}}}r.wrap=u;var f="suspendedStart",p="suspendedYield",y="executing",h="completed",m={};function _(){}function g(){}function v(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(k([])));j&&j!==t&&n.call(j,a)&&(b=j);var w=v.prototype=_.prototype=Object.create(b);function T(e){["next","throw","return"].forEach((function(r){l(e,r,(function(e){return this._invoke(r,e)}))}))}function S(e,r){function t(o,i,a,c){var s=d(e[o],e,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==_typeof(u)&&n.call(u,"__await")?r.resolve(u.__await).then((function(e){t("next",e,a,c)}),(function(e){t("throw",e,a,c)})):r.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return t("throw",e,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new r((function(r,o){t(e,n,r,o)}))}return i=i?i.then(o,o):o()}})}function O(r,t,n){var o=f;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var s=P(c,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=d(r,t,n);if("normal"===l.type){if(o=n.done?h:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=h,n.method="throw",n.arg=l.arg)}}}function P(r,t){var n=t.method,o=r.iterator[n];if(o===e)return t.delegate=null,"throw"===n&&r.iterator.return&&(t.method="return",t.arg=e,P(r,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=d(o,r.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,m;var a=i.arg;return a?a.done?(t[r.resultName]=a.value,t.next=r.nextLoc,"return"!==t.method&&(t.method="next",t.arg=e),t.delegate=null,m):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function I(e){var r={tryLoc:e[0]};1 in e&&(r.catchLoc=e[1]),2 in e&&(r.finallyLoc=e[2],r.afterLoc=e[3]),this.tryEntries.push(r)}function C(e){var r=e.completion||{};r.type="normal",delete r.arg,e.completion=r}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function k(r){if(r||""===r){var t=r[a];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,i=function t(){for(;++o<r.length;)if(n.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return i.next=i}}throw new TypeError(_typeof(r)+" is not iterable")}return g.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:g,configurable:!0}),g.displayName=l(v,s,"GeneratorFunction"),r.isGeneratorFunction=function(e){var r="function"==typeof e&&e.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},r.awrap=function(e){return{__await:e}},T(S.prototype),l(S.prototype,c,(function(){return this})),r.AsyncIterator=S,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new S(u(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(w),l(w,s,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var r=Object(e),t=[];for(var n in r)t.push(n);return t.reverse(),function e(){for(;t.length;){var n=t.pop();if(n in r)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=k,A.prototype={constructor:A,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!r)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var t=this;function o(n,o){return c.type="throw",c.arg=r,t.next=n,o&&(t.method="next",t.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,r){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,r){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&r&&(this.next=r),m},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),C(t),m}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.tryLoc===e){var n=t.completion;if("throw"===n.type){var o=n.arg;C(t)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,n){return this.delegate={iterator:k(r),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=e),m}},r}function asyncGeneratorStep(e,r,t,n,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void t(e)}c.done?r(s):Promise.resolve(s).then(n,o)}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise((function(n,o){var i=e.apply(r,t);function a(e){asyncGeneratorStep(i,n,o,a,c,"next",e)}function c(e){asyncGeneratorStep(i,n,o,a,c,"throw",e)}a(void 0)}))}}function _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_unsupportedIterableToArray(e,r)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function _iterableToArrayLimit(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,i,a,c=[],s=!0,l=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;s=!1}else for(;!(s=(n=i.call(t)).done)&&(c.push(n.value),c.length!==r);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}function _arrayWithHoles(e){if(Array.isArray(e))return e}import OrgTree from"./components/OrgTree";import{asyncCallback,formatFormItem,handleTableResponse}from"../../utils/utils.js";import{ArrowDownOutlined,ArrowUpOutlined,DeleteOutlined,EditOutlined,PlusOutlined}from"@ant-design/icons";import{Button,Card,Col,Descriptions,Divider,Empty,Input,Modal,Popconfirm,Row,Space,Spin,ConfigProvider}from"antd";import moment from"moment";import React,{useEffect,useReducer,useRef,useState}from"react";import CreatePeopleForm from"./components/CreatePeopleForm";import CreateSubStoreForm from"./components/CreateSubStoreForm";import"antd/dist/antd.css";import zhCN from"antd/es/locale/zh_CN";import{deleteOrganization,deletePerson,initPassword,queryOrgPeoplePage,queryOrganizationInfo,queryBaseDictList,queryRole}from"./service";import"./styles.less";import{ProTable}from"@ant-design/pro-table";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";var orgTypeFormat=function(e){var r="";return"1"===e?r="疾控中心":"2"===e?r="行政区":"3"===e?r="教育局":"4"===e?r="卫生院":"5"===e?r="街道":"6"===e?r="学校":"10"===e?r="商家":"8"===e?r="社区":"9"===e?r="供应商":"10"===e?r="商家":"11"===e?r="成人学校":"12"===e?r="培训机构":"13"===e?r="小区":"30"===e&&(r="医疗机构"),r},Search=Input.Search,NONES=["",null,void 0],Organization=function(e){var r=useRef(),t=useRef(),n=_slicedToArray(useState(!1),2),o=n[0],i=n[1],a=_slicedToArray(useState(!1),2),c=a[0],s=a[1],l=_slicedToArray(useState(!1),2),u=l[0],d=l[1],f=_slicedToArray(useReducer((function(e){return e+1}),1),2),p=f[0],y=f[1],h=_slicedToArray(useState("C"),2),m=h[0],_=h[1],g=_slicedToArray(useState(!1),2),v=g[0],b=g[1],x=_slicedToArray(useState("C"),2),j=x[0],w=x[1],T=_slicedToArray(useState({}),2),S=T[0],O=T[1],P=_slicedToArray(useState([]),2),I=P[0],C=P[1],A=_slicedToArray(useState([]),2),k=A[0],D=A[1],R=_slicedToArray(useState([]),2),E=R[0],L=R[1],N=_slicedToArray(useState({}),2),F=N[0],G=N[1],Y=_slicedToArray(useState(""),2),z=Y[0],M=Y[1],q=_slicedToArray(useReducer((function(e){return e+1}),1),2),B=q[0],K=q[1];useEffect((function(){H("ORG_TYPE",C),W()}),[]),useEffect((function(){console.log("🚀 ~ Organization ~ selectedKey:",z),F.id&&U(F.id)}),[p]);var H=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(r,t){var n,o;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={dictCode:r,include:!1},e.next=3,queryBaseDictList(n);case 3:o=e.sent,asyncCallback(o,!1)&&t(o.data);case 6:case"end":return e.stop()}}),e)})));return function(r,t){return e.apply(this,arguments)}}(),W=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var r,t,n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,queryRole(r);case 3:t=e.sent,asyncCallback(t,!1)&&(D(null===(n=t.data)||void 0===n?void 0:n.data),console.log("🚀 ~ handleQueryRole ~ res.data:",t.data));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(r){var t,n,o;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={id:r},e.next=3,queryOrganizationInfo(t);case 3:n=e.sent,asyncCallback(n,!1)&&(o=_objectSpread(_objectSpread({},n.data),{},{id:r}),O(o));case 6:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),V=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(!0),e.next=3,deleteOrganization({id:S.id});case 3:if(r=e.sent,i(!1),asyncCallback(r,!0)){e.next=8;break}return e.abrupt("return");case 8:K();case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Q=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(!0),e.next=3,deletePerson({id:t.id});case 3:if(n=e.sent,i(!1),asyncCallback(n,!0)){e.next=8;break}return e.abrupt("return");case 8:r.current.reload();case 9:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),$=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(r){var t,n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.id,e.next=3,initPassword({id:t});case 3:n=e.sent,asyncCallback(n,!0);case 5:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),J=[{title:"姓名",dataIndex:"realname",align:"center",valueType:"input",formItemProps:{name:"key",label:"搜索"},fieldProps:{placeholder:"姓名/手机号"}},{title:"用户名",dataIndex:"username",align:"center",hideInSearch:!0},{title:"性别",dataIndex:"gender",align:"center",render:function(e,r){return 1==e?"男":2==e?"女":"-"},hideInSearch:!0},{title:"出生日期",dataIndex:"birthday",align:"center",render:function(e,r){return r.birthday?moment(r.birthday).format("YYYY-MM-DD"):"-"},hideInSearch:!0},{title:"过期时间",dataIndex:"expiredTime",align:"center",render:function(e,r){return r.expiredTime?moment(r.expiredTime).format("YYYY-MM-DD HH:mm:ss"):"-"},hideInSearch:!0},{title:"操作",dataIndex:"action",align:"center",hideInSearch:!0,render:function(e,r){return _jsxs(Space,{split:_jsx(Divider,{type:"vertical"}),children:[_jsx("a",{className:"textGreen",onClick:function(){Modal.confirm({title:"提示",content:_jsxs("div",{children:["请确认重置密码,初始密码为:",_jsx("span",{style:{color:"red"},children:"Wljsydh@123"}),_jsx("div",{style:{color:"#1F5AD8"},children:"第一个字母大写,其余小写"})]}),okText:"确认",cancelText:"取消",onOk:function(){$(r)},onCancel:function(){}})},children:"初始化密码"}),_jsx("a",{onClick:function(){return ee(!0,r,"L")},children:"查看详情"}),_jsx(Popconfirm,{title:"是否删除该人员?",onConfirm:function(){return Q(r)},children:_jsx(Button,{type:"link",id:"equipment_delete_btn",danger:!0,children:"删除"})})]})}}],X=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("🚀 ~ handleTreeSelect ~ orgItem:",t),t?(G(t),M(null==t?void 0:t.orgCode),U(null==t?void 0:t.id),setTimeout((function(){var e;null===(e=r.current)||void 0===e||e.reload()}),200)):(M(""),G({}));case 2:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),Z=function(e,r){s(!!e),w(r)},ee=function(e,r,t){d(e),_(t),L(r)},re=function(e){b(e)},te=_jsxs(Space,{children:[_jsx(Button,{icon:_jsx(EditOutlined,{}),type:"primary",ghost:!0,onClick:function(){return Z(!0,"U")},children:"编辑机构详情"}),_jsx(Popconfirm,{title:"是否删除该机构?",onConfirm:function(){return V()},children:_jsx(Button,{icon:_jsx(DeleteOutlined,{}),type:"danger",id:"equipment_delete_btn",children:"删除机构"})})]});return _jsxs(ConfigProvider,{locale:zhCN,children:[_jsxs(Row,{gutter:24,className:"org-box",children:[_jsx(Col,{span:8,children:_jsx(OrgTree,{onTreeSelect:X,reloadTree:B,getSelectedKey:z,extra:_jsx(Button,{icon:_jsx(PlusOutlined,{}),size:"small",type:"primary",onClick:function(){return Z(!0,"C")},disabled:!["2","5","8"].includes(null==S?void 0:S.orgType),children:"新增下属机构"})})}),_jsx(Col,{span:16,children:_jsx(_Fragment,{children:_jsx(Spin,{spinning:o,children:z?_jsxs("div",{className:"org-content",children:[_jsxs(Card,{title:"机构信息",bordered:!1,extra:te,children:[_jsxs(Descriptions,{span:2,size:"middle",children:[_jsx(Descriptions.Item,{label:"机构名称",children:S.orgName}),_jsx(Descriptions.Item,{label:"机构编号",children:S.orgCode}),_jsx(Descriptions.Item,{label:"机构类型",children:orgTypeFormat(S.orgType)}),_jsx(Descriptions.Item,{label:"负责人",children:S.liablePerson}),_jsx(Descriptions.Item,{label:"联系方式",children:S.telephone}),_jsx(Descriptions.Item,{label:"地址",children:S.address}),_jsx(Descriptions.Item,{label:"经度",children:S.longitude}),_jsx(Descriptions.Item,{label:"纬度",children:S.latitude}),["1","3","4","6"].includes(S.orgType)&&_jsx(Descriptions.Item,{label:"所属街道",children:S.streetName}),"6"===S.orgType&&_jsx(Descriptions.Item,{label:"关联卫生院",children:S.hospitalName}),v&&_jsxs(_Fragment,{children:[_jsx(Descriptions.Item,{label:"单位具体地址",children:S.minuteAddress}),_jsx(Descriptions.Item,{label:"单位负责人联系电话",children:S.liablePersonTelePhone}),_jsx(Descriptions.Item,{label:"邮政编码",children:S.postCode}),_jsx(Descriptions.Item,{label:"录入日期",children:!NONES.includes(S.inputdate)&&moment(S.inputdate).format("YYYY-MM-DD")}),_jsx(Descriptions.Item,{label:"上报日期",children:!NONES.includes(S.reportdate)&&moment(S.reportdate).format("YYYY-MM-DD")}),_jsx(Descriptions.Item,{label:"录入人姓名",children:S.nameCreate})]})]}),_jsx("div",{style:{textAlign:"center"},children:_jsx("a",v?{onClick:function(){return re(!1)},children:_jsxs(Space,{children:[_jsx(ArrowUpOutlined,{}),"收起更多信息"]})}:{onClick:function(){return re(!0)},children:_jsxs(Space,{children:[_jsx(ArrowDownOutlined,{}),"查看更多信息"]})})})]}),_jsx(ProTable,{actionRef:r,formRef:t,headerTitle:"人员列表",rowKey:"id",search:{collapsed:!1,collapseRender:!1,optionRender:function(e,r,t){return[].concat(_toConsumableArray(t.reverse()),[_jsx(Button,{icon:_jsx(PlusOutlined,{}),type:"primary",onClick:function(){return ee(!0,{},"C")},children:"新增人员"})])}},toolBarRender:!1,request:function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var n,o;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(z){e.next=2;break}return e.abrupt("return");case 2:return t.orgCode=F.orgCode,n=formatFormItem(t),e.next=6,queryOrgPeoplePage(n);case 6:return o=e.sent,e.abrupt("return",handleTableResponse({actionRef:r,res:o}));case 8:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),columns:J,rowSelection:!1})]}):_jsx(Card,{className:"org-empryCard",children:_jsx(Empty,{description:"请选择机构"})})})})})]}),c&&_jsx(CreateSubStoreForm,{modalHandleVisible:Z,modalVisible:c,modalOrgType:j,modalFreshOrgTree:K,modalFreshOrgDtl:y,modalPersonTypes:I,modalTreeItemDtl:S}),u&&_jsx(CreatePeopleForm,{handleModalVisible:function(){return d(!1)},modalVisible:u,currentOrg:S,peopleAttrData:k,modalFreshPeople:r,mType:m,mItem:E})]})};export default Organization;
|
|
1
|
+
function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){_defineProperty(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(e){var r=_toPrimitive(e,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(e,r){if("object"!=_typeof(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function(){return r};var e,r={},t=Object.prototype,n=t.hasOwnProperty,o=Object.defineProperty||function(e,r,t){e[r]=t.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,r,t){return Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[r]}try{l({},"")}catch(e){l=function(e,r,t){return e[r]=t}}function u(e,r,t,n){var i=r&&r.prototype instanceof _?r:_,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:O(e,t,c)}),a}function d(e,r,t){try{return{type:"normal",arg:e.call(r,t)}}catch(e){return{type:"throw",arg:e}}}r.wrap=u;var f="suspendedStart",p="suspendedYield",y="executing",h="completed",m={};function _(){}function g(){}function v(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(k([])));j&&j!==t&&n.call(j,a)&&(b=j);var w=v.prototype=_.prototype=Object.create(b);function T(e){["next","throw","return"].forEach((function(r){l(e,r,(function(e){return this._invoke(r,e)}))}))}function S(e,r){function t(o,i,a,c){var s=d(e[o],e,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==_typeof(u)&&n.call(u,"__await")?r.resolve(u.__await).then((function(e){t("next",e,a,c)}),(function(e){t("throw",e,a,c)})):r.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return t("throw",e,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new r((function(r,o){t(e,n,r,o)}))}return i=i?i.then(o,o):o()}})}function O(r,t,n){var o=f;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var s=P(c,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=d(r,t,n);if("normal"===l.type){if(o=n.done?h:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=h,n.method="throw",n.arg=l.arg)}}}function P(r,t){var n=t.method,o=r.iterator[n];if(o===e)return t.delegate=null,"throw"===n&&r.iterator.return&&(t.method="return",t.arg=e,P(r,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=d(o,r.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,m;var a=i.arg;return a?a.done?(t[r.resultName]=a.value,t.next=r.nextLoc,"return"!==t.method&&(t.method="next",t.arg=e),t.delegate=null,m):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function I(e){var r={tryLoc:e[0]};1 in e&&(r.catchLoc=e[1]),2 in e&&(r.finallyLoc=e[2],r.afterLoc=e[3]),this.tryEntries.push(r)}function C(e){var r=e.completion||{};r.type="normal",delete r.arg,e.completion=r}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function k(r){if(r||""===r){var t=r[a];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,i=function t(){for(;++o<r.length;)if(n.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return i.next=i}}throw new TypeError(_typeof(r)+" is not iterable")}return g.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:g,configurable:!0}),g.displayName=l(v,s,"GeneratorFunction"),r.isGeneratorFunction=function(e){var r="function"==typeof e&&e.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},r.awrap=function(e){return{__await:e}},T(S.prototype),l(S.prototype,c,(function(){return this})),r.AsyncIterator=S,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new S(u(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(w),l(w,s,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var r=Object(e),t=[];for(var n in r)t.push(n);return t.reverse(),function e(){for(;t.length;){var n=t.pop();if(n in r)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=k,A.prototype={constructor:A,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!r)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var t=this;function o(n,o){return c.type="throw",c.arg=r,t.next=n,o&&(t.method="next",t.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,r){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,r){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&r&&(this.next=r),m},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),C(t),m}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.tryLoc===e){var n=t.completion;if("throw"===n.type){var o=n.arg;C(t)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,n){return this.delegate={iterator:k(r),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=e),m}},r}function asyncGeneratorStep(e,r,t,n,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void t(e)}c.done?r(s):Promise.resolve(s).then(n,o)}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise((function(n,o){var i=e.apply(r,t);function a(e){asyncGeneratorStep(i,n,o,a,c,"next",e)}function c(e){asyncGeneratorStep(i,n,o,a,c,"throw",e)}a(void 0)}))}}function _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_unsupportedIterableToArray(e,r)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function _iterableToArrayLimit(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,i,a,c=[],s=!0,l=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;s=!1}else for(;!(s=(n=i.call(t)).done)&&(c.push(n.value),c.length!==r);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}function _arrayWithHoles(e){if(Array.isArray(e))return e}import OrgTree from"./components/OrgTree";import{asyncCallback,formatFormItem,handleTableResponse}from"../../utils/utils.js";import{ArrowDownOutlined,ArrowUpOutlined,DeleteOutlined,EditOutlined,PlusOutlined}from"@ant-design/icons";import{Button,Card,Col,Descriptions,Divider,Empty,Input,Modal,Popconfirm,Row,Space,Spin,ConfigProvider}from"antd";import moment from"moment";import React,{useEffect,useReducer,useRef,useState}from"react";import CreatePeopleForm from"./components/CreatePeopleForm";import CreateSubStoreForm from"./components/CreateSubStoreForm";import"antd/dist/antd.css";import zhCN from"antd/es/locale/zh_CN";import{deleteOrganization,deletePerson,initPassword,queryOrgPeoplePage,queryOrganizationInfo,queryBaseDictList,queryRole}from"./service";import"./styles.less";import ProTable from"@ant-design/pro-table";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";var orgTypeFormat=function(e){var r="";return"1"===e?r="疾控中心":"2"===e?r="行政区":"3"===e?r="教育局":"4"===e?r="卫生院":"5"===e?r="街道":"6"===e?r="学校":"10"===e?r="商家":"8"===e?r="社区":"9"===e?r="供应商":"10"===e?r="商家":"11"===e?r="成人学校":"12"===e?r="培训机构":"13"===e?r="小区":"30"===e&&(r="医疗机构"),r},Search=Input.Search,NONES=["",null,void 0],Organization=function(e){var r=useRef(),t=useRef(),n=_slicedToArray(useState(!1),2),o=n[0],i=n[1],a=_slicedToArray(useState(!1),2),c=a[0],s=a[1],l=_slicedToArray(useState(!1),2),u=l[0],d=l[1],f=_slicedToArray(useReducer((function(e){return e+1}),1),2),p=f[0],y=f[1],h=_slicedToArray(useState("C"),2),m=h[0],_=h[1],g=_slicedToArray(useState(!1),2),v=g[0],b=g[1],x=_slicedToArray(useState("C"),2),j=x[0],w=x[1],T=_slicedToArray(useState({}),2),S=T[0],O=T[1],P=_slicedToArray(useState([]),2),I=P[0],C=P[1],A=_slicedToArray(useState([]),2),k=A[0],D=A[1],R=_slicedToArray(useState([]),2),E=R[0],L=R[1],N=_slicedToArray(useState({}),2),F=N[0],G=N[1],Y=_slicedToArray(useState(""),2),z=Y[0],M=Y[1],q=_slicedToArray(useReducer((function(e){return e+1}),1),2),B=q[0],K=q[1];useEffect((function(){H("ORG_TYPE",C),W()}),[]),useEffect((function(){console.log("🚀 ~ Organization ~ selectedKey:",z),F.id&&U(F.id)}),[p]);var H=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(r,t){var n,o;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={dictCode:r,include:!1},e.next=3,queryBaseDictList(n);case 3:o=e.sent,asyncCallback(o,!1)&&t(o.data);case 6:case"end":return e.stop()}}),e)})));return function(r,t){return e.apply(this,arguments)}}(),W=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var r,t,n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,queryRole(r);case 3:t=e.sent,asyncCallback(t,!1)&&(D(null===(n=t.data)||void 0===n?void 0:n.data),console.log("🚀 ~ handleQueryRole ~ res.data:",t.data));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(r){var t,n,o;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={id:r},e.next=3,queryOrganizationInfo(t);case 3:n=e.sent,asyncCallback(n,!1)&&(o=_objectSpread(_objectSpread({},n.data),{},{id:r}),O(o));case 6:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),V=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(!0),e.next=3,deleteOrganization({id:S.id});case 3:if(r=e.sent,i(!1),asyncCallback(r,!0)){e.next=8;break}return e.abrupt("return");case 8:K();case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Q=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(!0),e.next=3,deletePerson({id:t.id});case 3:if(n=e.sent,i(!1),asyncCallback(n,!0)){e.next=8;break}return e.abrupt("return");case 8:r.current.reload();case 9:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),$=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(r){var t,n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.id,e.next=3,initPassword({id:t});case 3:n=e.sent,asyncCallback(n,!0);case 5:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),J=[{title:"姓名",dataIndex:"realname",align:"center",valueType:"input",formItemProps:{name:"key",label:"搜索"},fieldProps:{placeholder:"姓名/手机号"}},{title:"用户名",dataIndex:"username",align:"center",hideInSearch:!0},{title:"性别",dataIndex:"gender",align:"center",render:function(e,r){return 1==e?"男":2==e?"女":"-"},hideInSearch:!0},{title:"出生日期",dataIndex:"birthday",align:"center",render:function(e,r){return r.birthday?moment(r.birthday).format("YYYY-MM-DD"):"-"},hideInSearch:!0},{title:"过期时间",dataIndex:"expiredTime",align:"center",render:function(e,r){return r.expiredTime?moment(r.expiredTime).format("YYYY-MM-DD HH:mm:ss"):"-"},hideInSearch:!0},{title:"操作",dataIndex:"action",align:"center",hideInSearch:!0,render:function(e,r){return _jsxs(Space,{split:_jsx(Divider,{type:"vertical"}),children:[_jsx("a",{className:"textGreen",onClick:function(){Modal.confirm({title:"提示",content:_jsxs("div",{children:["请确认重置密码,初始密码为:",_jsx("span",{style:{color:"red"},children:"Wljsydh@123"}),_jsx("div",{style:{color:"#1F5AD8"},children:"第一个字母大写,其余小写"})]}),okText:"确认",cancelText:"取消",onOk:function(){$(r)},onCancel:function(){}})},children:"初始化密码"}),_jsx("a",{onClick:function(){return ee(!0,r,"L")},children:"查看详情"}),_jsx(Popconfirm,{title:"是否删除该人员?",onConfirm:function(){return Q(r)},children:_jsx(Button,{type:"link",id:"equipment_delete_btn",danger:!0,children:"删除"})})]})}}],X=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("🚀 ~ handleTreeSelect ~ orgItem:",t),t?(G(t),M(null==t?void 0:t.orgCode),U(null==t?void 0:t.id),setTimeout((function(){var e;null===(e=r.current)||void 0===e||e.reload()}),200)):(M(""),G({}));case 2:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),Z=function(e,r){s(!!e),w(r)},ee=function(e,r,t){d(e),_(t),L(r)},re=function(e){b(e)},te=_jsxs(Space,{children:[_jsx(Button,{icon:_jsx(EditOutlined,{}),type:"primary",ghost:!0,onClick:function(){return Z(!0,"U")},children:"编辑机构详情"}),_jsx(Popconfirm,{title:"是否删除该机构?",onConfirm:function(){return V()},children:_jsx(Button,{icon:_jsx(DeleteOutlined,{}),type:"danger",id:"equipment_delete_btn",children:"删除机构"})})]});return _jsxs(ConfigProvider,{locale:zhCN,children:[_jsxs(Row,{gutter:24,className:"org-box",children:[_jsx(Col,{span:8,children:_jsx(OrgTree,{onTreeSelect:X,reloadTree:B,getSelectedKey:z,extra:_jsx(Button,{icon:_jsx(PlusOutlined,{}),size:"small",type:"primary",onClick:function(){return Z(!0,"C")},disabled:!["2","5","8"].includes(null==S?void 0:S.orgType),children:"新增下属机构"})})}),_jsx(Col,{span:16,children:_jsx(_Fragment,{children:_jsx(Spin,{spinning:o,children:z?_jsxs("div",{className:"org-content",children:[_jsxs(Card,{title:"机构信息",bordered:!1,extra:te,children:[_jsxs(Descriptions,{span:2,size:"middle",children:[_jsx(Descriptions.Item,{label:"机构名称",children:S.orgName}),_jsx(Descriptions.Item,{label:"机构编号",children:S.orgCode}),_jsx(Descriptions.Item,{label:"机构类型",children:orgTypeFormat(S.orgType)}),_jsx(Descriptions.Item,{label:"负责人",children:S.liablePerson}),_jsx(Descriptions.Item,{label:"联系方式",children:S.telephone}),_jsx(Descriptions.Item,{label:"地址",children:S.address}),_jsx(Descriptions.Item,{label:"经度",children:S.longitude}),_jsx(Descriptions.Item,{label:"纬度",children:S.latitude}),["1","3","4","6"].includes(S.orgType)&&_jsx(Descriptions.Item,{label:"所属街道",children:S.streetName}),"6"===S.orgType&&_jsx(Descriptions.Item,{label:"关联卫生院",children:S.hospitalName}),v&&_jsxs(_Fragment,{children:[_jsx(Descriptions.Item,{label:"单位具体地址",children:S.minuteAddress}),_jsx(Descriptions.Item,{label:"单位负责人联系电话",children:S.liablePersonTelePhone}),_jsx(Descriptions.Item,{label:"邮政编码",children:S.postCode}),_jsx(Descriptions.Item,{label:"录入日期",children:!NONES.includes(S.inputdate)&&moment(S.inputdate).format("YYYY-MM-DD")}),_jsx(Descriptions.Item,{label:"上报日期",children:!NONES.includes(S.reportdate)&&moment(S.reportdate).format("YYYY-MM-DD")}),_jsx(Descriptions.Item,{label:"录入人姓名",children:S.nameCreate})]})]}),_jsx("div",{style:{textAlign:"center"},children:_jsx("a",v?{onClick:function(){return re(!1)},children:_jsxs(Space,{children:[_jsx(ArrowUpOutlined,{}),"收起更多信息"]})}:{onClick:function(){return re(!0)},children:_jsxs(Space,{children:[_jsx(ArrowDownOutlined,{}),"查看更多信息"]})})})]}),_jsx(ProTable,{actionRef:r,formRef:t,headerTitle:"人员列表",rowKey:"id",search:{collapsed:!1,collapseRender:!1,optionRender:function(e,r,t){return[].concat(_toConsumableArray(t.reverse()),[_jsx(Button,{icon:_jsx(PlusOutlined,{}),type:"primary",onClick:function(){return ee(!0,{},"C")},children:"新增人员"})])}},toolBarRender:!1,request:function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var n,o;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(z){e.next=2;break}return e.abrupt("return");case 2:return t.orgCode=F.orgCode,n=formatFormItem(t),e.next=6,queryOrgPeoplePage(n);case 6:return o=e.sent,e.abrupt("return",handleTableResponse({actionRef:r,res:o}));case 8:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),columns:J,rowSelection:!1})]}):_jsx(Card,{className:"org-empryCard",children:_jsx(Empty,{description:"请选择机构"})})})})})]}),c&&_jsx(CreateSubStoreForm,{modalHandleVisible:Z,modalVisible:c,modalOrgType:j,modalFreshOrgTree:K,modalFreshOrgDtl:y,modalPersonTypes:I,modalTreeItemDtl:S}),u&&_jsx(CreatePeopleForm,{handleModalVisible:function(){return d(!1)},modalVisible:u,currentOrg:S,peopleAttrData:k,modalFreshPeople:r,mType:m,mItem:E})]})};export default Organization;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _templateObject;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}import{getSessionStorage}from"../../utils/token.js";import styled from"styled-components";import{jsxs as _jsxs}from"react/jsx-runtime";var ButtonBox=styled.div(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n color: #999;\n position: absolute;\n z-index: 3;\n bottom: 20px;\n width: 100%;\n text-align: center;\n font-size: 12px;\n"]))),Version=function(e){var t=e.position,o=void 0===t?"bottom":t,n=e.envData||(getSessionStorage("env_data")?JSON.parse(getSessionStorage("env_data")):{});if("bottom"===o)return _jsxs(ButtonBox,{children:["version:",n.versionName," build:",n.buildTime]})};export default Version;
|