cnhis-design-vue 3.1.42-beta.35 → 3.1.42-beta.36
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/README.md +87 -87
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/classification/index.d.ts +1 -1
- package/es/components/classification/src/index.vue.d.ts +2 -2
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/field-set/src/FieldSet.vue.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.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/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/recommend-search/index.d.ts +1 -3
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +1 -3
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +1 -3
- package/es/components/recommend-search/src/components/RecommendMenu.vue.d.ts +1 -3
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
- package/es/components/scale-view/index.d.ts +4 -28
- package/es/components/scale-view/src/ScaleView.vue.d.ts +4 -28
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +73 -0
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +9 -0
- package/es/components/vod-chunk-upload/index.d.ts +73 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +73 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
- package/es/env.d.ts +24 -24
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -89,15 +89,7 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
89
89
|
};
|
|
90
90
|
getChunkUploadConfig: {
|
|
91
91
|
type: FunctionConstructor;
|
|
92
|
-
default: () => Promise<{
|
|
93
|
-
checkFileMd5Exist: string;
|
|
94
|
-
fileChannel: string;
|
|
95
|
-
md5: string;
|
|
96
|
-
objectName: string;
|
|
97
|
-
partFileMerge: string;
|
|
98
|
-
partFileUpload: string;
|
|
99
|
-
token: string;
|
|
100
|
-
}>;
|
|
92
|
+
default: () => Promise<{}>;
|
|
101
93
|
};
|
|
102
94
|
}, {
|
|
103
95
|
ScaleViewState: {
|
|
@@ -221,15 +213,7 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
221
213
|
};
|
|
222
214
|
getChunkUploadConfig: {
|
|
223
215
|
type: FunctionConstructor;
|
|
224
|
-
default: () => Promise<{
|
|
225
|
-
checkFileMd5Exist: string;
|
|
226
|
-
fileChannel: string;
|
|
227
|
-
md5: string;
|
|
228
|
-
objectName: string;
|
|
229
|
-
partFileMerge: string;
|
|
230
|
-
partFileUpload: string;
|
|
231
|
-
token: string;
|
|
232
|
-
}>;
|
|
216
|
+
default: () => Promise<{}>;
|
|
233
217
|
};
|
|
234
218
|
}>> & {
|
|
235
219
|
onOnCloseSetting?: ((...args: any[]) => any) | undefined;
|
|
@@ -260,7 +244,7 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
260
244
|
width: string;
|
|
261
245
|
height: string;
|
|
262
246
|
transform: string;
|
|
263
|
-
} |
|
|
247
|
+
} | undefined>;
|
|
264
248
|
handlePageClass: import("vue").ComputedRef<boolean>;
|
|
265
249
|
isShowItem: import("vue").ComputedRef<(item: any) => any>;
|
|
266
250
|
handleShowQuestionNumber: import("vue").ComputedRef<(item: any) => any>;
|
|
@@ -1143,15 +1127,7 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1143
1127
|
};
|
|
1144
1128
|
getChunkUploadConfig: {
|
|
1145
1129
|
type: FunctionConstructor;
|
|
1146
|
-
default: () => Promise<{
|
|
1147
|
-
checkFileMd5Exist: string;
|
|
1148
|
-
fileChannel: string;
|
|
1149
|
-
md5: string;
|
|
1150
|
-
objectName: string;
|
|
1151
|
-
partFileMerge: string;
|
|
1152
|
-
partFileUpload: string;
|
|
1153
|
-
token: string;
|
|
1154
|
-
}>;
|
|
1130
|
+
default: () => Promise<{}>;
|
|
1155
1131
|
};
|
|
1156
1132
|
}>> & {
|
|
1157
1133
|
onOnCloseSetting?: ((...args: any[]) => any) | undefined;
|
|
@@ -88,15 +88,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
88
88
|
};
|
|
89
89
|
getChunkUploadConfig: {
|
|
90
90
|
type: FunctionConstructor;
|
|
91
|
-
default: () => Promise<{
|
|
92
|
-
checkFileMd5Exist: string;
|
|
93
|
-
fileChannel: string;
|
|
94
|
-
md5: string;
|
|
95
|
-
objectName: string;
|
|
96
|
-
partFileMerge: string;
|
|
97
|
-
partFileUpload: string;
|
|
98
|
-
token: string;
|
|
99
|
-
}>;
|
|
91
|
+
default: () => Promise<{}>;
|
|
100
92
|
};
|
|
101
93
|
}, {
|
|
102
94
|
ScaleViewState: {
|
|
@@ -220,15 +212,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
220
212
|
};
|
|
221
213
|
getChunkUploadConfig: {
|
|
222
214
|
type: FunctionConstructor;
|
|
223
|
-
default: () => Promise<{
|
|
224
|
-
checkFileMd5Exist: string;
|
|
225
|
-
fileChannel: string;
|
|
226
|
-
md5: string;
|
|
227
|
-
objectName: string;
|
|
228
|
-
partFileMerge: string;
|
|
229
|
-
partFileUpload: string;
|
|
230
|
-
token: string;
|
|
231
|
-
}>;
|
|
215
|
+
default: () => Promise<{}>;
|
|
232
216
|
};
|
|
233
217
|
}>> & {
|
|
234
218
|
onOnCloseSetting?: ((...args: any[]) => any) | undefined;
|
|
@@ -259,7 +243,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
259
243
|
width: string;
|
|
260
244
|
height: string;
|
|
261
245
|
transform: string;
|
|
262
|
-
} |
|
|
246
|
+
} | undefined>;
|
|
263
247
|
handlePageClass: import("vue").ComputedRef<boolean>;
|
|
264
248
|
isShowItem: import("vue").ComputedRef<(item: any) => any>;
|
|
265
249
|
handleShowQuestionNumber: import("vue").ComputedRef<(item: any) => any>;
|
|
@@ -1142,15 +1126,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1142
1126
|
};
|
|
1143
1127
|
getChunkUploadConfig: {
|
|
1144
1128
|
type: FunctionConstructor;
|
|
1145
|
-
default: () => Promise<{
|
|
1146
|
-
checkFileMd5Exist: string;
|
|
1147
|
-
fileChannel: string;
|
|
1148
|
-
md5: string;
|
|
1149
|
-
objectName: string;
|
|
1150
|
-
partFileMerge: string;
|
|
1151
|
-
partFileUpload: string;
|
|
1152
|
-
token: string;
|
|
1153
|
-
}>;
|
|
1129
|
+
default: () => Promise<{}>;
|
|
1154
1130
|
};
|
|
1155
1131
|
}>> & {
|
|
1156
1132
|
onOnCloseSetting?: ((...args: any[]) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as i,openBlock as
|
|
1
|
+
import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as i,openBlock as n,createElementBlock as l,normalizeClass as s,unref as r,createCommentVNode as u,Fragment as c,createBlock as p,mergeProps as d,createElementVNode as m,normalizeStyle as v,createVNode as f,withCtx as g,renderList as y,toDisplayString as b,createTextVNode as k,resolveDynamicComponent as S,h as C}from"vue";import h from"./hooks/use-noData.js";import{getScaleViewState as w}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as _}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as A}from"./hooks/scaleview-submit.js";import{handleQueryParams as O,isCollection as j,isEvaluation as T}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import D from"./components/NoData.vue.js";import P from"../../../shared/components/SvgIcon/SvgIcon.vue.js";import x from"./components/EvaluateCountdown.vue.js";import B from"./components/EvaluatePage.vue.js";import F from"./components/AnswerParse.vue.js";import I from"./components/ScaleScore.js";import{useDialog as N,useMessage as q,NForm as M,NFormItem as R,NButton as K}from"naive-ui";import V from"../../../_virtual/plugin-vue_export-helper.js";const H=["innerHTML"],U={key:0,class:"required-text"},W={key:1,class:"evalute-label"},J=["onClick"],Y={key:1,class:"footer"};var X=V(e({__name:"ScaleView",props:{guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})}},emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:V,emit:X}){const G=e,{ScaleViewState:Q}=w(),Z=t(Q),$=N(),z=q(),ee=a(null),te=a(null),{noDataState:ae,setNoData:oe,resetNodata:ie}=h(),ne=O(),{showEvatip:le,isFormBoldOpen:se,scaleStyle:re,handlePageClass:ue,isShowItem:ce,handleShowQuestionNumber:pe,hasScore:de,isPreviewScale:me,showEvaluateEntry:ve,showEvaluateCoundownPage:fe,showSaveBtn:ge,showEvaluateLabel:ye,showAnswerParse:be,propsConfig:ke,evaluatePageProps:Se,evaluateCountdownProps:Ce,skipCover:he,scaleEdit:we}=E(G,Z,{query:ne}),{initForm:Ee}=_(G,Z,X,{query:ne}),{submitMethod:_e}=A(G,Z,X,{query:ne}),{nextLogicEvent:Ae,handleDynamicDataRelation:Oe}=L(G,Z);(()=>{let{id:e}=ne;e&&(Z.shareId=e)})();const je=e=>{try{ie(),Ee(e)}catch(e){console.log(e,"--error"),Z.spinning=!1,Z.hasFrontAddress=!1,oe(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};o((()=>G.ids),((e,t)=>{t?e.guage_id&&e.guage_id!=t.guage_id&&je(e):e.guage_id&&je(e)}),{immediate:!0}),o((()=>G.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;Z.form={},Z.formArray=[];const t=JSON.parse(JSON.stringify(e));i((()=>{Ee(t)}))}),{immediate:!0});const Te=e=>{Z.showEvaluateSettingWrap=!1,Z.showEvaluateCountdown=!!e,X("startWriteScale")},Le=()=>{console.log("----closeEvaluateCountdown"),Z.showEvaluateCountdown=!1,me.value||(Z.banSubmit=!0,_e(),$.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>({})}))},De=e=>{$.warning({title:"提示",content:()=>C("div",{class:"evatip-container"},[C("span","答案解析:"),C("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},Pe=(e,t,a)=>{console.log(e,"--val");let{choiceObj:o,isSetObj:i}=a||{};switch(t.type.includes("SELECT")||(Z.form[t.val_key]=e),t.type){case"SELECT":case"EVALUATE_SELECT":{let{value:a,list:o=[]}=e;Z.form[t.val_key]=a,Ae(e,t,Z.formArray),Oe(o,t,Z.formArray)}break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&(Z.choiceComObj[t.val_key]=o),Ae(e,t,Z.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":Ae(e,t,Z.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":Z.submitForm[t.val_key]=e}},xe=(e,t)=>{console.log(t),Z.form[t.val_key]=e},Be=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const t=e||[],a=[],o=[];return t.forEach((e=>{o.push(e),a.push(e.labelName)})),Z.labelSelectedList=t,{labelStr:a.join(","),labels:o}},Fe=()=>{var e;if(!Z.formArray.find((e=>T(e.type))))return void Ie("确认要提交吗?");let{evaluateResultSetting:t}=Z.config;if(!t||!Object.keys(t).length&&!ve.value||we.value)return void Ie("确认要结束测评吗?");if("formIframe"==G.openType&&ve.value)return void X("submitNoRequest");let a="确定要提前结束测评吗?";if(fe.value&&(null==(e=ee.value)?void 0:e.getCountdownObj)){const e=ee.value.getCountdownObj(),{setAnswered:t,totalLen:o}=e;t<o?a="存在未作答的题目,确定要提前结束测评吗?":!(null==Z?void 0:Z.showEvaluateCountdown)&&(a="确认要结束测评吗?")}Ie(a)},Ie=e=>{$.warning({title:"温馨提示",content:()=>C("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:()=>{Ne()},onNegativeClick(){}})},Ne=()=>{var e;null==(e=te.value)||e.validate((e=>{var t;if(e){console.log(e);let a=(null==(t=e[0])?void 0:t[0])||{},o=a.field,i=a.message,n=Z.formArray.find((e=>e.databaseTitle===o));return n&&(o=n.title),z.error(o+i),!1}_e()}))},qe=()=>{X("onCloseSetting")};return V({getScaleData:()=>({...Z}),onSubmit:Fe,cancel:qe}),(e,t)=>(n(),l("div",{class:s(["c-scale",{"c-scale-nobtn":r(ge)}])},[u(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),Z.spinning||Z.hasFrontAddress?u("v-if",!0):(n(),l(c,{key:0},[r(ae).noData?(n(),p(D,{key:0,noDataImg:r(ae).noDataImg,noDataTip:r(ae).noDataTip},null,8,["noDataImg","noDataTip"])):(n(),l(c,{key:1},[r(ve)&&!r(he)?(n(),p(B,d({key:0},r(Se),{onWriteGuage:Te}),null,16)):(n(),l(c,{key:1},[r(fe)?(n(),p(x,d({key:0,ref_key:"countdownDom",ref:ee},r(Ce),{onCloseEvaluateCountdown:Le}),null,16)):u("v-if",!0),m("div",{class:s(["scale-container",{"scale-container-nopadding":r(ue),"scale-container-hasfooter":r(ge)}]),style:v(r(re))},[r(de)?(n(),p(r(I),{key:0,config:Z.config,maxScore:Z.maxScore},null,8,["config","maxScore"])):u("v-if",!0),f(r(M),{ref_key:"formRef",ref:te,model:Z.form,rules:Z.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(n(!0),l(c,null,y(Z.formArray,((e,t)=>(n(),l(c,{key:(e.id||e.seq)+t},[r(ce)(e)?(n(),p(r(R),{key:0,path:e.val_key,"show-label":!r(j)(e.type),class:"c-scle-form-item"},{label:g((()=>[m("span",{class:s({"scale-label-required":r(se)(e)}),innerHTML:r(pe)(e)},null,10,H),r(se)(e)?(n(),l("span",U,"(必填)")):u("v-if",!0),r(ye)(e)?(n(),l("span",W,b(r(ye)(e)),1)):u("v-if",!0),r(le)(e)?(n(),l("span",{key:2,class:"evalute-tip",onClick:t=>(async e=>{var t;if(Z.evatipMap[e.id])return void De(Z.evatipMap[e.id]);let a="getSubjectAnswer";const o=(null==(t=G.scaleApiConfig)?void 0:t[a])||null;if(!o||"function"!=typeof o)return void z.error(`${a} Is not a function`);let i=await o(e.id);i&&(Z.evatipMap[e.id]||(Z.evatipMap[e.id]=i,De(i)))})(e)},[f(r(P),{"icon-class":"a-xitongtubiaotishi"}),k(" 查看提示 ")],8,J)):u("v-if",!0)])),default:g((()=>[(n(),p(S(e.renderCom),d(r(ke)(e,t),{key:(e.id||e.seq)+t,onScaleChange:Pe,onOnChange:t=>((e,t)=>{Z.form[t.val_key]=Be(e)})(t,e),onVodFileList:xe}),null,16,["onOnChange"])),r(be)(e)?(n(),p(F,{key:0,item:e},null,8,["item"])):u("v-if",!0)])),_:2},1032,["path","show-label"])):u("v-if",!0)],64)))),128))])),_:1},8,["model","rules"])],6),r(ge)?(n(),l("div",Y,[u(" 分享的链接 隐藏取消按钮 "),"guage"!==G.sourceType?(n(),p(r(K),{key:0,onClick:qe},{default:g((()=>[k("取消")])),_:1})):u("v-if",!0),G.isLock?u("v-if",!0):(n(),p(r(K),{key:1,onClick:Fe,disabled:Z.banSubmit,type:"primary"},{default:g((()=>[k("保存")])),_:1},8,["disabled"]))])):u("v-if",!0)],64))],64))],64))],2))}}),[["__file","ScaleView.vue"]]);export{X as default};
|
|
@@ -5,7 +5,7 @@ export declare const ScaleViewComputed: (props: any, state: any, config: any) =>
|
|
|
5
5
|
width: string;
|
|
6
6
|
height: string;
|
|
7
7
|
transform: string;
|
|
8
|
-
} |
|
|
8
|
+
} | undefined>;
|
|
9
9
|
handlePageClass: import("vue").ComputedRef<boolean>;
|
|
10
10
|
isShowItem: import("vue").ComputedRef<(item: any) => any>;
|
|
11
11
|
handleShowQuestionNumber: import("vue").ComputedRef<(item: any) => any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{computed as e}from"vue";import{isEvaluation as t}from"../utils/judge-types.js";import a from"xe-utils";import n from"moment";import{componentMapStr as i}from"./use-component.js";const o=(o,l,r)=>{const{query:s}=r,u=(new Date).getTime(),v=e((()=>1==(null==s?void 0:s.formBoldOpen))),c=e((()=>e=>{var a;return!!t(e.type)&&(1==(null==s?void 0:s.evatip)||1==(null==(a=o.params)?void 0:a.evatip))})),d=e((()=>{var e;return(null==(e=l.config)?void 0:e.evaluateResultSetting)||{}})),m=e((()=>{const{evaluateTime:e}=d.value;return+e})),p=e((()=>{var e;return null==(e=d.value)?void 0:e.evaluateStartTime})),f=e((()=>{const e=new Date(p.value);return!!a.isValidDate(e)&&e})),g=e((()=>{if(!p.value||!m.value)return!1;if(!f.value)return!1;const e=n(p.value).add(m.value,"minutes").valueOf();return u>=e})),h=e((()=>{const e=f.value;if(!e)return!1;const t=n(e).valueOf();return u<t})),C=e((()=>e=>{const t=e.required;return o.styleSetting&&Object.keys(o.styleSetting).length&&"formBoldOpen"in o.styleSetting?t&&o.styleSetting.formBoldOpen:t&&v.value})),S=e((()=>{let e=l.fontSize;if(!e||"S"===e)return
|
|
1
|
+
import{computed as e}from"vue";import{isEvaluation as t}from"../utils/judge-types.js";import a from"xe-utils";import n from"moment";import{componentMapStr as i}from"./use-component.js";const o=(o,l,r)=>{const{query:s}=r,u=(new Date).getTime(),v=e((()=>1==(null==s?void 0:s.formBoldOpen))),c=e((()=>e=>{var a;return!!t(e.type)&&(1==(null==s?void 0:s.evatip)||1==(null==(a=o.params)?void 0:a.evatip))})),d=e((()=>{var e;return(null==(e=l.config)?void 0:e.evaluateResultSetting)||{}})),m=e((()=>{const{evaluateTime:e}=d.value;return+e})),p=e((()=>{var e;return null==(e=d.value)?void 0:e.evaluateStartTime})),f=e((()=>{const e=new Date(p.value);return!!a.isValidDate(e)&&e})),g=e((()=>{if(!p.value||!m.value)return!1;if(!f.value)return!1;const e=n(p.value).add(m.value,"minutes").valueOf();return u>=e})),h=e((()=>{const e=f.value;if(!e)return!1;const t=n(e).valueOf();return u<t})),C=e((()=>e=>{const t=e.required;return o.styleSetting&&Object.keys(o.styleSetting).length&&"formBoldOpen"in o.styleSetting?t&&o.styleSetting.formBoldOpen:t&&v.value})),S=e((()=>{let e=l.fontSize;if(!e||"S"===e)return;e={L:"large",M:"medium",XS:"extrasmall"}[e];const t=e&&(null==o?void 0:o.fontSizeObj[e])||1,a=Math.floor(100/t*1e4)/1e4;return{width:`${a}%`,height:`${a}%`,transform:`scale(${t})`}})),w=e((()=>!("customList"==o.type&&!o.noBtn)&&!(!o.noBtn&&!o.hideBtn))),y=e((()=>e=>X(e))),E=e((()=>e=>{var a;const{type:n}=e||{},i=!1===(null==(a=l.config)?void 0:a.autoQuestionNumber)?e.showTitle:`${e.softcode}、${e.showTitle}`;if(!t(n))return i;return`${i} <span style="color:#2d7aff;" class="score-i">${H(e)}</span>`})),L=e((()=>{const{config:e}=l;return!(!e||!Object.keys(e).length)&&"totalScore"in e})),O=e((()=>{var e;return(null==(e=o.ids)?void 0:e.guage_id)&&o.noBtn})),b=e((()=>{const e=o.params||{};if(!("skipCover"in e))return!1;return e.skipCover&&!h.value&&!g.value})),B=e((()=>!O.value&&l.showEvaluatePage&&l.showEvaluateSettingWrap&&!l.isFinished&&!o.noBtn&&!o.hideBtn)),A=e((()=>!O.value&&!B.value&&l.showEvaluateCountdownWrap&&!l.isFinished&&!o.noBtn&&!o.hideBtn)),T=e((()=>{const{evaluateResultSetting:e={}}=l.config;return(Object.values(e).filter((e=>{if(e)return!0}))||[]).length})),k=e((()=>l.paramsEvaluate&&Object.keys(l.paramsEvaluate).length)),R=e((()=>{const e=window.location.search||window.location.hash;if(!e)return;const t=["evaname","evadesc","evast","evadur","evaan"].find((t=>e.includes(t)));return l.paramsEvaluate||t})),_=e((()=>{var e;return 1==s.isEdit||1==(null==(e=o.params)?void 0:e.isEdit)})),U=e((()=>1==l.isFinished&&_.value)),F=e((()=>T.value||R.value?!o.noBtn&&!o.hideBtn&&(!l.isFinished||_.value):!o.noBtn&&!o.hideBtn)),P=e((()=>T.value||R.value?!!o.hideBtn||!!o.isLock||l.isFinished&&!_.value:!!o.hideBtn||!!o.isLock)),j=e((()=>e=>({EVALUATE_RADIO_BLOCK:"单选题",EVALUATE_CHECKBOX_BLOCK:"多选题"}[e.type]))),D=e((()=>e=>{var t;if(U.value)return!1;const{evaluateAnswer:i,checkAnswerMode:o,evaluateStartTime:r,evaluateTime:s}=(null==(t=l.config)?void 0:t.evaluateResultSetting)||{},u=(null==e?void 0:e.scoreConfigs)||0,v=i&&l.isFinished&&["EVALUATE_RADIO_BLOCK","EVALUATE_CHECKBOX_BLOCK","EVALUATE_SELECT","EVALUATE_INPUT"].includes(e.type)&&u;if(!r||!s||o&&1==o)return v;if(!a.isValidDate(new Date(r)))return v;const c=n(r).add(s,"minutes").diff(n(),"seconds",!0);return v&&c<=0})),V=e((()=>"customList"===o.type?"保存":"提交")),N=e((()=>({getSelectOptions:o.getSelectOptions,getSearchOptions:o.getSearchOptions,openType:o.openType}))),x=e((()=>({getCascadeOptions:o.getCascadeOptions}))),$=e((()=>({uploadPictureUrl:o.uploadPictureUrl,uploadFileUrl:o.uploadFileUrl}))),K=e((()=>({ak:o.ak}))),I=e((()=>({source:"guage",getChunkUploadConfig:o.getChunkUploadConfig}))),M=e((()=>({selectedList:l.labelSelectedList,getLabelList:o.getLabelList,deleteLabel:o.deleteLabel,saveLabelItem:o.saveLabelItem,sourceType:o.sourceType}))),q={RSelectCom:N.value,RCascaderCom:x.value,RUploadCom:$.value,RMapCom:K.value,RVodChunkUploadCom:I.value,CSelectLabelCom:M.value},J=e((()=>(e,t)=>{var a;const n=i[e.type],o=q[n]||{},r={form:l.form,item:e,index:t,isLock:P.value,...o};return"RVodChunkUploadCom"===n&&Object.assign(r,{formData:e,limitNum:(null==(a=e.setting)?void 0:a.limitPic)||1,defFileList:l.form[e.val_key]}),"RMapCom"===n&&Object.assign(r,{locationProp:l.form[e.val_key]}),"CSelectLabelCom"===n&&(delete r.form,delete r.index),r})),X=(e,t)=>{if(e.hide)return!1;const{form:n={},formArray:i=[]}=l;let o={};if(t){let t=e.setting;if(e.setting&&a.isJSON(e.setting)&&(t=JSON.parse(e.setting)),o=a.isString(t.callbackCondition)?JSON.parse(t.callbackCondition):t.callbackCondition,!o||!o.condition||!o.condition.length)return!0}else o=a.isString(e.relationLogic)?JSON.parse(e.relationLogic):e.relationLogic;if(!o||!Object.keys(o).length)return!0;const{relation_logic_is:r,condition:s,relation_logic:u}=o;if(r){const t=s.map((e=>{const t=i.filter((t=>t.seq==e.subject_seq))[0],o=z(t);return a.isArray(n[o])?n[o].some((t=>e.value.includes(t))):e.value.includes(n[o])}));e.isShow="OR"==u?t.some((e=>e)):"AND"==u?t.every((e=>e)):t[0]}return e.isShow},z=e=>e.databaseTitle||e.title,H=e=>{const{minScore:t=0,maxScore:a=0,scoreType:n}=e.scoreConfigs||{};return`(${a}分)`},Q=e((()=>{var e;return{formArray:l.formArray,evaluateResultConfig:(null==(e=l.config)?void 0:e.evaluateResultConfig)||{},evaluateResultSetting:d.value,isFinished:l.isFinished,maxScore:l.maxScore}})),W=e((()=>{var e;return{formArray:l.formArray,evaluateResultConfig:(null==(e=l.config)?void 0:e.evaluateResultConfig)||{},evaluateResultSetting:d.value,form:l.form,isFinished:l.isFinished,currentTime:l.currentTime,showEvaluateCountdown:l.showEvaluateCountdown}}));return{showEvatip:c,isFormBoldOpen:C,scaleStyle:S,handlePageClass:w,isShowItem:y,handleShowQuestionNumber:E,hasScore:L,isPreviewScale:O,showEvaluateEntry:B,showEvaluateCoundownPage:A,hasEvaluateResultSetting:T,hasparamsEvaluate:k,hasDefault:R,showSaveBtn:F,componentDisable:P,showEvaluateLabel:j,showAnswerParse:D,tipMsg:V,propsConfig:J,showEvent:X,formKey:z,evaluatePageProps:Q,evaluateCountdownProps:W,skipCover:b,scaleEdit:U}};export{o as ScaleViewComputed};
|
|
@@ -1315,6 +1315,79 @@ export declare const componentMap: {
|
|
|
1315
1315
|
RemoveCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1316
1316
|
videoImg: string;
|
|
1317
1317
|
success: string;
|
|
1318
|
+
Draggable: import("vue").DefineComponent<{
|
|
1319
|
+
list: {
|
|
1320
|
+
type: ArrayConstructor;
|
|
1321
|
+
required: boolean;
|
|
1322
|
+
default: any;
|
|
1323
|
+
};
|
|
1324
|
+
modelValue: {
|
|
1325
|
+
type: ArrayConstructor;
|
|
1326
|
+
required: boolean;
|
|
1327
|
+
default: any;
|
|
1328
|
+
};
|
|
1329
|
+
itemKey: {
|
|
1330
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
1331
|
+
required: boolean;
|
|
1332
|
+
};
|
|
1333
|
+
clone: {
|
|
1334
|
+
type: FunctionConstructor;
|
|
1335
|
+
default: (original: any) => any;
|
|
1336
|
+
};
|
|
1337
|
+
tag: {
|
|
1338
|
+
type: StringConstructor;
|
|
1339
|
+
default: string;
|
|
1340
|
+
};
|
|
1341
|
+
move: {
|
|
1342
|
+
type: FunctionConstructor;
|
|
1343
|
+
default: any;
|
|
1344
|
+
};
|
|
1345
|
+
componentData: {
|
|
1346
|
+
type: ObjectConstructor;
|
|
1347
|
+
required: boolean;
|
|
1348
|
+
default: any;
|
|
1349
|
+
};
|
|
1350
|
+
}, unknown, {
|
|
1351
|
+
error: boolean;
|
|
1352
|
+
}, {
|
|
1353
|
+
realList(): any;
|
|
1354
|
+
getKey(): any;
|
|
1355
|
+
}, {
|
|
1356
|
+
getUnderlyingVm(domElement: any): any;
|
|
1357
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
1358
|
+
emitChanges(evt: any): void;
|
|
1359
|
+
alterList(onList: any): void;
|
|
1360
|
+
spliceList(): void;
|
|
1361
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
1362
|
+
getRelatedContextFromMoveEvent({ to, related }: {
|
|
1363
|
+
to: any;
|
|
1364
|
+
related: any;
|
|
1365
|
+
}): any;
|
|
1366
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
1367
|
+
onDragStart(evt: any): void;
|
|
1368
|
+
onDragAdd(evt: any): void;
|
|
1369
|
+
onDragRemove(evt: any): void;
|
|
1370
|
+
onDragUpdate(evt: any): void;
|
|
1371
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
1372
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
1373
|
+
onDragEnd(): void;
|
|
1374
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
1375
|
+
move: Function;
|
|
1376
|
+
tag: string;
|
|
1377
|
+
clone: Function;
|
|
1378
|
+
list: unknown[];
|
|
1379
|
+
modelValue: unknown[];
|
|
1380
|
+
componentData: Record<string, any>;
|
|
1381
|
+
} & {
|
|
1382
|
+
itemKey?: string | Function | undefined;
|
|
1383
|
+
}>, {
|
|
1384
|
+
move: Function;
|
|
1385
|
+
tag: string;
|
|
1386
|
+
clone: Function;
|
|
1387
|
+
list: unknown[];
|
|
1388
|
+
modelValue: unknown[];
|
|
1389
|
+
componentData: Record<string, any>;
|
|
1390
|
+
}>;
|
|
1318
1391
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "vodFileList"[], "vodFileList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1319
1392
|
formData: {
|
|
1320
1393
|
type: ObjectConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as
|
|
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"xe-utils";const O={key:0,class:"label-disable-wrap"},K=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],j={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,K)):o("v-if",!0),r(c("div",j,[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};
|
|
@@ -132,6 +132,15 @@ export declare type IClassifyListType = {
|
|
|
132
132
|
createdByName?: string;
|
|
133
133
|
from?: string;
|
|
134
134
|
};
|
|
135
|
+
export declare type IClassifyItemType = {
|
|
136
|
+
name: string;
|
|
137
|
+
[key: string]: any;
|
|
138
|
+
};
|
|
139
|
+
export declare type IClassifyOutSaveType = {
|
|
140
|
+
id: string;
|
|
141
|
+
tableId: string;
|
|
142
|
+
[key: string]: string;
|
|
143
|
+
};
|
|
135
144
|
export declare type ISearchConfigType = {
|
|
136
145
|
con: string;
|
|
137
146
|
field_key: string;
|
|
@@ -195,6 +195,79 @@ declare const VodChunkUpload: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
195
195
|
RemoveCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
196
196
|
videoImg: string;
|
|
197
197
|
success: string;
|
|
198
|
+
Draggable: import("vue").DefineComponent<{
|
|
199
|
+
list: {
|
|
200
|
+
type: ArrayConstructor;
|
|
201
|
+
required: boolean;
|
|
202
|
+
default: any;
|
|
203
|
+
};
|
|
204
|
+
modelValue: {
|
|
205
|
+
type: ArrayConstructor;
|
|
206
|
+
required: boolean;
|
|
207
|
+
default: any;
|
|
208
|
+
};
|
|
209
|
+
itemKey: {
|
|
210
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
211
|
+
required: boolean;
|
|
212
|
+
};
|
|
213
|
+
clone: {
|
|
214
|
+
type: FunctionConstructor;
|
|
215
|
+
default: (original: any) => any;
|
|
216
|
+
};
|
|
217
|
+
tag: {
|
|
218
|
+
type: StringConstructor;
|
|
219
|
+
default: string;
|
|
220
|
+
};
|
|
221
|
+
move: {
|
|
222
|
+
type: FunctionConstructor;
|
|
223
|
+
default: any;
|
|
224
|
+
};
|
|
225
|
+
componentData: {
|
|
226
|
+
type: ObjectConstructor;
|
|
227
|
+
required: boolean;
|
|
228
|
+
default: any;
|
|
229
|
+
};
|
|
230
|
+
}, unknown, {
|
|
231
|
+
error: boolean;
|
|
232
|
+
}, {
|
|
233
|
+
realList(): any;
|
|
234
|
+
getKey(): any;
|
|
235
|
+
}, {
|
|
236
|
+
getUnderlyingVm(domElement: any): any;
|
|
237
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
238
|
+
emitChanges(evt: any): void;
|
|
239
|
+
alterList(onList: any): void;
|
|
240
|
+
spliceList(): void;
|
|
241
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
242
|
+
getRelatedContextFromMoveEvent({ to, related }: {
|
|
243
|
+
to: any;
|
|
244
|
+
related: any;
|
|
245
|
+
}): any;
|
|
246
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
247
|
+
onDragStart(evt: any): void;
|
|
248
|
+
onDragAdd(evt: any): void;
|
|
249
|
+
onDragRemove(evt: any): void;
|
|
250
|
+
onDragUpdate(evt: any): void;
|
|
251
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
252
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
253
|
+
onDragEnd(): void;
|
|
254
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
255
|
+
move: Function;
|
|
256
|
+
tag: string;
|
|
257
|
+
clone: Function;
|
|
258
|
+
list: unknown[];
|
|
259
|
+
modelValue: unknown[];
|
|
260
|
+
componentData: Record<string, any>;
|
|
261
|
+
} & {
|
|
262
|
+
itemKey?: string | Function | undefined;
|
|
263
|
+
}>, {
|
|
264
|
+
move: Function;
|
|
265
|
+
tag: string;
|
|
266
|
+
clone: Function;
|
|
267
|
+
list: unknown[];
|
|
268
|
+
modelValue: unknown[];
|
|
269
|
+
componentData: Record<string, any>;
|
|
270
|
+
}>;
|
|
198
271
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "vodFileList"[], "vodFileList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
199
272
|
formData: {
|
|
200
273
|
type: ObjectConstructor;
|
|
@@ -193,6 +193,79 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
193
193
|
RemoveCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
194
194
|
videoImg: string;
|
|
195
195
|
success: string;
|
|
196
|
+
Draggable: import("vue").DefineComponent<{
|
|
197
|
+
list: {
|
|
198
|
+
type: ArrayConstructor;
|
|
199
|
+
required: boolean;
|
|
200
|
+
default: any;
|
|
201
|
+
};
|
|
202
|
+
modelValue: {
|
|
203
|
+
type: ArrayConstructor;
|
|
204
|
+
required: boolean;
|
|
205
|
+
default: any;
|
|
206
|
+
};
|
|
207
|
+
itemKey: {
|
|
208
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
209
|
+
required: boolean;
|
|
210
|
+
};
|
|
211
|
+
clone: {
|
|
212
|
+
type: FunctionConstructor;
|
|
213
|
+
default: (original: any) => any;
|
|
214
|
+
};
|
|
215
|
+
tag: {
|
|
216
|
+
type: StringConstructor;
|
|
217
|
+
default: string;
|
|
218
|
+
};
|
|
219
|
+
move: {
|
|
220
|
+
type: FunctionConstructor;
|
|
221
|
+
default: any;
|
|
222
|
+
};
|
|
223
|
+
componentData: {
|
|
224
|
+
type: ObjectConstructor;
|
|
225
|
+
required: boolean;
|
|
226
|
+
default: any;
|
|
227
|
+
};
|
|
228
|
+
}, unknown, {
|
|
229
|
+
error: boolean;
|
|
230
|
+
}, {
|
|
231
|
+
realList(): any;
|
|
232
|
+
getKey(): any;
|
|
233
|
+
}, {
|
|
234
|
+
getUnderlyingVm(domElement: any): any;
|
|
235
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
236
|
+
emitChanges(evt: any): void;
|
|
237
|
+
alterList(onList: any): void;
|
|
238
|
+
spliceList(): void;
|
|
239
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
240
|
+
getRelatedContextFromMoveEvent({ to, related }: {
|
|
241
|
+
to: any;
|
|
242
|
+
related: any;
|
|
243
|
+
}): any;
|
|
244
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
245
|
+
onDragStart(evt: any): void;
|
|
246
|
+
onDragAdd(evt: any): void;
|
|
247
|
+
onDragRemove(evt: any): void;
|
|
248
|
+
onDragUpdate(evt: any): void;
|
|
249
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
250
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
251
|
+
onDragEnd(): void;
|
|
252
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
253
|
+
move: Function;
|
|
254
|
+
tag: string;
|
|
255
|
+
clone: Function;
|
|
256
|
+
list: unknown[];
|
|
257
|
+
modelValue: unknown[];
|
|
258
|
+
componentData: Record<string, any>;
|
|
259
|
+
} & {
|
|
260
|
+
itemKey?: string | Function | undefined;
|
|
261
|
+
}>, {
|
|
262
|
+
move: Function;
|
|
263
|
+
tag: string;
|
|
264
|
+
clone: Function;
|
|
265
|
+
list: unknown[];
|
|
266
|
+
modelValue: unknown[];
|
|
267
|
+
componentData: Record<string, any>;
|
|
268
|
+
}>;
|
|
196
269
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "vodFileList"[], "vodFileList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
197
270
|
formData: {
|
|
198
271
|
type: ObjectConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as o,computed as l,onMounted as i,
|
|
1
|
+
import{defineComponent as e,reactive as o,computed as l,onMounted as i,openBlock as s,createElementBlock as t,withDirectives as a,normalizeClass as r,unref as n,createElementVNode as d,Fragment as u,vShow as p,createCommentVNode as m,createVNode as c,withCtx as v,normalizeStyle as f,toDisplayString as g,createTextVNode as h,withModifiers as k,createBlock as y}from"vue";import b from"xe-utils";import"moment";import{getVodData as C}from"../hooks/vod-data.js";import{VodComputed as U}from"../hooks/vod-computed.js";import L from"../../../../shared/components/player-vod/video-modal.js";import V from"../vod-upload-modal.js";import{NIcon as _,NButton as D}from"naive-ui";import{PlayCircleSharp as O,PlayCircleOutline as w,RemoveCircleSharp as S}from"@vicons/ionicons5";import x from"../../../../shared/assets/img/video_default_cover.png.js";import j from"../../../../shared/assets/img/video.png.js";import F from"../../../../shared/assets/img/success.png.js";import z from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import N from"../../../../_virtual/plugin-vue_export-helper.js";const M={class:"c-upload"},A={class:"chunk-btn-content"},J={class:"c-uploader-btn"},B=["src"],P=d("div",{class:"uploader-text"},[d("p",null,"点击上传"),d("span",{class:"guage-text"},"上传视频(不超过50M)")],-1),E=["src"],T=d("div",{class:"uploader-text"},[d("p",null,"上传视频")],-1),R={class:"vod-wrap c-uploader-preview-wrap"},G={key:0,class:"vod-def-bg vod-uploading"},H={class:"vod-def-bg vod-done"},K=["src"],$=["src"],q={class:"c-icon-wrap"},I={class:"vod-def-bg vod-error"},Q=["src"],W={class:"tooltip-wrap error-wrap"},X=["onClick"];var Y=N(e({__name:"vod-chunk-upload",props:{formData:{type:Object,default:()=>({})},source:String,limitNum:{default:1},defFileList:{default:""},isLock:Boolean,isDetail:{type:Boolean,default:!1},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})}},emits:["vodFileList"],setup(e,{emit:N}){const Y=e,{VodState:Z}=C(),ee=o(Z),oe={},{isShowBtn:le,maskHeight:ie,showPercent:se,allow_format:te,defaultValue:ae,isDisabled:re,max_size:ne,maxlength:de}=U(Y,ee,{mainForm:oe});console.log(le.value,"----isShowBtn---",Y.formData.title),l((()=>ue()));const ue=()=>{const{formData:e}=Y;let o=[];if(o="guage"===Y.source?Y.defFileList:null==oe?void 0:oe.handleSysParams(oe.defaultValue[e.name]||e.default_val),o=JSON.parse(JSON.stringify(o)),!o)return[];let l=[];return Array.isArray(o)&&(l=[...o]),b.isJSON(o)&&(l=JSON.parse(o)),Array.isArray(l)?(l.forEach((e=>{e.thumbUrl=e.vodCoverUrl||void 0,e.uid=(-Math.random()).toString(),e.status="done"})),ee.fileList=l,console.log(ee.fileList,"----list---list"),pe(l),l):[]},pe=e=>{if(!Array.isArray(e))return"";const{formData:o,source:l}=Y;let i=[];e.forEach((e=>{if("done"===e.status&&(e.response&&"00000"==e.response.code||e.url)){const{data:o={}}=e.response||{};e.url||o.videoUrl;let l=e.vodCoverUrl||o.vodCoverUrl;i.push({name:e.name,size:e.size,url:e.url||o.videoUrl,vodCoverUrl:l,uid:e.id||e.uid||(-Math.random()).toString()})}})),console.log(i,"---resList---",Y.formData.title);let s=JSON.stringify(i);"guage"!==l?oe.baseForm.setFieldsValue({[o.val_key]:s}):N("vodFileList",s,Y.formData)},me=(e,o)=>{let l,i;if(e.type&&(i=e.type),e.url||e.videoUrl){if(l=e.url||e.videoUrl,!i){let e=l.split(".");i=`video/${e[e.length-1]}`}}else l=URL.createObjectURL(e.originFileObj);ee.playerOptions={sources:[{type:i,src:l}]},ee.videoVisible=!0},ce=()=>{ee.videoVisible=!1},ve=()=>{re.value||(ee.chunkUploadVisible=!0)},fe=e=>{let o=[];e.forEach((e=>{let l=e.videoCoverPic||void 0;o.push({name:e.videoName||e.name,url:e.videoUrl||e.url,size:e.size,vodCoverUrl:l,status:"done",uid:(-Math.random()).toString()})})),ee.fileList.push(...o),pe(ee.fileList)},ge=()=>{pe(ee.fileList)};return i((()=>{ue()})),(o,l)=>(s(),t("div",M,[e.isDetail||Y.isLock?m("v-if",!0):a((s(),t("div",{key:0,class:r(["c-chunk-uploader-btn",{"disable-upload":n(re)}]),onClick:ve},[d("div",A,[d("div",J,["guage"==Y.source?(s(),t(u,{key:0},[d("img",{src:n(j),class:"guage-img"},null,8,B),P],64)):(s(),t(u,{key:1},[d("img",{src:n(j),class:"guage-img"},null,8,E),T],64))])])],2)),[[p,n(le)]]),c(n(z),{modelValue:ee.fileList,"onUpdate:modelValue":l[0]||(l[0]=e=>ee.fileList=e),animation:"150",itemKey:"uid",disabled:n(re).value,options:ee.draggableOptions,onUpdate:ge,class:"drag-content"},{item:v((({element:o,index:l})=>{return[d("div",R,[m(" 上传中 "),"uploading"===o.status?(s(),t("div",G,[m(" TODO: 封面图补充 "),d("div",{class:"uploading-mask",style:f({height:n(ie)(o)})},[d("span",null,g(n(se)(o.percent))+"%",1)],4)])):"done"===o.status?(s(),t(u,{key:1},[m(" 上传完成 "),d("div",H,[d("img",{src:(i=o,i.thumbUrl?i.thumbUrl:x),class:"vod-cover-img"},null,8,K),d("div",{class:r(["tooltip-wrap",{"is-new":o.isNew}])},[d("img",{src:n(F),class:"upload-img"},null,8,$),h(" 上传成功 ")],2),m(" 播放图标 "),d("div",q,[c(n(_),{component:n(O),class:"icon-play theme_filled",onClick:k((e=>me(o)),["prevent","stop"])},null,8,["component","onClick"]),c(n(_),{component:n(w),class:"icon-play theme_outlined",onClick:k((e=>me(o)),["prevent","stop"])},null,8,["component","onClick"])])])],2112)):"error"===o.status?(s(),t(u,{key:2},[m(" 上传失败 "),d("div",I,[d("img",{src:o.thumbUrl,class:"vod-cover-img"},null,8,Q),d("div",W,[d("span",null,g(o.message?o.message:"上传失败,继续上传?"),1),c(n(D),{size:"small",onClick:k((e=>{}),["prevent","stop"])},{default:v((()=>[h("确定")])),_:2},1032,["onClick"])])])],2112)):m("v-if",!0),!["done","error"].includes(o.status)||n(re)||e.isDetail?m("v-if",!0):(s(),t("div",{key:3,onClick:k((e=>{return o=l,ee.fileList.splice(o,1),void pe(ee.fileList);var o}),["stop"]),class:"uploader-preview-delete"},[c(n(_),{class:"pre-delete",component:n(S)},null,8,["component"])],8,X))])];var i})),_:1},8,["modelValue","disabled","options"]),ee.videoVisible?(s(),y(n(L),{key:1,visible:ee.videoVisible,formData:Y.formData,playerOptions:ee.playerOptions,onCloseVideoModal:ce},null,8,["visible","formData","playerOptions"])):m("v-if",!0),c(n(V),{modelValue:ee.chunkUploadVisible,"onUpdate:modelValue":l[1]||(l[1]=e=>ee.chunkUploadVisible=e),modalTitle:Y.formData.name,max_size:n(ne),maxLength:n(de),propsCategoryMap:n(te),defaultList:ee.fileList,getChunkUploadConfig:e.getChunkUploadConfig,onGetSumbitList:fe},null,8,["modelValue","modalTitle","max_size","maxLength","propsCategoryMap","defaultList","getChunkUploadConfig"])]))}}),[["__file","vod-chunk-upload.vue"]]);export{Y as default};
|
package/es/env.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
interface ImportMetaEnv {
|
|
4
|
-
readonly VITE_APP_TYPE: string;
|
|
5
|
-
// 更多环境变量...
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface ImportMeta {
|
|
9
|
-
readonly env: ImportMetaEnv;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module '*.vue' {
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
import type { App, defineComponent } from 'vue';
|
|
15
|
-
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
-
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
-
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
-
install(app: App): void;
|
|
19
|
-
};
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
export default component;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare module '*.js';
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
interface ImportMetaEnv {
|
|
4
|
+
readonly VITE_APP_TYPE: string;
|
|
5
|
+
// 更多环境变量...
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ImportMeta {
|
|
9
|
+
readonly env: ImportMetaEnv;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.vue' {
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import type { App, defineComponent } from 'vue';
|
|
15
|
+
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
+
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
+
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
+
install(app: App): void;
|
|
19
|
+
};
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
export default component;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.js';
|