cnhis-design-vue 3.1.42-release.4 → 3.1.42-release.5
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/es/components/big-table/src/BigTable.vue2.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-select-table.d.ts +1 -1
- package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
- package/es/components/big-table/src/hooks/useEvent.js +1 -1
- package/es/components/big-table/src/hooks/useFormat.js +1 -1
- package/es/components/big-table/src/hooks/useNestTable.js +1 -1
- package/es/components/big-table/src/hooks/useTableParse.js +1 -1
- package/es/components/big-table/src/utils.d.ts +11 -1
- package/es/components/big-table/src/utils.js +1 -1
- package/es/components/button-print/index.d.ts +28 -3
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +28 -4
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/form-config/index.d.ts +36 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +36 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +13 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +19 -0
- package/es/components/form-render/index.d.ts +13 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +13 -0
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +13 -0
- package/es/components/form-render/src/components/renderer/date.d.ts +4 -0
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +3 -0
- package/es/components/form-render/src/types/index.d.ts +1 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +17 -3
- package/es/components/iho-table/src/IhoTable.vue.d.ts +17 -3
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +3 -2
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +19 -19
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -237
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +1 -4
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -16
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +25 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +17 -2
- package/es/components/iho-table/src/types/pluginType.d.ts +11 -29
- package/es/components/iho-table/src/utils/index.d.ts +4 -3
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/info-header/index.d.ts +27 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +27 -0
- package/es/components/info-header/src/InfoHeader.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +13 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +14 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/scale-view/index.d.ts +9 -130
- package/es/components/scale-view/index.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +8 -130
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +1 -43
- package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +0 -42
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-address.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +4 -4
- package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
- package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +5 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
- package/es/components/scale-view/src/hooks/use-evaluate.js +1 -1
- package/es/components/scale-view/src/hooks/use-event.js +1 -1
- package/es/components/scale-view/src/types/index.d.ts +7 -0
- package/es/components/scale-view/src/types/index.js +1 -0
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/scale-view/style/scale-view-iconfont.ttf +0 -0
- package/es/components/search-cascader/index.d.ts +12 -1
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +12 -1
- package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
- package/es/components/search-cascader/src/components/SearchMenu.d.ts +8 -1
- package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
- package/es/components/search-cascader/src/constants/index.d.ts +1 -0
- package/es/components/search-cascader/src/constants/index.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
- package/es/components/select-person/index.d.ts +15 -7
- package/es/components/select-person/src/SelectPerson.vue.d.ts +9 -5
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +15 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +15 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
- package/es/env.d.ts +1 -0
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
- package/es/shared/utils/anime.d.ts +1 -1
- package/es/shared/utils/anime.js +1 -1
- package/es/shared/utils/index.d.ts +3 -14
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/vexutils.d.ts +2 -2
- package/es/shared/utils/vexutils.js +1 -1
- package/es/shared/utils/vexutilsExpand.d.ts +254 -0
- package/es/shared/utils/vexutilsExpand.js +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
.c-choice-wrap{display:flex;flex-wrap:wrap;width:100%}.c-choice-wrap .n-radio-input{height:14px;width:14px}.c-choice-wrap .scale-choice-img-wrap{background:#fff;border:1px solid #d5d5d5;border-radius:4px;display:inline-block;height:62px;margin-right:16px;min-width:74px;position:relative;width:74px}.c-choice-wrap .scale-choice-img-wrap:hover .scale-preview-wrap{display:flex}.c-choice-wrap .scale-choice-img-wrap>img{height:100%;object-fit:cover;width:100%}.c-choice-wrap .scale-choice-img-wrap .scale-preview-wrap{align-items:center;background:rgba(0,0,0,.75);border-radius:8px;bottom:0;display:none;font-size:20px;justify-content:center;left:0;position:absolute;right:0;top:0}.c-choice-wrap .scale-choice-img-wrap .scale-preview-wrap i.anticon{color:#fff;margin:0}.c-choice-wrap .presuffix-wrap{align-items:center;display:inline-flex;white-space:normal;width:100%}.c-choice-wrap .n-input{border-bottom:1px solid #d9d9d9;flex:1;max-width:300px}.c-choice-wrap .choose-other{flex:1}.c-choice-wrap .other-span{word-break:break-all}.c-choice-wrap.choice-wrap-1 label{width:100%}.c-choice-wrap.choice-wrap-1 label .n-input{max-width:300px}.c-choice-wrap.choice-wrap-2 label{width:50%}.c-choice-wrap.choice-wrap-3 label{width:33%}.c-choice-wrap.choice-wrap-4 label{width:25%}.c-choice-wrap label{align-items:center;display:inline-flex;margin:4px 0}.c-choice-wrap label .n-radio__label{align-items:center;display:inline-flex;flex:1;white-space:normal}.c-choice-wrap>.n-checkbox{align-items:center;display:inline-flex;margin:4px 0}.c-choice-wrap>.n-checkbox .n-checkbox__label{align-items:center;display:inline-flex;flex:1;white-space:normal}.c-choice-wrap.choice-wrap-1 .n-checkbox{width:100%}.c-choice-wrap.choice-wrap-1 .n-checkbox .n-input{max-width:300px}.c-choice-wrap.choice-wrap-2 .n-checkbox{width:50%}.c-choice-wrap.choice-wrap-3 .n-checkbox{width:33%}.c-choice-wrap.choice-wrap-4 .n-checkbox{width:25%}.c-scale{box-sizing:border-box;color:rgba(0,0,0,.65);height:100%;overflow:hidden;padding-bottom:50px;padding-top:4px;position:relative;text-align:left;width:100%}.c-scale.c-scale-nobtn{padding-bottom:4px}.c-scale .scale-container{box-sizing:border-box;height:100%;overflow-y:auto;padding-bottom:10px;transform-origin:0 0;width:100%}.c-scale .scale-container.scale-container-nopadding{display:flex;flex-direction:column;height:100%}.c-scale .scale-container.scale-container-hasfooter{flex:1}.c-scale .scale-container::-webkit-scrollbar{background-color:#f5f5f5;height:6px;width:10px}.c-scale .scale-container::-webkit-scrollbar-track{background-color:#f2f2f2;border-radius:10px}.c-scale .scale-container::-webkit-scrollbar-thumb{background-color:#dbdcdc;border-radius:10px}.c-scale .no-data-tip{height:100%;width:100%}.c-scale .lb-title{text-align:center}.c-scale .map-container{cursor:pointer}.c-scale .linebar-div{margin-top:24px;text-align:center;width:100%}.c-scale .linebar-div .n-divider{margin-top:4px}.c-scale .my-prompt{background-color:#fff;border-radius:4px;box-shadow:0 5px 13px rgba(0,0,0,.14);padding:10px}.c-scale .img-card{width:100%}.main{box-sizing:border-box}.main .scale-label-required{font-weight:700}.main .required-text{color:#e02828;font-weight:700}.main .score-i{word-break:keep-all}.main .evalute-label{background:rgba(45,122,255,.1);border:1px solid rgba(45,122,255,.5);border-radius:4px;color:#2d7aff;display:inline-block;font-size:12px;height:20px;line-height:20px;margin-left:4px;padding:0 5px}.main .evalute-tip{background:rgba(255,194,0,.15);border-radius:2px;color:#fe9626;cursor:pointer;display:inline-block;margin-left:8px;padding:0 5px}.footer{align-items:center;background:#fff;border-top:1px solid #e8e8e8;box-sizing:border-box;display:flex;flex-basis:50px;height:50px;width:100%}.footer .n-button+.n-button{margin-left:8px}.rich-text-content{word-break:break-all}.rich-text-content p{margin-bottom:0}.rich-text-content img{max-width:100%}.n-dialog.n-modal.c-evatip-dialog-wrap{max-height:unset;overflow-y:hidden;padding:0;width:494px!important}.n-dialog.n-modal.c-evatip-dialog-wrap .n-dialog__title{border-bottom:1px solid #e8e8e8;font-weight:600;height:52px;line-height:52px;padding-left:16px}.n-dialog.n-modal.c-evatip-dialog-wrap .n-base-icon{color:#666;margin:0;position:absolute}.n-dialog.n-modal.c-evatip-dialog-wrap .n-dialog__content{margin:0}.n-dialog.n-modal.c-evatip-dialog-wrap .evatip-container{color:#2e2e2e;font-size:16px;max-height:60vh;min-height:100px;overflow-y:auto;padding:26px 16px}.n-dialog.n-modal.c-evatip-dialog-wrap .evatip-container p{border:1px solid hsla(0,0%,84%,.6);border-radius:4px;font-size:14px;margin-bottom:0;margin-top:12px;padding:16px}.n-dialog.n-modal.c-evatip-dialog-wrap .n-dialog__action{border-top:1px solid #e8e8e8;box-sizing:border-box;display:block;padding:10px 16px;text-align:right;width:100%}.c-answerParse{background:hsla(0,64%,98%,.6);border-radius:8px;color:#2e2e2e;margin-bottom:12px;margin-top:6px;padding:16px}.c-answerParse .answer-res-wrap{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.c-answerParse .answer-res-wrap .answer-res{align-items:center;background:#f06f64;border-radius:18px;color:#fff;display:inline-flex;font-weight:700;line-height:36px;padding:0 18px}.c-answerParse .answer-res-wrap .answer-res svg{font-size:16px;margin-right:8px}.c-answerParse .answer-res-wrap .answer-score{color:#2e2e2e;font-size:14px;font-weight:600}.c-answerParse .correct-answer{line-height:20px;margin-bottom:16px}.c-answerParse .correct-answer p{display:inline-block;font-weight:700}.c-answerParse .correct-answer span{color:#91c850;font-size:16px;word-break:break-all}.c-answerParse .answer-key{line-height:20px}.c-answerParse .answer-key p{font-weight:700;line-height:20px;margin-bottom:16px}.c-answerParse .answer-key span{word-break:break-all}.c-answerParse.answerParse-success{background:rgba(234,251,228,.6)}.c-answerParse.answerParse-success .answer-res{background:#91c850}.c-evaluateCountdown{background:#f2f2f4;border-radius:8px;color:#212121;min-width:166px;padding:8px 12px;position:absolute;right:0;text-align:center;top:0;z-index:1}.c-evaluateCountdown.evaluateCountdown-hasTime:hover{background:#f1f1f4;padding:8px 32px}.c-evaluateCountdown.evaluateCountdown-hasTime:hover .countdown{font-size:26px;line-height:40px}.c-evaluateCountdown.evaluateCountdown-hasTime:hover .countdown span{line-height:unset}.c-evaluateCountdown.evaluateCountdown-hasTime:hover .countdown svg{display:none}.c-evaluateCountdown.evaluateCountdown-hasTime:hover .answered-wrap{display:block}.c-evaluateCountdown.evaluateCountdown-hasTime .answered-wrap{display:none}.c-evaluateCountdown .countdown{align-content:center;color:#000;display:flex;font-size:14px;justify-content:center}.c-evaluateCountdown .countdown span{line-height:18px}.c-evaluateCountdown .countdown svg{color:#969696;font-size:16px;margin-left:8px}.c-evaluateCountdown .countdown.countdown-red{color:#ff1818}.c-evaluateCountdown .answered-wrap span{color:#2d7aff}.c-evaluate-page{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.c-evaluate-page .evaluate-container{border:1px solid #e0e0e0;border-radius:15px;padding:45px 32px;text-align:center;width:620px}.c-evaluate-page .evaluate-container .evaluate-name{color:#212121;font-size:20px;line-height:28px;margin-bottom:10px;max-height:88px;overflow-y:auto;word-break:break-all}.c-evaluate-page .evaluate-container .evaluate-explain{background:#f2f2f4;border-radius:8px;margin-bottom:24px;overflow:hidden;padding:12px 22px 12px 30px;text-align:left}.c-evaluate-page .evaluate-container .evaluate-explain>div{max-height:206px;overflow-y:auto;padding-right:8px;word-break:break-all}.c-evaluate-page .evaluate-container .evaluate-score{display:flex;margin-bottom:24px}.c-evaluate-page .evaluate-container .evaluate-score li+li{border-left:1px solid hsla(0,0%,84%,.6)}.c-evaluate-page .evaluate-container .evaluate-score li{flex:1}.c-evaluate-page .evaluate-container .evaluate-score li div{color:#000;font-size:36px;line-height:50px}.c-evaluate-page .evaluate-container .evaluate-score li span{color:rgba(0,0,0,.6);font-size:14px;line-height:20px}.c-evaluate-page .evaluate-container .evaluate-time-range{color:#000;font-size:14px;line-height:20px;margin-bottom:20px}.c-evaluate-page .evaluate-container .evaluate-btn{border-radius:8px;color:#fff;font-size:18px;height:unset;padding:16px 0;text-align:center;width:380px}.c-totalScore-warp{background:#f2f2f4;border-radius:6px;color:#666;font-size:14px;font-weight:400;margin-bottom:16px;padding:16px}.c-totalScore-warp div+div{margin-top:4px}.c-totalScore-warp span{color:#090909;font-weight:500}.c-totalScore-warp .score-result{color:#2d7aff}.c-sign-wrap .sigan-content-wrap{display:flex;flex-wrap:wrap}.c-sign-wrap .sigan-content-wrap .sign-item{border:1px solid #d5d5d5;border-radius:4px;box-sizing:border-box;height:96px;margin-right:16px;overflow:hidden;position:relative;width:200px}.c-sign-wrap .sigan-content-wrap .sign-item>img{height:100%;width:100%}.c-sign-wrap .sigan-content-wrap .sign-item:hover>div{display:flex}.c-sign-wrap .sigan-content-wrap .sign-item>div{align-items:center;background:rgba(0,0,0,.8);border-radius:4px;bottom:0;display:none;justify-content:center;left:0;position:absolute;right:0;top:0}.c-sign-wrap .sigan-content-wrap .sign-item>div .n-icon{color:#fff;cursor:pointer;font-size:18px}.c-sign-wrap .sigan-content-wrap .sign-item>div .n-icon+.n-icon{margin-left:20px}.c-sign-wrap .sigan-content-wrap .add-sign-wrap{align-items:center;background:#fafafa;border:1px dashed #d5d5d5;border-radius:4px;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;height:96px;justify-content:center;width:200px}.c-sign-wrap .sigan-content-wrap .add-sign-wrap .svg-icon{color:#000;font-size:32px}.c-sign-wrap .sigan-content-wrap .add-sign-wrap span,.sign-com-wrap>span{color:#585858}.sign-com-wrap .sign-canvas{border:1px solid hsla(0,0%,84%,.6);border-radius:4px;margin-top:16px}.c-scale li,.c-scale ul{list-style:none;margin:0;padding:0}.c-scale .n-input{text-align:left;width:100%}.c-scale .n-form-item{--n-label-height:unset!important}.c-scale .c-scle-form-item>.n-form-item-blank{display:block}.no-data-tip{align-items:center;color:#333;display:flex;flex-direction:column;font-size:22px;height:100%;justify-content:center;width:100%}.no-data-tip>img{max-width:70%;width:260px}.no-data-tip>p{color:rgba(0,0,0,.8);font-size:16px;margin-bottom:0;margin-top:12px}.no-data-tip>span{color:rgba(0,0,0,.4);font-size:14px;margin-top:6px}.c-scale-address{max-width:500px}.c-scale-address .field-row{display:flex;overflow:hidden;width:100%}.c-scale-address .field-row .n-select{flex:1;padding:0 5px 5px 0;width:100%}.c-scale-address .field-row .n-select:last-child{padding-right:0}.c-scale-collection,.c-scale-collection .img-card{width:100%}.c-scale-collection.scale-collection-title{text-align:center}.c-scale-collection.scale-collection-title h1{font-weight:500}.c-scale-collection.prompt-message{background-color:#fff;border-radius:4px;box-shadow:0 5px 13px rgba(0,0,0,.14);color:#666;padding:10px;position:relative}.c-scale-collection.prompt-message.is-weak{color:#999}.c-scale-collection.prompt-message.is-strong{color:#ff1818;padding:8px 8px 8px 35px}.c-scale-collection.prompt-message .prompt-icon{font-size:18px;left:8px;position:absolute;top:8px}.c-scale-collection.prompt-message .prompt-message-content{font-size:14px;line-height:16px;word-break:break-all}.c-time-range{align-items:center;display:flex}.c-map-container{cursor:pointer;width:100%}.c-map-container .n-input.map-input .n-input__prefix{transform:rotate(180deg)}.c-map-container .n-input.map-input .n-input__prefix .n-icon{color:rgba(0,0,0,.65)}.c-map-container .n-input.map-input.n-input--disabled .n-input__input-el{background-color:#fff;color:rgba(0,0,0,.65);cursor:pointer}.c-scale-map-modal .n-card__content{overflow:hidden}.c-scale-upload{width:100%}.c-scale-upload .n-upload-file-list{display:flex}.c-scale-upload .n-upload-file-list .n-upload-file .n-upload-file-info .n-upload-file-info__action.n-upload-file-info__action--image-card-type{background:rgba(0,0,0,.5);box-sizing:border-box}.c-scale-upload .n-upload-file-list .n-upload-file .n-upload-file-info .n-upload-file-info__action.n-upload-file-info__action--image-card-type span.n-button__icon{color:#fff}.c-scale-upload .n-upload-file-list .n-upload-trigger.n-upload-trigger--image-card{background-color:#fafafa;border-color:#d5d5d5;height:184px;width:184px}.c-scale-upload .n-upload-file-list .n-upload-file.n-upload-file--image-card-type{background-color:#fafafa;border-color:#d5d5d5;height:184px;padding:8px;width:184px}.c-scale-upload .n-upload-file-list .n-upload-file.n-upload-file--image-card-type .n-image{height:100%}.c-scale-upload .n-upload-file-list .n-upload-file.n-upload-file--image-card-type img{object-fit:cover!important}.c-scale-upload .upload-img-wrap{align-items:center;display:flex;flex-direction:column}.c-scale-upload .dragger-upload-text{align-items:center;display:flex}.c-scale-upload.scale-upload-file .n-upload-dragger{padding:16px 0}.c-scale-upload.scale-upload-file .n-upload{--n-item-disabled-opacity:1!important;opacity:1!important}.c-scale-upload.scale-upload-file .dragger-upload-text{color:rgba(0,0,0,.65)}.c-scale-upload.scale-upload-file .n-upload-file-list{display:flex;flex-direction:column;width:100%}.c-scale-upload.scale-upload-file .n-upload-file-list .n-upload-file{width:100%}.c-scale-upload.scale-upload-file .n-upload-trigger{background:#fafafa;border-color:#d5d5d5;width:100%}.text-over-tooltip-components{display:inline-block;max-width:98%}.text-over-tooltip-components .ellipsis{color:#35393c;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-over-tooltip-components .ellipsis i{font-style:normal;white-space:nowrap;word-break:keep-all}.text-over-tooltip-components .fs20{color:green;font-size:20px;font-weight:600;line-height:22px}.text-over-tooltip-components .fs12{color:orange;font-size:12px;font-weight:400;line-height:14px}.c-scale-modal-container.n-dialog{display:flex;flex-direction:column;height:60vh}.c-scale-modal-container.n-dialog.n-modal{min-width:560px;padding:0;width:50vw}.c-scale-modal-container.n-dialog .n-dialog__title{background:#fff;border-bottom:1px solid #e8e8e8;border-radius:8px 8px 0 0;box-sizing:border-box;height:52px;line-height:52px;padding:14px 16px}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content{align-items:center;color:#000;display:flex;font-size:16px;height:100%;justify-content:space-between;overflow:hidden;width:100%}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .modal-title-drag{flex:1}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .svg-wrap{right:16px}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .svg-wrap svg{cursor:pointer;font-size:14px}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .svg-wrap svg+svg{margin-left:16px}.c-scale-modal-container.n-dialog .n-dialog__content{height:100%;margin:0;overflow:hidden;padding:16px}.c-scale-modal-container.n-dialog .n-dialog__action{background:transparent;border-radius:0 0 8px 8px;border-top:1px solid #e8e8e8;box-sizing:border-box;height:52px;padding:10px 16px;text-align:right}
|
|
1
|
+
@font-face{font-family:scale-view-iconfont;src:url(scale-view-iconfont.ttf?t=1682489008262) format("truetype")}.scale-view-iconfont{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:scale-view-iconfont!important;font-size:14px;font-style:normal}.icon-scale-view-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-scale-view-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-scale-view-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.icon-scale-view-shijian:before{content:"\e8c5"}.icon-scale-view-qianming:before{content:"\e6ca"}.icon-scale-view-cuo:before{content:"\e6e5"}.icon-scale-view-dui:before{content:"\e7c8"}.icon-scale-view-dengpao:before{content:"\e719"}.c-scale-view-block .c-choice-wrap{display:flex;flex-wrap:wrap;width:100%}.c-scale-view-block .c-choice-wrap .n-radio-input{height:14px;width:14px}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap{background:#fff;border:1px solid #d5d5d5;border-radius:4px;display:inline-block;height:62px;margin-right:16px;min-width:74px;position:relative;width:74px}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap:hover .scale-preview-wrap{display:flex}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap>img{height:100%;object-fit:cover;width:100%}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap .scale-preview-wrap{align-items:center;background:rgba(0,0,0,.75);border-radius:8px;bottom:0;display:none;font-size:20px;justify-content:center;left:0;position:absolute;right:0;top:0}.c-scale-view-block .c-choice-wrap .scale-choice-img-wrap .scale-preview-wrap i.anticon{color:#fff;margin:0}.c-scale-view-block .c-choice-wrap .presuffix-wrap{align-items:center;display:inline-flex;white-space:normal;width:100%}.c-scale-view-block .c-choice-wrap .n-input{border-bottom:1px solid #d9d9d9;flex:1;max-width:300px}.c-scale-view-block .c-choice-wrap .choose-other{flex:1}.c-scale-view-block .c-choice-wrap .other-span{word-break:break-all}.c-scale-view-block .c-choice-wrap.choice-wrap-1 label{width:100%}.c-scale-view-block .c-choice-wrap.choice-wrap-1 label .n-input{max-width:300px}.c-scale-view-block .c-choice-wrap.choice-wrap-2 label{width:50%}.c-scale-view-block .c-choice-wrap.choice-wrap-3 label{width:33%}.c-scale-view-block .c-choice-wrap.choice-wrap-4 label{width:25%}.c-scale-view-block .c-choice-wrap label{align-items:center;display:inline-flex;margin:4px 0}.c-scale-view-block .c-choice-wrap label .n-radio__label{align-items:center;display:inline-flex;flex:1;white-space:normal}.c-scale-view-block .c-choice-wrap>.n-checkbox{align-items:center;display:inline-flex;margin:4px 0}.c-scale-view-block .c-choice-wrap>.n-checkbox .n-checkbox__label{align-items:center;display:inline-flex;flex:1;white-space:normal}.c-scale-view-block .c-choice-wrap.choice-wrap-1 .n-checkbox{width:100%}.c-scale-view-block .c-choice-wrap.choice-wrap-1 .n-checkbox .n-input{max-width:300px}.c-scale-view-block .c-choice-wrap.choice-wrap-2 .n-checkbox{width:50%}.c-scale-view-block .c-choice-wrap.choice-wrap-3 .n-checkbox{width:33%}.c-scale-view-block .c-choice-wrap.choice-wrap-4 .n-checkbox{width:25%}.c-scale-view-block{box-sizing:border-box;color:rgba(0,0,0,.65);display:flex;flex-direction:column;height:100%;overflow:hidden;padding-top:4px;position:relative;text-align:left;width:100%}.c-scale-view-block .scale-container{box-sizing:border-box;height:100%;overflow-y:auto;transform-origin:0 0;width:100%}.c-scale-view-block .scale-container.scale-container-nopadding{display:flex;flex-direction:column;height:100%}.c-scale-view-block .scale-container.scale-container-hasfooter{flex:1}.c-scale-view-block .scale-container::-webkit-scrollbar{background-color:#f5f5f5;height:6px;width:10px}.c-scale-view-block .scale-container::-webkit-scrollbar-track{background-color:#f2f2f2;border-radius:10px}.c-scale-view-block .scale-container::-webkit-scrollbar-thumb{background-color:#dbdcdc;border-radius:10px}.c-scale-view-block .lb-title{text-align:center}.c-scale-view-block .map-container{cursor:pointer}.c-scale-view-block .linebar-div{margin-top:24px;text-align:center;width:100%}.c-scale-view-block .linebar-div .n-divider{margin-top:4px}.c-scale-view-block .my-prompt{background-color:#fff;border-radius:4px;box-shadow:0 5px 13px rgba(0,0,0,.14);padding:10px}.c-scale-view-block .img-card{width:100%}.c-scale-view-block .main{box-sizing:border-box}.c-scale-view-block .main .scale-label-required{font-weight:700}.c-scale-view-block .main .required-text{color:#e02828;font-weight:700}.c-scale-view-block .main .score-i{word-break:keep-all}.c-scale-view-block .main .evalute-label{background:rgba(45,122,255,.1);border:1px solid rgba(45,122,255,.5);border-radius:4px;color:#2d7aff;display:inline-block;font-size:12px;height:20px;line-height:20px;margin-left:4px;padding:0 5px}.c-scale-view-block .main .evalute-tip{background:rgba(255,194,0,.15);border-radius:2px;color:#fe9626;cursor:pointer;display:inline-block;margin-left:8px;padding:0 5px}.c-scale-view-block .footer{align-items:center;background:#fff;border-top:1px solid #e8e8e8;box-sizing:border-box;display:flex;flex-basis:50px;height:50px;width:100%}.c-scale-view-block .footer .n-button+.n-button{margin-left:8px}.n-dialog.n-modal.c-evatip-dialog-wrap{max-height:unset;overflow-y:hidden;padding:0;width:494px!important}.n-dialog.n-modal.c-evatip-dialog-wrap .n-dialog__title{border-bottom:1px solid #e8e8e8;font-weight:600;height:52px;line-height:52px;padding-left:16px}.n-dialog.n-modal.c-evatip-dialog-wrap .n-base-icon{color:#666;margin:0;position:absolute}.n-dialog.n-modal.c-evatip-dialog-wrap .n-dialog__content{margin:0}.n-dialog.n-modal.c-evatip-dialog-wrap .evatip-container{color:#2e2e2e;font-size:16px;max-height:60vh;min-height:100px;overflow-y:auto;padding:26px 16px}.n-dialog.n-modal.c-evatip-dialog-wrap .evatip-container p{border:1px solid hsla(0,0%,84%,.6);border-radius:4px;font-size:14px;margin-bottom:0;margin-top:12px;padding:16px}.n-dialog.n-modal.c-evatip-dialog-wrap .n-dialog__action{border-top:1px solid #e8e8e8;box-sizing:border-box;display:block;padding:10px 16px;text-align:right;width:100%}.c-scale-view-block .c-answerParse{background:hsla(0,64%,98%,.6);border-radius:8px;color:#2e2e2e;margin-bottom:12px;margin-top:6px;padding:16px}.c-scale-view-block .c-answerParse .answer-res-wrap{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.c-scale-view-block .c-answerParse .answer-res-wrap .answer-res{align-items:center;background:#f06f64;border-radius:18px;color:#fff;display:inline-flex;font-weight:700;line-height:36px;padding:0 18px}.c-scale-view-block .c-answerParse .answer-res-wrap .answer-res svg{font-size:16px;margin-right:8px}.c-scale-view-block .c-answerParse .answer-res-wrap .answer-score{color:#2e2e2e;font-size:14px;font-weight:600}.c-scale-view-block .c-answerParse .correct-answer{line-height:20px;margin-bottom:16px}.c-scale-view-block .c-answerParse .correct-answer p{display:inline-block;font-weight:700}.c-scale-view-block .c-answerParse .correct-answer span{color:#91c850;font-size:16px;word-break:break-all}.c-scale-view-block .c-answerParse .answer-key{line-height:20px}.c-scale-view-block .c-answerParse .answer-key p{font-weight:700;line-height:20px;margin-bottom:16px}.c-scale-view-block .c-answerParse .answer-key span{word-break:break-all}.c-scale-view-block .c-answerParse.answerParse-success{background:rgba(234,251,228,.6)}.c-scale-view-block .c-answerParse.answerParse-success .answer-res{background:#91c850}.c-scale-view-block .c-evaluateCountdown{background:#f2f2f4;border-radius:8px;color:#212121;min-width:166px;padding:8px 12px;position:absolute;right:0;text-align:center;top:0;z-index:1}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime:hover{background:#f1f1f4;padding:8px 32px}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime:hover .countdown{font-size:26px;line-height:40px}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime:hover .countdown span{line-height:unset}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime:hover .countdown svg{display:none}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime:hover .answered-wrap{display:block}.c-scale-view-block .c-evaluateCountdown.evaluateCountdown-hasTime .answered-wrap{display:none}.c-scale-view-block .c-evaluateCountdown .countdown{align-content:center;color:#000;display:flex;font-size:14px;justify-content:center}.c-scale-view-block .c-evaluateCountdown .countdown span{line-height:18px}.c-scale-view-block .c-evaluateCountdown .countdown svg{color:#969696;font-size:16px;margin-left:8px}.c-scale-view-block .c-evaluateCountdown .countdown.countdown-red{color:#ff1818}.c-scale-view-block .c-evaluateCountdown .answered-wrap span{color:#2d7aff}.c-scale-view-block .c-evaluate-page{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.c-scale-view-block .c-evaluate-page .evaluate-container{border:1px solid #e0e0e0;border-radius:15px;padding:45px 32px;text-align:center;width:620px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-name{color:#212121;font-size:20px;line-height:28px;margin-bottom:10px;max-height:88px;overflow-y:auto;word-break:break-all}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-explain{background:#f2f2f4;border-radius:8px;margin-bottom:24px;overflow:hidden;padding:12px 22px 12px 30px;text-align:left}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-explain>div{max-height:206px;overflow-y:auto;padding-right:8px;word-break:break-all}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score{display:flex;margin-bottom:24px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score li+li{border-left:1px solid hsla(0,0%,84%,.6)}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score li{flex:1}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score li div{color:#000;font-size:36px;line-height:50px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-score li span{color:rgba(0,0,0,.6);font-size:14px;line-height:20px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-time-range{color:#000;font-size:14px;line-height:20px;margin-bottom:20px}.c-scale-view-block .c-evaluate-page .evaluate-container .evaluate-btn{border-radius:8px;color:#fff;font-size:18px;height:unset;padding:16px 0;text-align:center;width:380px}.c-scale-view-block .c-totalScore-warp{background:#f2f2f4;border-radius:6px;color:#666;font-size:14px;font-weight:400;margin-bottom:16px;padding:16px}.c-scale-view-block .c-totalScore-warp div+div{margin-top:4px}.c-scale-view-block .c-totalScore-warp span{color:#090909;font-weight:500}.c-scale-view-block .c-totalScore-warp .score-result{color:#2d7aff}.c-scale-view-block .c-sign-wrap .sigan-content-wrap{display:flex;flex-wrap:wrap}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item{border:1px solid #d5d5d5;border-radius:4px;box-sizing:border-box;height:96px;margin-right:16px;overflow:hidden;position:relative;width:200px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item>img{height:100%;width:100%}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item:hover>div{display:flex}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item>div{align-items:center;background:rgba(0,0,0,.8);border-radius:4px;bottom:0;display:none;justify-content:center;left:0;position:absolute;right:0;top:0}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item>div .n-icon{color:#fff;cursor:pointer;font-size:18px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .sign-item>div .n-icon+.n-icon{margin-left:20px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .add-sign-wrap{align-items:center;background:#fafafa;border:1px dashed #d5d5d5;border-radius:4px;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;height:96px;justify-content:center;width:200px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .add-sign-wrap .scale-view-iconfont{color:#000;font-size:32px}.c-scale-view-block .c-sign-wrap .sigan-content-wrap .add-sign-wrap span,.c-scale-view-block .sign-com-wrap>span{color:#585858}.c-scale-view-block .sign-com-wrap .sign-canvas{border:1px solid hsla(0,0%,84%,.6);border-radius:4px;margin-top:16px}.c-scale-view-block li,.c-scale-view-block ul{list-style:none;margin:0;padding:0}.c-scale-view-block .n-input{text-align:left;width:100%}.c-scale-view-block .n-form-item{--n-label-height:unset!important}.c-scale-view-block .c-scle-form-item>.n-form-item-blank{display:block}.c-scale-view-block .no-data-tip{align-items:center;color:#333;display:flex;flex-direction:column;font-size:22px;height:100%;justify-content:center;width:100%}.c-scale-view-block .no-data-tip>img{max-width:70%;width:260px}.c-scale-view-block .no-data-tip>p{color:rgba(0,0,0,.8);font-size:16px;margin-bottom:0;margin-top:12px}.c-scale-view-block .no-data-tip>span{color:rgba(0,0,0,.4);font-size:14px;margin-top:6px}.c-scale-view-block .c-scale-address{max-width:500px}.c-scale-view-block .c-scale-address .field-row{display:flex;overflow:hidden;width:100%}.c-scale-view-block .c-scale-address .field-row .n-select{flex:1;padding:0 5px 5px 0;width:100%}.c-scale-view-block .c-scale-address .field-row .n-select:last-child{padding-right:0}.c-scale-view-block .c-scale-collection,.c-scale-view-block .c-scale-collection .img-card{width:100%}.c-scale-view-block .c-scale-collection.scale-collection-title{text-align:center}.c-scale-view-block .c-scale-collection.scale-collection-title h1{font-weight:500}.c-scale-view-block .c-scale-collection.prompt-message{background-color:#fff;border-radius:4px;box-shadow:0 5px 13px rgba(0,0,0,.14);color:#666;padding:10px;position:relative}.c-scale-view-block .c-scale-collection.prompt-message.is-weak{color:#999}.c-scale-view-block .c-scale-collection.prompt-message.is-strong{color:#ff1818;padding:8px 8px 8px 35px}.c-scale-view-block .c-scale-collection.prompt-message .prompt-icon{font-size:18px;left:8px;position:absolute;top:8px}.c-scale-view-block .c-scale-collection.prompt-message .prompt-message-content{font-size:14px;line-height:16px;word-break:break-all}.c-scale-view-block .c-time-range{align-items:center;display:flex}.c-scale-view-block .c-map-container{cursor:pointer;width:100%}.c-scale-view-block .c-map-container .n-input.map-input .n-input__prefix{transform:rotate(180deg)}.c-scale-view-block .c-map-container .n-input.map-input .n-input__prefix .n-icon{color:rgba(0,0,0,.65)}.c-scale-view-block .c-map-container .n-input.map-input.n-input--disabled .n-input__input-el{background-color:#fff;color:rgba(0,0,0,.65);cursor:pointer}.c-scale-view-block .c-scale-upload{width:100%}.c-scale-view-block .c-scale-upload .n-upload-file-list{display:flex}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file .n-upload-file-info .n-upload-file-info__action.n-upload-file-info__action--image-card-type{background:rgba(0,0,0,.5);box-sizing:border-box}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file .n-upload-file-info .n-upload-file-info__action.n-upload-file-info__action--image-card-type span.n-button__icon{color:#fff}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-trigger.n-upload-trigger--image-card{background-color:#fafafa;border-color:#d5d5d5;height:184px;width:184px}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file.n-upload-file--image-card-type{background-color:#fafafa;border-color:#d5d5d5;height:184px;padding:8px;width:184px}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file.n-upload-file--image-card-type .n-image{height:100%}.c-scale-view-block .c-scale-upload .n-upload-file-list .n-upload-file.n-upload-file--image-card-type img{object-fit:cover!important}.c-scale-view-block .c-scale-upload .upload-img-wrap{align-items:center;display:flex;flex-direction:column}.c-scale-view-block .c-scale-upload .dragger-upload-text{align-items:center;display:flex}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload-dragger{padding:16px 0}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload{--n-item-disabled-opacity:1!important;opacity:1!important}.c-scale-view-block .c-scale-upload.scale-upload-file .dragger-upload-text{color:rgba(0,0,0,.65)}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload-file-list{display:flex;flex-direction:column;width:100%}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload-file-list .n-upload-file{width:100%}.c-scale-view-block .c-scale-upload.scale-upload-file .n-upload-trigger{background:#fafafa;border-color:#d5d5d5;width:100%}.c-scale-view-block .text-over-tooltip-components{display:inline-block;max-width:98%}.c-scale-view-block .text-over-tooltip-components .ellipsis{color:#35393c;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-scale-view-block .text-over-tooltip-components .ellipsis i{font-style:normal;white-space:nowrap;word-break:keep-all}.c-scale-view-block .text-over-tooltip-components .fs20{color:green;font-size:20px;font-weight:600;line-height:22px}.c-scale-view-block .text-over-tooltip-components .fs12{color:orange;font-size:12px;font-weight:400;line-height:14px}.c-scale-map-modal .n-card__content{overflow:hidden}.c-scale-modal-container.n-dialog{display:flex;flex-direction:column;height:60vh}.c-scale-modal-container.n-dialog.n-modal{min-width:560px;padding:0;width:50vw}.c-scale-modal-container.n-dialog .n-dialog__title{background:#fff;border-bottom:1px solid #e8e8e8;border-radius:8px 8px 0 0;box-sizing:border-box;height:52px;line-height:52px;padding:14px 16px}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content{align-items:center;color:#000;display:flex;font-size:16px;height:100%;justify-content:space-between;overflow:hidden;width:100%}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .modal-title-drag{flex:1}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .svg-wrap{right:16px}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .svg-wrap svg{cursor:pointer;font-size:14px}.c-scale-modal-container.n-dialog .n-dialog__title .n-dialog__title-content .svg-wrap svg+svg{margin-left:16px}.c-scale-modal-container.n-dialog .n-dialog__content{height:100%;margin:0;overflow:hidden;padding:16px}.c-scale-modal-container.n-dialog .n-dialog__action{background:transparent;border-radius:0 0 8px 8px;border-top:1px solid #e8e8e8;box-sizing:border-box;height:52px;padding:10px 16px;text-align:right}
|
|
Binary file
|
|
@@ -101,9 +101,11 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
101
101
|
emitValue: (value: string | import("../../../es/shared/types").AnyObject[]) => void;
|
|
102
102
|
onClear: () => void;
|
|
103
103
|
onClick: (evt: Event) => void;
|
|
104
|
+
onKeydown: (evt: KeyboardEvent) => void;
|
|
104
105
|
cssVariable: {
|
|
105
106
|
'--menu-width': number;
|
|
106
107
|
};
|
|
108
|
+
eventBus: import("../../../es/shared/types").AnyObject;
|
|
107
109
|
uuid: string;
|
|
108
110
|
show: import("vue").Ref<boolean> | import("vue").WritableComputedRef<boolean>;
|
|
109
111
|
patternContent: import("vue").Ref<string>;
|
|
@@ -114,11 +116,13 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
114
116
|
inputRef: import("vue").Ref<any>;
|
|
115
117
|
popoverRef: import("vue").Ref<any>;
|
|
116
118
|
currentNode: import("vue").Ref<import("../../../es/shared/types").AnyObject | undefined>;
|
|
119
|
+
cursorNode: import("vue").Ref<import("../../../es/shared/types").AnyObject | undefined>;
|
|
117
120
|
loadingNode: import("vue").Ref<import("../../../es/shared/types").Nullable<import("../../../es/shared/types").AnyObject>>;
|
|
118
121
|
search: (payload?: {
|
|
119
122
|
type: "search" | "update";
|
|
120
123
|
node: import("../../../es/shared/types").AnyObject;
|
|
121
124
|
} | undefined, keyword?: string | undefined) => Promise<void>;
|
|
125
|
+
changeCursorNode: (node: import("../../../es/shared/types").AnyObject) => void;
|
|
122
126
|
NInput: any;
|
|
123
127
|
NPopover: any;
|
|
124
128
|
SearchMenu: import("vue").DefineComponent<{
|
|
@@ -141,7 +145,10 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
141
145
|
currentNode: {
|
|
142
146
|
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
143
147
|
};
|
|
144
|
-
|
|
148
|
+
cursorNode: {
|
|
149
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
150
|
+
};
|
|
151
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
145
152
|
childKey: {
|
|
146
153
|
type: StringConstructor;
|
|
147
154
|
default: string;
|
|
@@ -161,8 +168,12 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
161
168
|
currentNode: {
|
|
162
169
|
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
163
170
|
};
|
|
171
|
+
cursorNode: {
|
|
172
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
173
|
+
};
|
|
164
174
|
}>> & {
|
|
165
175
|
onNodeClick?: ((...args: any[]) => any) | undefined;
|
|
176
|
+
onChangeCursor?: ((...args: any[]) => any) | undefined;
|
|
166
177
|
}, {
|
|
167
178
|
options: import("../../../es/shared/types").AnyObject[];
|
|
168
179
|
valueKey: string;
|
|
@@ -103,9 +103,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
103
103
|
emitValue: (value: ValueType) => void;
|
|
104
104
|
onClear: () => void;
|
|
105
105
|
onClick: (evt: Event) => void;
|
|
106
|
+
onKeydown: (evt: KeyboardEvent) => void;
|
|
106
107
|
cssVariable: {
|
|
107
108
|
'--menu-width': number;
|
|
108
109
|
};
|
|
110
|
+
eventBus: AnyObject;
|
|
109
111
|
uuid: string;
|
|
110
112
|
show: import("vue").Ref<boolean> | import("vue").WritableComputedRef<boolean>;
|
|
111
113
|
patternContent: import("vue").Ref<string>;
|
|
@@ -116,11 +118,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
116
118
|
inputRef: import("vue").Ref<any>;
|
|
117
119
|
popoverRef: import("vue").Ref<any>;
|
|
118
120
|
currentNode: import("vue").Ref<AnyObject | undefined>;
|
|
121
|
+
cursorNode: import("vue").Ref<AnyObject | undefined>;
|
|
119
122
|
loadingNode: import("vue").Ref<Nullable<AnyObject>>;
|
|
120
123
|
search: (payload?: {
|
|
121
124
|
type: 'search' | 'update';
|
|
122
125
|
node: AnyObject;
|
|
123
126
|
}, keyword?: string) => Promise<void>;
|
|
127
|
+
changeCursorNode: (node: AnyObject) => void;
|
|
124
128
|
NInput: any;
|
|
125
129
|
NPopover: any;
|
|
126
130
|
SearchMenu: import("vue").DefineComponent<{
|
|
@@ -143,7 +147,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
143
147
|
currentNode: {
|
|
144
148
|
type: PropType<AnyObject>;
|
|
145
149
|
};
|
|
146
|
-
|
|
150
|
+
cursorNode: {
|
|
151
|
+
type: PropType<AnyObject>;
|
|
152
|
+
};
|
|
153
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
147
154
|
childKey: {
|
|
148
155
|
type: StringConstructor;
|
|
149
156
|
default: string;
|
|
@@ -163,8 +170,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
163
170
|
currentNode: {
|
|
164
171
|
type: PropType<AnyObject>;
|
|
165
172
|
};
|
|
173
|
+
cursorNode: {
|
|
174
|
+
type: PropType<AnyObject>;
|
|
175
|
+
};
|
|
166
176
|
}>> & {
|
|
167
177
|
onNodeClick?: ((...args: any[]) => any) | undefined;
|
|
178
|
+
onChangeCursor?: ((...args: any[]) => any) | undefined;
|
|
168
179
|
}, {
|
|
169
180
|
options: AnyObject[];
|
|
170
181
|
valueKey: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,provide as a,computed as l,ref as t,nextTick as r,
|
|
1
|
+
import{defineComponent as e,provide as a,computed as l,ref as t,nextTick as r,watch as o,openBlock as u,createBlock as n,unref as s,isRef as i,normalizeStyle as c,withCtx as v,createVNode as d,createElementVNode as p,renderSlot as f}from"vue";import{uuidGenerator as y}from"../../../shared/utils/index.js";import{NOOP as h}from"@vue/shared";import{useDebounceFn as m,useEventBus as g,useVModel as b,onClickOutside as w}from"@vueuse/core";import{isString as k,isArray as S,isFunction as _,isObject as K}from"lodash-es";import{NPopover as C,NInput as N}from"naive-ui";import{InjectionSearchCascaderCheckAbleLevel as P,InjectionKeyboardEventBus as j,InjectionSearchCascaderLoadingNode as x,InjectionSearchCascaderValue as A}from"./constants/index.js";import{useCssVariable as U}from"./hooks/useCssVariable.js";import{SearchMenu as V}from"./components/SearchMenu.js";import F from"../../../_virtual/plugin-vue_export-helper.js";const L=["id"];var B=F(e({__name:"SearchCascader",props:{value:{type:[String,Array]},show:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},childKey:{type:String,default:"children"},placeholder:{type:String,default:"请选择"},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},options:{type:Array,default:()=>[]},search:{type:Function},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},checkAbleLevel:{type:[Number,String],default:"last"},beforeSetValue:{type:Function}},emits:["update:value","focus","update:show"],setup(e,{emit:F}){const B=e;function E(){var e;e=[],Promise.resolve(_(B.beforeSetValue)?B.beforeSetValue(e):e).then((e=>F("update:value",e)),h)}function I(e){var a;"INPUT"===(null==(a=e.target)?void 0:a.tagName)&&H()}const R=m((e=>{var a;"INPUT"!==(null==(a=e.target)?void 0:a.tagName)||"Enter"!==e.code||q.value?M.emit(e.key):H()}),50),T=U(),M=g("cascaderKeydown"),$=y(),q=b(B,"show",F);a(P,l((()=>B.checkAbleLevel))),a(j,M);const z=t(""),D=l({get:()=>q.value?z.value:k(B.value)?B.value:S(B.value)?B.value.reduce(((e,a,l)=>0===l?a[B.labelKey]:e+" / "+a[B.labelKey]),""):"",set(e){z.value=e,Z(void 0,e)}});function G(e){F("focus",e)}function H(){q.value||(q.value=!0,z.value="",Z())}async function J(){var e;q.value=!1,null==(e=O.value)||e.blur()}const O=t();w(O,(e=>{var a;if(!q.value)return;const l=e;if(!l.target)return J();!function(e){let a=!1,l=e;for(;l;){if(l.id===$){a=!0;break}l=l.parentElement}return a}(l.target)?J():null==(a=O.value)||a.focus()}));const Q=t(),W=t(),X=t(),Y=t(null);a(x,Y),a(A,l((()=>B.value)));const Z=m((async(e,a)=>{var l;const{type:t,node:o}=e||{};try{if("update"===t)return void(_(B.search)&&B.search({...o,isLeaf:!0}));Y.value=o;const e=await(_(B.search)&&B.search(o,a));W.value=K(e)?e:o}finally{Y.value=null,await r(),null==(l=Q.value)||l.syncPosition()}}),400),ee=e=>{X.value=e};return o((()=>B.show),(e=>{e&&(X.value={})})),(a,l)=>(u(),n(s(C),{class:"search-cascader",trigger:"manual",show:s(q),"onUpdate:show":l[1]||(l[1]=e=>i(q)?q.value=e:null),"show-arrow":!1,placement:"bottom-start",style:c(s(T)),width:e.options.length?void 0:"trigger",ref_key:"popoverRef",ref:Q},{trigger:v((()=>[d(s(N),{class:"search-cascader__input",placeholder:s(q)?e.editPlaceholder:e.placeholder,clearable:e.clearable,onClear:E,value:s(D),"onUpdate:value":l[0]||(l[0]=e=>i(D)?D.value=e:null),ref_key:"inputRef",ref:O,onFocus:G,onClick:I,onKeydown:s(R)},null,8,["placeholder","clearable","value","onKeydown"])])),default:v((()=>[p("section",{id:s($)},[d(s(V),{"label-key":e.labelKey,"value-key":e.valueKey,options:e.options,onNodeClick:s(Z),onChangeCursor:ee,"current-node":W.value,"cursor-node":X.value},{empty:v((()=>[f(a.$slots,"empty")])),_:3},8,["label-key","value-key","options","onNodeClick","current-node","cursor-node"])],8,L)])),_:3},8,["show","style","width"]))}}),[["__file","SearchCascader.vue"]]);export{B as default};
|
|
@@ -20,7 +20,10 @@ export declare const SearchMenu: import("vue").DefineComponent<{
|
|
|
20
20
|
currentNode: {
|
|
21
21
|
type: PropType<AnyObject>;
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
cursorNode: {
|
|
24
|
+
type: PropType<AnyObject>;
|
|
25
|
+
};
|
|
26
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
27
|
childKey: {
|
|
25
28
|
type: StringConstructor;
|
|
26
29
|
default: string;
|
|
@@ -40,8 +43,12 @@ export declare const SearchMenu: import("vue").DefineComponent<{
|
|
|
40
43
|
currentNode: {
|
|
41
44
|
type: PropType<AnyObject>;
|
|
42
45
|
};
|
|
46
|
+
cursorNode: {
|
|
47
|
+
type: PropType<AnyObject>;
|
|
48
|
+
};
|
|
43
49
|
}>> & {
|
|
44
50
|
onNodeClick?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
onChangeCursor?: ((...args: any[]) => any) | undefined;
|
|
45
52
|
}, {
|
|
46
53
|
options: AnyObject[];
|
|
47
54
|
valueKey: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as
|
|
1
|
+
import{defineComponent as e,computed as r,inject as t,createVNode as o,withModifiers as n,ref as a,createTextVNode as l}from"vue";import{traverse as c}from"../../../../shared/utils/index.js";import{Reload as s,ChevronForward as u}from"@vicons/ionicons5";import{NOOP as i}from"@vue/shared";import{useVirtualList as d}from"@vueuse/core";import{isNumber as p,isArray as f,isEqual as v,isString as y,isFunction as h}from"lodash-es";import{NCheckbox as m}from"naive-ui";import{InjectionSearchCascaderLoadingNode as g,InjectionSearchCascaderValue as N,InjectionSearchCascaderCheckAbleLevel as C,InjectionKeyboardEventBus as b}from"../constants/index.js";const k=e({props:{options:{type:Array,default:()=>[]},activeNodes:{type:Array,default:()=>[]},level:{type:Number,required:!0},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},cursorNode:{type:Object,default:()=>({})}},emits:["nodeClick","changeCursor"],setup(e,{emit:a}){const l=r((()=>e.options)),{list:c,containerProps:h,wrapperProps:k}=d(l,{itemHeight:32,overscan:5}),K=t(g),_=t(N),x=t(C),A=t(b),S=r((()=>p(x.value)&&x.value<=e.level));function j(e){return Object.keys(e).length<=0}function w(r){return e.cursorNode==r}function I(r){const t=function(e){const r=[e];let t=e;for(;t.parent;)t=t.parent,r.unshift(t);return r}(r);if(f(_.value))return v(o(t,e.valueKey),o(_.value,e.valueKey));if(y(_.value)){const r=_.value.split("/").map((e=>e.trim()));return v(r,o(t,e.labelKey))}return!1;function o(e,r){return e.map((e=>e[r]))}}function O(e){const r=h.ref.value;if(r){const t=32*e-(null==r?void 0:r.clientHeight);r.scrollTo(0,t>0?t:0)}}return A.on((function(r){function t(){return S.value?a("nodeClick",{type:"update",node:e.cursorNode}):a("nodeClick",{type:"search",node:e.cursorNode})}if("ArrowUp"===r){if(j(e.cursorNode))return;const r=l.value.findIndex((r=>r===e.cursorNode));if(r>=0){const e=0===r?l.value.length-1:r-1,t=l.value[e];a("changeCursor",t),O(e+3)}}if("ArrowRight"===r){if(j(e.cursorNode))return;a("nodeClick",{type:"search",node:e.cursorNode}),a("changeCursor",{})}if("ArrowDown"===r){if(j(e.cursorNode))return a("changeCursor",l.value[0]);const r=l.value.findIndex((r=>r===e.cursorNode));if(r>=0){const e=r>=l.value.length-1?0:r+1,t=l.value[e];a("changeCursor",t),O(e+1)}}if("ArrowLeft"===r&&e.activeNodes.length){const r=e.activeNodes.slice(-1);a("changeCursor",r[0])}" "===r&&t(),"Enter"===r&&t()})),()=>o("div",{class:"search-cascader__optionWrapper",ref:h.ref,style:h.style,onScroll:h.onScroll},[o("div",{style:k.value.style},[c.value.map((r=>{return o("div",{class:["search-cascader__option",{"search-cascader__option--active":(t=r.data,(null==(l=e.activeNodes)?void 0:l.includes(t))||w(r.data))}],onClick:()=>a("nodeClick",{type:"search",node:r.data}),title:r.data[e.labelKey]},[o("div",{class:"search-cascader__optionText"},[S.value?o(m,{style:{marginRight:"8px"},checked:I(r.data),onClick:n(i,["stop"]),onUpdateChecked:e=>e&&function(e){a("nodeClick",{type:"update",node:e})}(r.data)},null):null,r.data[e.labelKey]]),K.value===r.data?o(s,{class:"rotate"},null):r.data.isLeaf?null:o(u,null,null)]);var t,l}))])])}}),K=e({props:{childKey:{type:String,default:"children"},options:{type:Array,default:()=>[]},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},currentNode:{type:Object},cursorNode:{type:Object}},emits:["nodeClick","changeCursor"],setup(e,{slots:r,emit:t}){const n=a([]);function s(r,a){return o(k,{level:a+1,labelKey:e.labelKey,valueKey:e.valueKey,activeNodes:n.value,onNodeClick:e=>t("nodeClick",e),onChangeCursor:e=>t("changeCursor",e),options:r,cursorNode:e.cursorNode},null)}function u(r){let t=!1;return c(r,((r,o)=>{r===e.currentNode&&(t=!0,o())}),["children"]),t}function i(){if(!f(e.options)||!e.currentNode)return[];const r=[e.options];let t=e.options;for(n.value.length=0;f(t);){const o=t.find(u);if(!o)break;n.value.push(o),t=o[e.childKey],r.push(t)}if(e.cursorNode){const t=r.findIndex((r=>r.findIndex((r=>r===e.cursorNode))>=0));if(t>=0){const e=r.slice(0,t+1);return n.value.splice(t,r.length),e}}return r}return()=>o("section",{class:"search-cascader__menuWrapper"},[f(e.options)&&e.options.length?e.currentNode?i().map(s):s(e.options,0):o("section",{class:"search-cascader__emptyWrapper"},[h(r.empty)?r.empty():o("section",null,[l("empty")])])])}});export{K as SearchMenu};
|
|
@@ -3,3 +3,4 @@ import { ComputedRef, InjectionKey, Ref } from 'vue';
|
|
|
3
3
|
export declare const InjectionSearchCascaderLoadingNode: InjectionKey<Ref<Nullable<AnyObject>>>;
|
|
4
4
|
export declare const InjectionSearchCascaderValue: InjectionKey<ComputedRef<AnyObject[] | string>>;
|
|
5
5
|
export declare const InjectionSearchCascaderCheckAbleLevel: InjectionKey<ComputedRef<'last' | number>>;
|
|
6
|
+
export declare const InjectionKeyboardEventBus: InjectionKey<Ref<Nullable<AnyObject>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=Symbol("InjectionSearchCascaderLoadingNode "),
|
|
1
|
+
const e=Symbol("InjectionSearchCascaderLoadingNode "),o=Symbol("InjectionSearchCascaderValue "),a=Symbol("InjectionSearchCascaderCheckAbleLevel"),c=Symbol("InjectionKeyboardEventBus");export{c as InjectionKeyboardEventBus,a as InjectionSearchCascaderCheckAbleLevel,e as InjectionSearchCascaderLoadingNode,o as InjectionSearchCascaderValue};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as d,createCommentVNode as o,withDirectives as r,createElementVNode as c,normalizeClass as b,createVNode as u,withCtx as p,Fragment as f,renderList as h,createBlock as y,createTextVNode as v,toDisplayString as m,vShow as g,nextTick as C}from"vue";import{useMessage as L,NAnchor as I,NAnchorLink as S}from"naive-ui";import E from"./components/label-classify.vue.js";import{handleLabelColor as w}from"../../../shared/utils/vexutils.js";import x from"../../../_virtual/plugin-vue_export-helper.js";import A from"
|
|
1
|
+
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as d,createCommentVNode as o,withDirectives as r,createElementVNode as c,normalizeClass as b,createVNode as u,withCtx as p,Fragment as f,renderList as h,createBlock as y,createTextVNode as v,toDisplayString as m,vShow as g,nextTick as C}from"vue";import{useMessage as L,NAnchor as I,NAnchorLink as S}from"naive-ui";import E from"./components/label-classify.vue.js";import{handleLabelColor as w}from"../../../shared/utils/vexutils.js";import x from"../../../_virtual/plugin-vue_export-helper.js";import A from"../../../shared/utils/vexutilsExpand.js";const O={key:0,class:"label-disable-wrap"},j=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],K={style:{height:"100%"}},k={class:"label-wrap"},T=["id"],_={class:"edit-label-type"};var B=x(t({__name:"LabelFormContent",props:{item:{default:()=>({})},isEdit:{type:Boolean,default:!0},isLock:{type:Boolean,default:!1},labelSelectedList:null,isChangeWindow:{type:Boolean},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},labelOptions:null,sourceType:{default:""},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange","change","updateLabelData"],setup(t,{expose:x,emit:B}){const D=t,F=L(),V=e(null),P=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!P.inited)return!1;let t=P.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(...P.labelSelectedEdit,...D.labelSelectedList);return J(t,"labelId")})),q=a((()=>{const t=$.value||[];return Array.isArray(t)?t.map((t=>t.labelId)):[]})),J=(t,e)=>{let l={};return t.reduce(((t,a)=>(!l[a[e]]&&(l[a[e]]=t.push(a)),t)),[])},R=()=>{if(P.labelSelectedEdit=$.value,"object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=P.labelConfig[t])?void 0:e.itemList)||[];l.length&&l.forEach((t=>{q.value.includes(t.labelId)&&(t.isSelect=!0)}))}))}},z=(t,e)=>{if(!t)return;let l=Object.keys(t)||[];if(!l.length)return;let a=t[l[0]].curKey;if(e&&"string"==typeof e){let[i]=e.split("~"),n=l.find((e=>t[e]&&t[e].curKey&&t[e].curKey.includes(i)));n&&(a=t[n].curKey)}a&&Y(a)},G=(t,e)=>{e.showAdd=!0;const l=t.target.nextElementSibling;C((()=>{var t;null==(t=null==l?void 0:l.firstChild)||t.focus()}))},H=(t,e)=>{setTimeout((()=>{e.addVal?Q(e):e.showAdd=!1}),150)},M=(t,e)=>{e.addVal="",e.showAdd=!1},Q=async t=>{var e;if(!!t.itemList.filter((t=>!(t.isPublic&&1==t.isPublic))).find((e=>e.labelName===t.addVal)))return F.error("标签名称重复!"),!1;let l="";l=(null==(e=t.itemList)?void 0:e.length)?t.itemList[0].parentColor||t.parentColor||"":(null==t?void 0:t.parentColor)||"";const a={type:t.typeId,name:t.addVal,parentColor:l},{status:i}=await D.saveLabelItem(a,t);i&&(F.success("添加成功!"),B("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let d=(null==(i=P.labelSelectedEdit)?void 0:i.length)&&A.clone(P.labelSelectedEdit,!0)||[];if(t){if(d.some((t=>t.labelId==e.labelId)))return;if(2==s){const{typeId:t,labelId:l}=e;d=d.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}d.push(e)}else{const t=d.findIndex((t=>t.labelId==e.labelId));-1!=t&&d.splice(t,1)}P.labelSelectedEdit=[...d],N.value++,D.explicit&&B("explicitOnChange",[...P.labelSelectedEdit])},X=async t=>{const{status:e}=await D.deleteLabel(t,D.item);if(e){F.success("删除成功!");for(const e in P.labelConfig){const l=P.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&P.labelConfig[e].itemList.splice(l,1)}const e=P.labelSelectedEdit||[],l=D.labelSelectedList||[];if(e&&e.length){const l=e.findIndex((e=>e.labelId==t.labelId));-1!=l&&e.splice(l,1)}if(l&&l.length){const e=l.findIndex((e=>e.labelId==t.labelId));-1!=e&&l.splice(e,1),B("change",[...l],D.item)}B("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=V.value.querySelector("a[href='"+l+"']"),e&&e.click(),P.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);P.cacheAnchorKey=e},et=()=>{var t;return null==(t=V.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>D.labelOptions),(t=>{t&&(()=>{var t;if(D.isLock)return;const e=JSON.parse(JSON.stringify(D.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}P.labelConfig=e,C((()=>{let t;R(),D.explicit&&P.inited&&(t=P.labelAnchorKey),z(P.labelConfig,t),P.inited=!0}))})()}),{immediate:!0,deep:!0}),x({resetShowAdd:()=>{let{labelObj:t}=P.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([...P.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=P.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(P.labelSelectedEdit)){const e=P.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&P.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:V},[d(W)?(n(),s("div",O,j)):o("v-if",!0),r(c("div",K,[c("div",k,[o(" 表单内嵌打开标签组件的样式 "),o(' <div v-if="explicit" class="explicit-continer">\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\n\t\t\t\t\t\t\t\t<span slot="tab">\n\t\t\t\t\t\t\t\t\t{{ i }}\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\n\t\t\t\t\t\t\t\t\t\t<labelClassify\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</n-tab-pane>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</n-tabs>\n\t\t\t\t</div> '),o("\n\t\t\t\t\t普通标签样式\n\t\t\t\t\tv-else\n\t\t\t\t\texplicit\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(d(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),s(f,null,h(P.labelConfig,((t,e)=>(n(),y(d(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),o(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),s(f,null,h(P.labelConfig,((e,l)=>(n(),s("div",{key:l,class:"edit-label-content"},[c("div",{class:"edit-label",id:e.curKey},[v(m(l)+" ",1),c("span",_,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,T),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:d(w),handleDelLabel:X,hanldeBlur:H,handleAddLabel:G,clearaddVal:M,isEdit:t.isEdit,sourceType:t.sourceType},null,8,["classifyItem","handleLabelColor","isEdit","sourceType"])])))),128))],2)])],512),[[g,!d(W)]])],512))}}),[["__file","LabelFormContent.vue"]]);export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,reactive as t,computed as a,onMounted as i,watch as o,openBlock as s,createElementBlock as n,Fragment as d,createElementVNode as c,createBlock as b,unref as m,withCtx as r,renderList as p,normalizeStyle as u,createVNode as L,toDisplayString as
|
|
1
|
+
import{defineComponent as e,ref as l,reactive as t,computed as a,onMounted as i,watch as o,openBlock as s,createElementBlock as n,Fragment as d,createElementVNode as c,createBlock as b,unref as m,withCtx as r,renderList as p,normalizeStyle as u,createVNode as L,toDisplayString as h,withDirectives as y,normalizeClass as C,createTextVNode as f,vShow as g,createCommentVNode as v,mergeProps as I,nextTick as w}from"vue";import{NSpace as x,NTag as S,NTooltip as k,NIcon as O,NModal as j}from"naive-ui";import{AddCircleOutline as N}from"@vicons/ionicons5";import W from"./LabelFormContent.vue.js";import{handleLabelColor as P}from"../../../shared/utils/vexutils.js";import _ from"../../../shared/utils/vexutilsExpand.js";const B={class:"c-select-label"},E=c("span",null,"常用",-1),A={key:2,class:"outexplicit"},H=c("span",null,"选择标签",-1),z={class:"svg-wrap"};var F=e({__name:"SelectLabel",props:{selectedList:{type:Array,default:()=>[]},item:{type:Object,default:()=>({})},isDetail:{type:Boolean,default:!1},isLock:{type:Boolean,default:!1},sourceType:{type:String,default:""},explicit:{type:Boolean,default:!1},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},queryCommonlabels:{type:Function,default:()=>Promise.resolve({data:{}})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})}},emits:["onChange"],setup(e,{emit:F}){const V=e,T=l(null),U=t({labelVisible:!1,editLabelItem:{},labelSelectedList:[],labelSelectedEdit:[],inited:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px",commonLabelList:[],multipleChoiceConfig:{}});const D=a((()=>{const e=(null==V?void 0:V.item)||{};return(1==e.is_edit||e.isShow)&&!V.isDetail})),$=(e,l)=>{e.length&&e.forEach((e=>{let t=l.some((l=>l.labelId==e.labelId));e.isSelect=t}))},q=(e,l)=>{let t=U.multipleChoiceConfig,a=U.labelSelectedList||[];if(e){if(a.some((e=>e.labelId==l.labelId)))return;"2"==t[l.typeId]&&(a=a.filter((e=>e.typeId!==l.typeId))),a.push(l)}else{const e=a.findIndex((e=>e.labelId==l.labelId));-1!=e&&a.splice(e,1)}F("onChange",[...a]),U.labelSelectedList=a},J=e=>{V.isLock||(V.explicit||"init"===e||(U.labelVisible=!0),M(V.item))},R=()=>{var e;V.explicit||(null==(e=T.value)||e.resetShowAdd(),U.editLabelItem.showAdd=!1,U.editLabelItem={},U.inited=!1,U.modalWidth="763px",U.modalHeight="404px",U.maxHeight="404px",U.isChangeWindow=!1,U.labelVisible=!1)},K=()=>{U.isChangeWindow=!U.isChangeWindow;let e=document.body.clientHeight;U.modalWidth="763px"===U.modalWidth?"100%":"763px",U.modalHeight="404px"===U.modalHeight?e-110+"px":"404px",U.maxHeight="auto"===U.modalHeight?"404px":"none"},G=()=>{var e;null==(e=T.value)||e.handleLabelForm((e=>{F("onChange",[...e]),U.labelSelectedList=e,$(U.commonLabelList,e),R()}))},M=async(e,l)=>{const{rows:t,results:a}=await V.getLabelList(e,{update:l}),i=t||[],o={},s=`${e.val_key}_${e.name}`,n=l?[...U.labelSelectedEdit||[]]:[...U.labelSelectedList||[]];i.forEach((e=>{e.cacheKey=s,e.isSelect=!1,o[e.typeName]?o[e.typeName].itemList.push({...e}):o[e.typeName]={itemList:[{...e}],showAdd:!1,addVal:"",typeName:e.typeName,typeId:e.typeId}})),a&&(e.labelObj=o,e.labelList=i),l&&(U.labelSelectedEdit=n),U.editLabelItem=e,Q(a)},Q=e=>{if(!e)return!1;let l=Object.keys(e),t={},a=(e.typeList||[]).reduce(((e,l)=>(t[l.typeId]=l.multipleChoice,e[l.typeName]={multipleChoice:l.multipleChoice,parentColor:l.parentColor,allowCreateByPersonal:l.allowCreateByPersonal},e)),{});V.explicit&&(U.multipleChoiceConfig=t),l.forEach((l=>{var t,i,o,s,n,d,c;"typeList"!==l&&("emptyTypes"!==l?_.isPlainObject(e[l])?U.editLabelItem.labelObj[l]?(U.editLabelItem.labelObj[l].isNoAdd=!0,U.editLabelItem.labelObj[l].multipleChoice=null==(i=a[l])?void 0:i.multipleChoice,U.editLabelItem.labelObj[l].allowCreateByPersonal=null==(o=a[l])?void 0:o.allowCreateByPersonal,U.editLabelItem.labelObj[l].parentColor=null==(s=a[l])?void 0:s.parentColor):U.editLabelItem.labelObj[l]={addVal:"",showAdd:!1,itemList:!1,typeId:"",typeName:l,allowCreateByPersonal:null==(t=a[l])?void 0:t.allowCreateByPersonal,...a[l]||{}}:(U.editLabelItem.labelObj[l].multipleChoice=null==(n=a[l])?void 0:n.multipleChoice,U.editLabelItem.labelObj[l].allowCreateByPersonal=null==(d=a[l])?void 0:d.allowCreateByPersonal,U.editLabelItem.labelObj[l].parentColor=null==(c=a[l])?void 0:c.parentColor):e[l].forEach((e=>{U.editLabelItem.labelObj[e.typeName]={addVal:"",showAdd:!1,itemList:[],typeId:e.typeId,typeName:e.typeName,allowCreateByPersonal:e.allowCreateByPersonal,...a[e.typeName]||{}}})))}))},X=()=>{M(V.item,!0)},Y=()=>{G()},Z=(e,l)=>{V.explicit&&w((()=>{var t;null==(t=T.value)||t.hanldeSetLabelItem(e,l)}))};return i((()=>{V.explicit?J():(async e=>{const{rows:l,results:t}=await V.getLabelList(e);if(!t)return!1;let a=(t.typeList||[]).reduce(((e,l)=>(e[l.typeId]=l.multipleChoice,e)),{});U.multipleChoiceConfig=a})(V.item)})),o((()=>V.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];U.labelSelectedList=JSON.parse(JSON.stringify(l)),$(U.commonLabelList,U.labelSelectedList)}}),{immediate:!0,deep:!0}),o((()=>{var e;return null==(e=V.item)?void 0:e.label_type}),(e=>{e&&"form"==V.sourceType&&(async e=>{var l;let{data:t={}}=await V.queryCommonlabels(e)||{};if("SUCCESS"!==t.result)return;let a=(null==(l=t.map)?void 0:l.rows)||[];$(a,U.labelSelectedList),U.commonLabelList=a})(e)}),{immediate:!0,deep:!0}),(l,t)=>(s(),n(d,null,[c("div",B,[e.explicit?v("v-if",!0):(s(),b(m(x),{key:0,align:"center"},{default:r((()=>[(s(!0),n(d,null,p(U.labelSelectedList,(e=>(s(),b(m(S),{bordered:!1,key:e.labelId,style:u(m(P)(e,!0)),closable:m(D),onClose:l=>(e=>{const l=U.labelSelectedList||[],t=l.findIndex((l=>l.labelId==e.labelId));-1!=t&&l.splice(t,1),F("onChange",[...l]),U.labelSelectedList=l,Z(e.labelId,!1)})(e),size:"small"},{default:r((()=>[L(m(k),{placement:"top-start"},{trigger:r((()=>[c("span",null,h(e.labelName),1)])),default:r((()=>[c("span",null,h(e.labelName),1)])),_:2},1024)])),_:2},1032,["style","closable","onClose"])))),128)),e.explicit?v("v-if",!0):y((s(),n("span",{key:0,class:C(["form-add-icon form-add-icon-label",{disable:e.isLock}]),onClick:J},[L(m(O),{class:"add-icon",component:m(N)},null,8,["component"]),f(" 新增 ")],2)),[[g,m(D)]])])),_:1})),"form"==e.sourceType&&U.commonLabelList.length&&m(D)&&!e.explicit?(s(),b(m(x),{key:1,align:"center",class:"common-label"},{default:r((()=>[E,(s(!0),n(d,null,p(U.commonLabelList,((e,l)=>(s(),b(m(S),{checkable:"",checked:e.isSelect,"onUpdate:checked":l=>function(e,l){l.isSelect=e,q(e,l)}(l,e),key:l,style:u(m(P)(e)),size:"small"},{default:r((()=>[L(m(k),{placement:"top-start"},{trigger:r((()=>[c("span",null,h(e.labelName),1)])),default:r((()=>[c("span",null,h(e.labelName),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),_:1})):v("v-if",!0),e.explicit&&m(D)?(s(),n("div",A,[L(W,I(l.$attrs,{ref_key:"labelFormContentRef",ref:T,explicit:e.explicit,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,deleteLabel:e.deleteLabel,saveLabelItem:e.saveLabelItem,onUpdateLabelData:X,onExplicitOnChange:Y}),null,16,["explicit","labelSelectedList","isChangeWindow","labelOptions","deleteLabel","saveLabelItem"])])):v("v-if",!0)]),v(" 弹窗 "),L(m(j),{preset:"dialog",class:C(["label-form-modal-wrap modal-wrap standard-modal standard-modal-white",{"modal-screen":U.isChangeWindow}]),show:U.labelVisible,"onUpdate:show":t[0]||(t[0]=e=>U.labelVisible=e),onPositiveClick:G,onNegativeClick:R,onClose:R,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":"取消","positive-text":"确定",style:u({width:U.modalWidth})},{header:r((()=>[H,c("div",z,[c("i",{onClick:K,class:C(["iconfont-select-label",U.isChangeWindow?"icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:r((()=>[L(W,I(l.$attrs,{ref_key:"labelFormContentRef",ref:T,labelSelectedList:U.labelSelectedList,isChangeWindow:U.isChangeWindow,labelOptions:U.editLabelItem.labelObj,sourceType:e.sourceType,deleteLabel:e.deleteLabel,saveLabelItem:e.saveLabelItem,onUpdateLabelData:X}),null,16,["labelSelectedList","isChangeWindow","labelOptions","sourceType","deleteLabel","saveLabelItem"])])),_:1},8,["show","class","style"])],64))}});export{F as default};
|
|
@@ -2,6 +2,7 @@ import { SFCWithInstall } from '../../../es/shared/types';
|
|
|
2
2
|
declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
3
3
|
defaultList: {
|
|
4
4
|
type: import("vue").PropType<((string | number) | {
|
|
5
|
+
[key: string]: any;
|
|
5
6
|
key: string | number;
|
|
6
7
|
name: string;
|
|
7
8
|
})[]>;
|
|
@@ -49,7 +50,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
49
50
|
default: boolean;
|
|
50
51
|
};
|
|
51
52
|
queryLoadChildData: {
|
|
52
|
-
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<
|
|
53
|
+
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>>;
|
|
53
54
|
default: undefined;
|
|
54
55
|
};
|
|
55
56
|
queryTreeSearch: {
|
|
@@ -60,6 +61,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
60
61
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
61
62
|
defaultList: {
|
|
62
63
|
type: import("vue").PropType<((string | number) | {
|
|
64
|
+
[key: string]: any;
|
|
63
65
|
key: string | number;
|
|
64
66
|
name: string;
|
|
65
67
|
})[]>;
|
|
@@ -107,7 +109,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
107
109
|
default: boolean;
|
|
108
110
|
};
|
|
109
111
|
queryLoadChildData: {
|
|
110
|
-
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<
|
|
112
|
+
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>>;
|
|
111
113
|
default: undefined;
|
|
112
114
|
};
|
|
113
115
|
queryTreeSearch: {
|
|
@@ -134,28 +136,31 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
134
136
|
suffix?: (() => import("vue").VNodeChild) | undefined;
|
|
135
137
|
}[]>;
|
|
136
138
|
tagData: import("vue").Ref<{
|
|
139
|
+
[x: string]: any;
|
|
137
140
|
key: string | number;
|
|
138
141
|
name: string;
|
|
139
142
|
}[]>;
|
|
140
|
-
temp:
|
|
141
|
-
[k: string]: unknown;
|
|
142
|
-
} & import("../../../es/shared/types").AnyObject)[];
|
|
143
|
+
temp: import("naive-ui").TreeOption[];
|
|
143
144
|
allCheckedKeys: (string | number)[];
|
|
144
145
|
isRemote: import("vue").ComputedRef<boolean>;
|
|
145
146
|
init: () => void;
|
|
147
|
+
queryLoadChildNode: (node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>;
|
|
146
148
|
setDisabled: (data: import("naive-ui").TreeOption) => void;
|
|
147
149
|
renderLabel: ({ option }: {
|
|
148
150
|
option: import("naive-ui").TreeOption;
|
|
149
151
|
}) => JSX.Element;
|
|
150
152
|
getLabelName: (option: import("naive-ui").TreeOption) => unknown;
|
|
153
|
+
transformParentNodeName: (trees: import("naive-ui").TreeOption[], temp: any) => import("naive-ui").TreeOption[];
|
|
151
154
|
setAllCheckedKeys: (tree: import("naive-ui").TreeOption[]) => void;
|
|
152
155
|
onSearch: () => Promise<void>;
|
|
153
156
|
setTreeCheckd: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
|
|
154
157
|
checkedAllChange: (checked: boolean) => void;
|
|
155
158
|
uniq: (arr: {
|
|
159
|
+
[key: string]: any;
|
|
156
160
|
key: string | number;
|
|
157
161
|
name: string;
|
|
158
162
|
}[]) => {
|
|
163
|
+
[key: string]: any;
|
|
159
164
|
key: string | number;
|
|
160
165
|
name: string;
|
|
161
166
|
}[];
|
|
@@ -164,6 +169,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
164
169
|
setCheckedAll: () => void;
|
|
165
170
|
clearAll: () => void;
|
|
166
171
|
closeTag: (tag: {
|
|
172
|
+
[key: string]: any;
|
|
167
173
|
key: string | number;
|
|
168
174
|
name: string;
|
|
169
175
|
}) => void;
|
|
@@ -239,6 +245,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
239
245
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "check"[], "check", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
240
246
|
defaultList: {
|
|
241
247
|
type: import("vue").PropType<((string | number) | {
|
|
248
|
+
[key: string]: any;
|
|
242
249
|
key: string | number;
|
|
243
250
|
name: string;
|
|
244
251
|
})[]>;
|
|
@@ -286,7 +293,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
286
293
|
default: boolean;
|
|
287
294
|
};
|
|
288
295
|
queryLoadChildData: {
|
|
289
|
-
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<
|
|
296
|
+
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>>;
|
|
290
297
|
default: undefined;
|
|
291
298
|
};
|
|
292
299
|
queryTreeSearch: {
|
|
@@ -300,6 +307,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
300
307
|
[k: string]: unknown;
|
|
301
308
|
} & import("../../../es/shared/types").AnyObject)[];
|
|
302
309
|
defaultList: ((string | number) | {
|
|
310
|
+
[key: string]: any;
|
|
303
311
|
key: string | number;
|
|
304
312
|
name: string;
|
|
305
313
|
})[];
|
|
@@ -317,7 +325,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
317
325
|
showCount: boolean;
|
|
318
326
|
showClear: boolean;
|
|
319
327
|
multiple: boolean;
|
|
320
|
-
queryLoadChildData: (node: import("naive-ui").TreeOption) => Promise<
|
|
328
|
+
queryLoadChildData: (node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>;
|
|
321
329
|
queryTreeSearch: (keyWork: string) => Promise<import("../../../es/shared/types").AnyObject[]>;
|
|
322
330
|
}>>;
|
|
323
331
|
export default SelectPerson;
|
|
@@ -15,6 +15,7 @@ declare type IWordBookChild<T> = {
|
|
|
15
15
|
declare type ITag = {
|
|
16
16
|
key: IKey;
|
|
17
17
|
name: string;
|
|
18
|
+
[key: string]: any;
|
|
18
19
|
};
|
|
19
20
|
declare const _default: import("vue").DefineComponent<{
|
|
20
21
|
defaultList: {
|
|
@@ -54,7 +55,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
55
|
default: boolean;
|
|
55
56
|
};
|
|
56
57
|
queryLoadChildData: {
|
|
57
|
-
type: PropType<(node: TreeOption) => Promise<
|
|
58
|
+
type: PropType<(node: TreeOption) => Promise<AnyObject>>;
|
|
58
59
|
default: undefined;
|
|
59
60
|
};
|
|
60
61
|
queryTreeSearch: {
|
|
@@ -100,7 +101,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
100
101
|
default: boolean;
|
|
101
102
|
};
|
|
102
103
|
queryLoadChildData: {
|
|
103
|
-
type: PropType<(node: TreeOption) => Promise<
|
|
104
|
+
type: PropType<(node: TreeOption) => Promise<AnyObject>>;
|
|
104
105
|
default: undefined;
|
|
105
106
|
};
|
|
106
107
|
queryTreeSearch: {
|
|
@@ -127,18 +128,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
127
128
|
suffix?: (() => import("vue").VNodeChild) | undefined;
|
|
128
129
|
}[]>;
|
|
129
130
|
tagData: import("vue").Ref<{
|
|
131
|
+
[x: string]: any;
|
|
130
132
|
key: IKey;
|
|
131
133
|
name: string;
|
|
132
134
|
}[]>;
|
|
133
|
-
temp:
|
|
135
|
+
temp: TreeOption[];
|
|
134
136
|
allCheckedKeys: IKey[];
|
|
135
137
|
isRemote: import("vue").ComputedRef<boolean>;
|
|
136
138
|
init: () => void;
|
|
139
|
+
queryLoadChildNode: (node: TreeOption) => Promise<AnyObject>;
|
|
137
140
|
setDisabled: (data: TreeOption) => void;
|
|
138
141
|
renderLabel: ({ option }: {
|
|
139
142
|
option: TreeOption;
|
|
140
143
|
}) => JSX.Element;
|
|
141
144
|
getLabelName: (option: TreeOption) => unknown;
|
|
145
|
+
transformParentNodeName: (trees: TreeOption[], temp: any) => TreeOption[];
|
|
142
146
|
setAllCheckedKeys: (tree: TreeOption[]) => void;
|
|
143
147
|
onSearch: () => Promise<void>;
|
|
144
148
|
setTreeCheckd: (tree: TreeOption[], checked: boolean) => void;
|
|
@@ -256,7 +260,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
256
260
|
default: boolean;
|
|
257
261
|
};
|
|
258
262
|
queryLoadChildData: {
|
|
259
|
-
type: PropType<(node: TreeOption) => Promise<
|
|
263
|
+
type: PropType<(node: TreeOption) => Promise<AnyObject>>;
|
|
260
264
|
default: undefined;
|
|
261
265
|
};
|
|
262
266
|
queryTreeSearch: {
|
|
@@ -275,7 +279,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
275
279
|
showCount: boolean;
|
|
276
280
|
showClear: boolean;
|
|
277
281
|
multiple: boolean;
|
|
278
|
-
queryLoadChildData: (node: TreeOption) => Promise<
|
|
282
|
+
queryLoadChildData: (node: TreeOption) => Promise<AnyObject>;
|
|
279
283
|
queryTreeSearch: (keyWork: string) => Promise<Array<AnyObject>>;
|
|
280
284
|
}>;
|
|
281
285
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,computed as t,watch as a,openBlock as n,createBlock as o,unref as u,withCtx as
|
|
1
|
+
import{defineComponent as e,ref as l,computed as t,watch as a,openBlock as n,createBlock as o,unref as u,withCtx as r,createVNode as i,withKeys as d,createTextVNode as c,toDisplayString as s,withDirectives as h,vShow as p,createCommentVNode as v,createElementBlock as f,createElementVNode as y,Fragment as k,renderList as m}from"vue";import{NGrid as g,NGi as b,NSpace as _,NInputGroup as w,NInput as x,NButton as C,NCheckbox as L,NTree as j,NIcon as T,NTooltip as $}from"naive-ui";import{CloseCircleSharp as q}from"@vicons/ionicons5";import{filterTree as B,getExpandedKeys as D}from"./utils/index.js";import{cloneDeep as P}from"lodash-es";const S={key:0},U={class:"c-select-person__scroll",style:{height:"342px"}};var N=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check"],setup(e,{emit:N}){const K=e,A=l(""),E=l(!1),F=l([]),I=l([]),O=l([]),R=l([]),z=P(function e(l,t){return l&&0!==l.length?l.map((l=>{var a;const n=V(l),o=t?`${t}/${n}`:n;return{...l,tempTitle:t,children:(null==(a=l.children)?void 0:a.length)?e(null==l?void 0:l.children,o):[]}})):[]}(K.data,""));let G=[];const H=t((()=>!!K.queryLoadChildData));async function J(e){if(K.queryLoadChildData){const l=await K.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.tempTitle}/${l.title}`:l.title})))),l}return e}function M(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function Q({option:e}){var l;if((null==(l=e.children)?void 0:l.length)||H.value&&!(null==e?void 0:e.isLeaf)){const l=K.wordbook.user_count_obj&&e[K.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return i("span",null,[`${e.title}${t}`])}return i($,{trigger:"hover"},{default:()=>i("span",null,[e.title]),trigger:()=>i("span",null,[e.title])})}function V(e){return e[K.wordbookChild.user_name_obj]||e[K.wordbook.parent_name_obj]||e.orgName||e.title||""}function W(e){var l;for(let t=0,a=e.length;t<a;t++){const a=e[t];(null==(l=a.children)?void 0:l.length)&&W(a.children),a.disabled||a.children||G.push(a.key)}}async function X(){H.value?O.value=await K.queryTreeSearch(A.value):(O.value=B(z,A.value),G=[],W(O.value),te()),I.value=O.value.length&&A.value?D(O.value):[]}function Y(e,l){for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&(!a.children||a.isLeaf)&&(l&&!F.value.includes(a.key)&&F.value.push(a.key),!l)){const e=F.value.findIndex((e=>e===a.key));F.value.splice(e,1)}a.children&&Y(a.children,l)}}function Z(e){Y(O.value,e)}function ee(e){var l;for(let t=0,a=e.length;t<a;t++){const a=e[t];F.value.includes(a.key)&&R.value.push({key:a.key,name:a.title,parentName:a.tempTitle}),(null==(l=a.children)?void 0:l.length)&&ee(a.children)}}function le(e){F.value=e}function te(){E.value=G.every((e=>R.value.findIndex((l=>l.key===e))>-1))}function ae(){F.value=[]}return function e(l){var t,a;for(let n=0,o=l.length;n<o;n++){const o=l[n];o.title=V(o),o.key||(o.key=o[K.wordbookChild.user_id_obj]||o[K.wordbook.parent_id_obj]||Date.now()),(null==(t=o.children)?void 0:t.length)?(e(o.children),M(o)):0===(null==(a=o.children)?void 0:a.length)&&Reflect.deleteProperty(o,"children"),o.disabled||o.children||G.push(o.key)}}(z),O.value=z,K.defaultList.length>0&&(H.value?(K.defaultList.forEach((e=>F.value.push(e.key))),R.value=P(K.defaultList)):(K.defaultList.forEach((e=>F.value.push(e))),ee(z))),a((()=>F),(e=>{R.value=[],e.value.length&&ee(H.value?O.value:z),te(),N("check",e.value)}),{deep:!0}),(l,t)=>(n(),o(u(g),{cols:2,class:"c-select-person"},{default:r((()=>[i(u(b),null,{default:r((()=>[i(u(_),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:r((()=>[i(u(w),{style:{"margin-bottom":"12px"}},{default:r((()=>[i(u(x),{clearable:"",value:A.value,"onUpdate:value":t[0]||(t[0]=e=>A.value=e),placeholder:e.searchPlaceholder,onKeyup:d(X,["enter"])},null,8,["value","placeholder","onKeyup"]),i(u(C),{type:"primary",onClick:X},{default:r((()=>[c(s(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple?h((n(),o(u(L),{key:0,checked:E.value,"onUpdate:checked":[t[1]||(t[1]=e=>E.value=e),Z]},{default:r((()=>[c(" 全选 ")])),_:1},8,["checked"])),[[p,u(G).length<1e3]]):v("v-if",!0),i(u(j),{"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":F.value,"expanded-keys":I.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>I.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":F.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>F.value=e),data:O.value,"check-strategy":"child","render-label":Q,"onUpdate:checkedKeys":le,onLoad:J},null,8,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"])])),_:1})])),_:1}),i(u(b),null,{default:r((()=>[i(u(_),{vertical:"",style:{"padding-left":"12px"}},{default:r((()=>[i(u(_),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:r((()=>[e.showCount?(n(),f("span",S,"已选择:"+s(R.value.length),1)):v("v-if",!0),e.showClear?(n(),f("span",{key:1,class:"c-select-person__clear-btn",onClick:ae},"清空")):v("v-if",!0)])),_:1}),y("div",U,[(n(!0),f(k,null,m(R.value,(e=>(n(),f("span",{class:"c-select-person__tag-item",key:e.key},[c(s(e.name)+" "+s(e.parentName?`(${e.parentName})`:"")+" ",1),i(u(T),{class:"tag-close",component:u(q),onClick:l=>function(e){F.value=F.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{N as default};
|