@qxs-bns/components 0.0.46 → 0.0.48
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/index.css +83 -0
- package/es/package.json.mjs +1 -1
- package/es/src/data-chart/src/components/area.vue.mjs +1 -1
- package/es/src/data-chart/src/components/card.vue.mjs +1 -1
- package/es/src/data-chart/src/components/card.vue2.mjs +1 -1
- package/es/src/data-chart/src/components/card.vue2.mjs.map +1 -1
- package/es/src/data-chart/src/components/line.vue.mjs +1 -1
- package/es/src/data-chart/src/components/table.vue.mjs +1 -1
- package/es/src/data-chart/src/components/table.vue.mjs.map +1 -1
- package/es/src/file-upload/src/file-upload.vue.mjs +1 -1
- package/es/src/file-upload/src/file-upload.vue.mjs.map +1 -1
- package/es/src/image-upload/src/image-upload.vue.mjs +1 -1
- package/es/src/image-upload/src/image-upload.vue.mjs.map +1 -1
- package/es/src/subject-action/src/subject-action.vue.mjs +1 -1
- package/es/src/subject-action/src/subject-action.vue.mjs.map +1 -1
- package/es/src/subject-list/src/components/SubjectPageEnd.vue.mjs +1 -1
- package/es/src/subject-list/src/components/SubjectPageEnd.vue.mjs.map +1 -1
- package/es/src/subject-list/src/components/subject-blank-fill.vue.mjs +1 -1
- package/es/src/subject-list/src/components/subject-blank-fill.vue.mjs.map +1 -1
- package/es/src/subject-list/src/components/subject-scale.vue.mjs +1 -1
- package/es/src/subject-list/src/components/subject-scale.vue.mjs.map +1 -1
- package/es/src/subject-list/src/components/subject-single.vue.mjs +1 -1
- package/es/src/subject-list/src/components/subject-single.vue.mjs.map +1 -1
- package/es/src/subject-list/src/components/subject-text-fill.vue.mjs +1 -1
- package/es/src/subject-list/src/components/subject-text-fill.vue.mjs.map +1 -1
- package/es/src/subject-list/src/subject-list.vue.mjs +1 -1
- package/es/src/subject-list/src/subject-list.vue.mjs.map +1 -1
- package/es/src/tiny-mce-editor/index.mjs.map +1 -1
- package/es/src/tiny-mce-editor/src/tiny-mce-editor.vue.mjs +1 -1
- package/es/src/tiny-mce-editor/src/tiny-mce-editor.vue.mjs.map +1 -1
- package/lib/index.css +83 -0
- package/lib/package.json.cjs +1 -1
- package/lib/src/data-chart/src/components/area.vue.cjs +1 -1
- package/lib/src/data-chart/src/components/card.vue.cjs +1 -1
- package/lib/src/data-chart/src/components/card.vue2.cjs +1 -1
- package/lib/src/data-chart/src/components/card.vue2.cjs.map +1 -1
- package/lib/src/data-chart/src/components/line.vue.cjs +1 -1
- package/lib/src/data-chart/src/components/table.vue.cjs +1 -1
- package/lib/src/data-chart/src/components/table.vue.cjs.map +1 -1
- package/lib/src/file-upload/src/file-upload.vue.cjs +1 -1
- package/lib/src/file-upload/src/file-upload.vue.cjs.map +1 -1
- package/lib/src/image-upload/src/image-upload.vue.cjs +1 -1
- package/lib/src/image-upload/src/image-upload.vue.cjs.map +1 -1
- package/lib/src/subject-action/src/subject-action.vue.cjs +1 -1
- package/lib/src/subject-action/src/subject-action.vue.cjs.map +1 -1
- package/lib/src/subject-list/src/components/SubjectPageEnd.vue.cjs +1 -1
- package/lib/src/subject-list/src/components/SubjectPageEnd.vue.cjs.map +1 -1
- package/lib/src/subject-list/src/components/subject-blank-fill.vue.cjs +1 -1
- package/lib/src/subject-list/src/components/subject-blank-fill.vue.cjs.map +1 -1
- package/lib/src/subject-list/src/components/subject-scale.vue.cjs +1 -1
- package/lib/src/subject-list/src/components/subject-scale.vue.cjs.map +1 -1
- package/lib/src/subject-list/src/components/subject-single.vue.cjs +1 -1
- package/lib/src/subject-list/src/components/subject-single.vue.cjs.map +1 -1
- package/lib/src/subject-list/src/components/subject-text-fill.vue.cjs +1 -1
- package/lib/src/subject-list/src/components/subject-text-fill.vue.cjs.map +1 -1
- package/lib/src/subject-list/src/subject-list.vue.cjs +1 -1
- package/lib/src/subject-list/src/subject-list.vue.cjs.map +1 -1
- package/lib/src/tiny-mce-editor/index.cjs.map +1 -1
- package/lib/src/tiny-mce-editor/src/tiny-mce-editor.vue.cjs +1 -1
- package/lib/src/tiny-mce-editor/src/tiny-mce-editor.vue.cjs.map +1 -1
- package/package.json +5 -8
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/index.scss +13 -0
- package/theme-chalk/src/base.css +1 -0
- package/theme-chalk/src/base.scss +16 -0
- package/theme-chalk/src/common/element-plus.css +1 -0
- package/theme-chalk/src/common/element-plus.scss +606 -0
- package/theme-chalk/src/data-chart/empty.css +1 -0
- package/theme-chalk/src/data-chart/empty.scss +24 -0
- package/theme-chalk/src/data-chart/index.css +1 -0
- package/theme-chalk/src/data-chart/index.scss +9 -0
- package/theme-chalk/src/data-chart/table.css +1 -0
- package/theme-chalk/src/data-chart/table.scss +39 -0
- package/theme-chalk/src/file-upload.css +1 -0
- package/theme-chalk/src/file-upload.scss +34 -0
- package/theme-chalk/src/fixed-action-bar.css +1 -0
- package/theme-chalk/src/fixed-action-bar.scss +18 -0
- package/theme-chalk/src/image-upload.css +1 -0
- package/theme-chalk/src/image-upload.scss +135 -0
- package/theme-chalk/src/mixins/_var.css +0 -0
- package/theme-chalk/src/mixins/_var.scss +24 -0
- package/theme-chalk/src/mixins/config.css +0 -0
- package/theme-chalk/src/mixins/config.scss +14 -0
- package/theme-chalk/src/mixins/function.css +0 -0
- package/theme-chalk/src/mixins/function.scss +95 -0
- package/theme-chalk/src/mixins/mixins.css +0 -0
- package/theme-chalk/src/mixins/mixins.scss +103 -0
- package/theme-chalk/src/photo-crop-tool.css +1 -0
- package/theme-chalk/src/photo-crop-tool.scss +84 -0
- package/theme-chalk/{subject-action.css → src/subject-action.css} +1 -1
- package/theme-chalk/src/subject-action.scss +36 -0
- package/theme-chalk/src/subject-layout.css +1 -0
- package/theme-chalk/src/subject-layout.scss +28 -0
- package/theme-chalk/src/subject-list.css +1 -0
- package/theme-chalk/src/subject-list.scss +289 -0
- package/theme-chalk/src/subject-template.scss +5 -0
- package/theme-chalk/src/subject-type.css +1 -0
- package/theme-chalk/src/subject-type.scss +32 -0
- package/theme-chalk/src/tiny-mce-editor.css +1 -0
- package/theme-chalk/src/tiny-mce-editor.scss +27 -0
- package/types/src/image-upload/index.d.ts +3 -40
- package/types/src/image-upload/index.d.ts.map +1 -1
- package/types/src/image-upload/src/image-upload.vue.d.ts +11 -20
- package/types/src/image-upload/src/image-upload.vue.d.ts.map +1 -1
- package/types/src/subject-layout/src/subject-layout.vue.d.ts.map +1 -1
- package/types/src/tiny-mce-editor/index.d.ts +1 -1
- package/types/src/tiny-mce-editor/index.d.ts.map +1 -1
- package/types/src/tiny-mce-editor/src/tiny-mce-editor.vue.d.ts +19 -19
- package/types/src/tiny-mce-editor/src/tiny-mce-editor.vue.d.ts.map +1 -1
- package/types/tsconfig.tsbuildinfo +1 -1
- package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +0 -2
- package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs.map +0 -1
- package/es/src/data-chart/src/components/area.vue3.mjs +0 -2
- package/es/src/data-chart/src/components/area.vue3.mjs.map +0 -1
- package/es/src/data-chart/src/components/card.vue3.mjs +0 -2
- package/es/src/data-chart/src/components/card.vue3.mjs.map +0 -1
- package/es/src/data-chart/src/components/line.vue3.mjs +0 -2
- package/es/src/data-chart/src/components/line.vue3.mjs.map +0 -1
- package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs +0 -2
- package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs.map +0 -1
- package/lib/src/data-chart/src/components/area.vue3.cjs +0 -2
- package/lib/src/data-chart/src/components/area.vue3.cjs.map +0 -1
- package/lib/src/data-chart/src/components/card.vue3.cjs +0 -2
- package/lib/src/data-chart/src/components/card.vue3.cjs.map +0 -1
- package/lib/src/data-chart/src/components/line.vue3.cjs +0 -2
- package/lib/src/data-chart/src/components/line.vue3.cjs.map +0 -1
- package/theme-chalk/base.css +0 -1
- package/theme-chalk/file-upload.css +0 -1
- package/theme-chalk/fixed-action-bar.css +0 -1
- package/theme-chalk/image-upload.css +0 -1
- package/theme-chalk/photo-crop-tool.css +0 -1
- package/theme-chalk/src/base.scss.js +0 -4
- package/theme-chalk/src/base.scss.js.map +0 -1
- package/theme-chalk/src/file-upload.scss.js +0 -4
- package/theme-chalk/src/file-upload.scss.js.map +0 -1
- package/theme-chalk/src/fixed-action-bar.scss.js +0 -4
- package/theme-chalk/src/fixed-action-bar.scss.js.map +0 -1
- package/theme-chalk/src/image-upload.scss.js +0 -4
- package/theme-chalk/src/image-upload.scss.js.map +0 -1
- package/theme-chalk/src/index.scss.js +0 -4
- package/theme-chalk/src/index.scss.js.map +0 -1
- package/theme-chalk/src/photo-crop-tool.scss.js +0 -4
- package/theme-chalk/src/photo-crop-tool.scss.js.map +0 -1
- package/theme-chalk/src/subject-action.scss.js +0 -4
- package/theme-chalk/src/subject-action.scss.js.map +0 -1
- package/theme-chalk/src/subject-layout.scss.js +0 -4
- package/theme-chalk/src/subject-layout.scss.js.map +0 -1
- package/theme-chalk/src/subject-list.scss.js +0 -4
- package/theme-chalk/src/subject-list.scss.js.map +0 -1
- package/theme-chalk/src/subject-template.scss.js +0 -4
- package/theme-chalk/src/subject-template.scss.js.map +0 -1
- package/theme-chalk/src/subject-type.scss.js +0 -4
- package/theme-chalk/src/subject-type.scss.js.map +0 -1
- package/theme-chalk/src/tiny-mce-editor.scss.js +0 -4
- package/theme-chalk/src/tiny-mce-editor.scss.js.map +0 -1
- package/theme-chalk/subject-layout.css +0 -1
- package/theme-chalk/subject-list.css +0 -1
- package/theme-chalk/subject-type.css +0 -1
- package/theme-chalk/tiny-mce-editor.css +0 -1
- /package/theme-chalk/{subject-template.css → src/subject-template.css} +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("element-plus/es"),t=require("vue"),l=require("@element-plus/icons-vue"),a=require("@qxs-bns/hooks"),n=require("element-plus"),o=require("../../../subject-action/src/subject-action.vue.cjs"),r=require("../../../subject-layout/src/subject-layout.vue.cjs"),i=require("../../../tiny-mce-editor/src/tiny-mce-editor.vue.cjs");const s={class:"preview"},d={class:"content"},u={class:"title"},c={key:0},m=["innerHTML"],f={class:"content flex flex-col"},p={key:1,class:"flex",style:{"margin-top":"10px",color:"#a8abb2"}},v={class:"title"},x={class:"flex"},V={style:{flex:"1"},class:"margin-bottom"},y={class:"margin-bottom flex flex-items-center"},E={class:"flex"},g={style:{flex:"1"}},N={class:"margin-bottom answer-list"},w={class:"label flex flex-justify-end"},k={class:"answer-tags"},h={class:"operation"},C={key:0,class:"margin-bottom flex"},B={style:{flex:"1"}},b={key:1,class:"margin-bottom flex"},S={style:{flex:"1"}},I={class:"flex flex-justify-end"};var q=t.defineComponent({__name:"subject-text-fill",props:{orderIndex:{type:Number,required:!0},title:{type:String,required:!1},isSave:{type:Boolean,required:!0},showAction:{type:Boolean,required:!1},answerList:{type:null,required:!1},analysis:{type:String,required:!1},isEdit:{type:Boolean,required:!0},isSet:{type:Boolean,required:!0},examExpand:{type:String,required:!1},examAnswerSettingVO:{type:Object,required:!1},examRichTextContent:{type:String,required:!1},showAnalysis:{type:Boolean,required:!1},examAnswerRelationType:{type:Number,required:!1}},emits:["move","save","delete","edit","add"],setup(q,{emit:j}){const O=q,A=j,R=t.useAttrs(),T=t.ref([{title:"",tag:"",showInput:!1}]),_=t.ref(""),L=t.ref(""),M=t.ref(),D=t.ref(""),U=t.ref(!1),F=t.ref(""),z=[{label:"答案不分顺序",value:"isInOrder"},{label:"忽略大小写",value:"isIgnoreCase"}],P=t.ref(["isInOrder","isIgnoreCase"]);function H(){T.value.push({title:"",tag:"",showInput:!1})}function G(){U.value=!1,F.value=""}function $(){if(_.value){if(M.value||D.value){if(!M.value)return void n.ElMessage.error("请完善答题设置!");if(!D.value)return void n.ElMessage.error("请输入问题正确答案!");if(T.value.length!==M.value)return void n.ElMessage.error("关键词个数设置有误!");const e=[];if(T.value.forEach(((t,l)=>{t.title||e.push(`关键词${l+1}未设置`)})),e.length>0)return void n.ElMessage.error(e.join(","))}A("save",{title:_.value,answers:T.value.filter((e=>e.title)).map((e=>({title:e.title}))),analysis:L.value,isSetCorrectAnswer:!!D.value,examExpand:D.value,examAnswerSettingBO:{isIgnoreCase:P.value?.includes("isIgnoreCase"),isInOrder:P.value?.includes("isInOrder"),keywordCount:M.value},examRichTextContent:U.value?F.value:""})}else n.ElMessage.error("题目标题不能为空!")}t.onMounted((function(){O.title&&(_.value=O.title),O.answerList&&O.answerList.length&&(T.value=O.answerList),O.examAnswerSettingVO&&(P.value=P.value.filter((e=>"isIgnoreCase"===e&&O.examAnswerSettingVO?.isIgnoreCase||"isInOrder"===e&&O.examAnswerSettingVO?.isInOrder))),O.examAnswerSettingVO?.keywordCount&&(M.value=O.examAnswerSettingVO?.keywordCount),O.examExpand&&(D.value=O.examExpand),O.analysis&&(L.value=O.analysis),O.examRichTextContent&&(F.value=O.examRichTextContent,U.value=!0)}));const J=a.useNamespace("subject-text-fill");return(a,n)=>{const q=e.ElCheckbox,j=e.ElInput,K=e.ElInputNumber,Q=e.ElCheckboxGroup,W=e.ElTag,X=e.ElIcon,Y=e.ElButton,Z=e.ElLink;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(J).e("text-fill-exam"))},[t.createVNode(r.default,{"show-edit":a.isEdit},{preview:t.withCtx((()=>[t.createElementVNode("div",s,[t.createElementVNode("div",d,[t.createElementVNode("span",u,t.toDisplayString(a.orderIndex+1)+"."+t.toDisplayString(t.unref(_))+"(问答题)",1),t.unref(U)?(t.openBlock(),t.createElementBlock("div",c,[t.createElementVNode("div",{innerHTML:t.unref(F),class:"rich-text"},null,8,m)])):t.createCommentVNode("v-if",!0),t.createElementVNode("div",f,[t.unref(T).some((e=>e.title))?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(T),((e,l)=>(t.openBlock(),t.createBlock(q,{key:l,class:"radio",disabled:!0},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.title),1)])),_:2},1024)))),128)):t.createCommentVNode("v-if",!0)]),t.unref(D)?(t.openBlock(),t.createElementBlock("div",p,[t.createElementVNode("span",v,"正确答案:"+t.toDisplayString(t.unref(D)),1)])):t.createCommentVNode("v-if",!0)])])])),edit:t.withCtx((()=>[t.createElementVNode("div",x,[n[12]||(n[12]=t.createElementVNode("div",{class:"label flex flex-justify-end"},[t.createElementVNode("span",null,"题目:")],-1)),t.createElementVNode("div",V,[t.createVNode(j,{modelValue:t.unref(_),"onUpdate:modelValue":n[0]||(n[0]=e=>t.isRef(_)?_.value=e:null),type:"textarea",rows:2,placeholder:"【问答题】请输入问题",maxlength:200,"show-word-limit":"",disabled:a.isSave},null,8,["modelValue","disabled"])])]),t.createElementVNode("div",y,[n[13]||(n[13]=t.createElementVNode("div",{class:"label flex flex-justify-end"},[t.createElementVNode("span",null,"答题设置:")],-1)),n[14]||(n[14]=t.createElementVNode("span",null,"共答对",-1)),t.createVNode(K,{modelValue:t.unref(M),"onUpdate:modelValue":n[1]||(n[1]=e=>t.isRef(M)?M.value=e:null),style:{width:"100px",margin:"0 10px"},min:1},null,8,["modelValue"]),n[15]||(n[15]=t.createElementVNode("span",{style:{"margin-right":"10px"}},"个关键词,算是正确的",-1)),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(z,(e=>t.createVNode(Q,{key:e.value,modelValue:t.unref(P),"onUpdate:modelValue":n[2]||(n[2]=e=>t.isRef(P)?P.value=e:null)},{default:t.withCtx((()=>[t.createVNode(q,{label:e.value,class:"margin-left-10"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.label),1)])),_:2},1032,["label"])])),_:2},1032,["modelValue"]))),64))]),t.createElementVNode("div",E,[n[16]||(n[16]=t.createElementVNode("div",{class:"label flex flex-justify-end"},[t.createElementVNode("span",null,"答案:")],-1)),t.createElementVNode("div",g,[t.createVNode(j,{modelValue:t.unref(D),"onUpdate:modelValue":n[3]||(n[3]=e=>t.isRef(D)?D.value=e:null),type:"textarea",rows:2,placeholder:"请输入正确答案",maxlength:200,"show-word-limit":"",disabled:a.isSave},null,8,["modelValue","disabled"])])]),t.createElementVNode("div",N,[n[17]||(n[17]=t.createElementVNode("span",{style:{"padding-left":"60px"}},"*如遇包含特殊字符的关键词,需添加多个同义词,例:'CO₂'需添加同义词'CO2'",-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(T),((e,n)=>(t.openBlock(),t.createElementBlock("div",{key:n,class:"answer-item flex flex-items-center"},[t.createElementVNode("div",w,[t.createElementVNode("span",null,"关键词"+t.toDisplayString(n+1)+":",1)]),t.createElementVNode("div",k,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.title.split(","),(l=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:l},[l?(t.openBlock(),t.createBlock(W,{key:0,closable:"",onClose:t=>function(e,t){if(e){const l=t.title.split(","),a=l.findIndex((t=>t===e));a>-1&&(l.splice(a,1),t.title=l.join(","))}}(l,e)},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(l),1)])),_:2},1032,["onClose"])):t.createCommentVNode("v-if",!0)],64)))),128)),a.isSave?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.showInput?(t.openBlock(),t.createBlock(j,{key:0,modelValue:e.tag,"onUpdate:modelValue":t=>e.tag=t,style:{width:"80px"},onBlur:()=>function(e){e.showInput=!1,e.tag&&(e.title=e.title?[e.title,e.tag].join(","):e.tag,e.tag="")}(e)},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(t.openBlock(),t.createBlock(Y,{key:1,size:"small",onClick:t=>e.showInput=!0},{default:t.withCtx((()=>[t.createVNode(X,null,{default:t.withCtx((()=>[t.createVNode(t.unref(l.Plus))])),_:1}),t.createElementVNode("span",null,t.toDisplayString(e.title?"添加同义词":"添加关键词"),1)])),_:2},1032,["onClick"]))],64))]),t.createElementVNode("div",h,[t.createVNode(X,{class:"icon"},{default:t.withCtx((()=>[t.createVNode(t.unref(l.CirclePlus),{class:t.normalizeClass([{disabled:a.isSave}]),onClick:H},null,8,["class"])])),_:1}),t.createVNode(X,{class:"icon"},{default:t.withCtx((()=>[t.createVNode(t.unref(l.Remove),{class:t.normalizeClass([{disabled:t.unref(T).length<2||a.isSave}]),onClick:e=>function(e){T.value.length<2||O.isSave||T.value.splice(e,1)}(n)},null,8,["class","onClick"])])),_:2},1024)])])))),128))]),a.showAnalysis?(t.openBlock(),t.createElementBlock("div",C,[n[18]||(n[18]=t.createElementVNode("div",{class:"label flex flex-justify-end"},[t.createElementVNode("span",null,"解析:")],-1)),t.createElementVNode("div",B,[t.createVNode(j,{modelValue:t.unref(L),"onUpdate:modelValue":n[4]||(n[4]=e=>t.isRef(L)?L.value=e:null),type:"textarea",rows:2,placeholder:"请输入题目解析"},null,8,["modelValue"])])])):t.createCommentVNode("v-if",!0),t.unref(U)?(t.openBlock(),t.createElementBlock("div",b,[n[20]||(n[20]=t.createElementVNode("div",{class:"label flex flex-justify-center"},[t.createElementVNode("span",null,"富文本:")],-1)),t.createElementVNode("div",S,[t.createVNode(i.default,t.mergeProps({"model-value":t.unref(F),"onUpdate:modelValue":n[5]||(n[5]=e=>t.isRef(F)?F.value=e:null)},t.unref(R),{style:{width:"100%"}}),null,16,["model-value"]),t.createElementVNode("div",I,[t.createVNode(Z,{type:"danger",onClick:G},{default:t.withCtx((()=>n[19]||(n[19]=[t.createTextVNode(" 删除富文本 ")]))),_:1})])])])):t.createCommentVNode("v-if",!0)])),default:t.withCtx((()=>[a.showAction?(t.openBlock(),t.createBlock(o.default,{key:0,"is-edit":a.isEdit,"is-set":a.isSet,showOtherOption:!1,examAnswerRelationType:O.examAnswerRelationType,onMoveUp:n[6]||(n[6]=e=>A("move","up")),onMoveDown:n[7]||(n[7]=e=>A("move","down")),onDelete:n[8]||(n[8]=e=>A("delete")),onSave:$,onEdit:n[9]||(n[9]=e=>A("edit")),onAdd:n[10]||(n[10]=e=>A("add",e)),onOnShowRichText:n[11]||(n[11]=e=>U.value=!0)},null,8,["is-edit","is-set","examAnswerRelationType"])):t.createCommentVNode("v-if",!0)])),_:1},8,["show-edit"])],2)}}});exports.default=q;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("element-plus/es");require("element-plus/es/components/base/style/index"),require("element-plus/es/components/link/style/index"),require("element-plus/es/components/button/style/index"),require("element-plus/es/components/icon/style/index"),require("element-plus/es/components/tag/style/index"),require("element-plus/es/components/checkbox-group/style/index"),require("element-plus/es/components/input-number/style/index"),require("element-plus/es/components/input/style/index"),require("element-plus/es/components/checkbox/style/index");var t=require("vue"),l=require("@element-plus/icons-vue"),n=require("@qxs-bns/hooks"),a=require("element-plus"),o=require("../../../subject-action/src/subject-action.vue.cjs"),r=require("../../../subject-layout/src/subject-layout.vue.cjs"),s=require("../../../tiny-mce-editor/src/tiny-mce-editor.vue.cjs");const i={class:"preview"},d={class:"content"},u={class:"title"},c={key:0},m=["innerHTML"],p={class:"content flex flex-col"},f={key:1,class:"flex",style:{"margin-top":"10px",color:"#a8abb2"}},v={class:"title"},x={class:"flex"},V={style:{flex:"1"},class:"margin-bottom"},y={class:"margin-bottom flex flex-items-center"},g={class:"flex"},E={style:{flex:"1"}},k={class:"margin-bottom answer-list"},N={class:"label flex flex-justify-end"},w={class:"answer-tags"},h={class:"operation"},C={key:0,class:"margin-bottom flex"},b={style:{flex:"1"}},B={key:1,class:"margin-bottom flex"},q={style:{flex:"1"}},S={class:"flex flex-justify-end"};var I=t.defineComponent({__name:"subject-text-fill",props:{orderIndex:{type:Number,required:!0},title:{type:String,required:!1},isSave:{type:Boolean,required:!0},showAction:{type:Boolean,required:!1},answerList:{type:null,required:!1},analysis:{type:String,required:!1},isEdit:{type:Boolean,required:!0},isSet:{type:Boolean,required:!0},examExpand:{type:String,required:!1},examAnswerSettingVO:{type:Object,required:!1},examRichTextContent:{type:String,required:!1},showAnalysis:{type:Boolean,required:!1},examAnswerRelationType:{type:Number,required:!1}},emits:["move","save","delete","edit","add"],setup(I,{emit:j}){const O=I,A=j,R=t.useAttrs(),T=t.ref([{title:"",tag:"",showInput:!1}]),_=t.ref(""),L=t.ref(""),M=t.ref(),D=t.ref(""),U=t.ref(!1),F=t.ref(""),z=[{label:"答案不分顺序",value:"isInOrder"},{label:"忽略大小写",value:"isIgnoreCase"}],P=t.ref(["isInOrder","isIgnoreCase"]);function H(){T.value.push({title:"",tag:"",showInput:!1})}function G(){U.value=!1,F.value=""}function $(){if(_.value){if(M.value||D.value){if(!M.value)return void a.ElMessage.error("请完善答题设置!");if(!D.value)return void a.ElMessage.error("请输入问题正确答案!");if(T.value.length!==M.value)return void a.ElMessage.error("关键词个数设置有误!");const e=[];if(T.value.forEach(((t,l)=>{t.title||e.push(`关键词${l+1}未设置`)})),e.length>0)return void a.ElMessage.error(e.join(","))}A("save",{title:_.value,answers:T.value.filter((e=>e.title)).map((e=>({title:e.title}))),analysis:L.value,isSetCorrectAnswer:!!D.value,examExpand:D.value,examAnswerSettingBO:{isIgnoreCase:P.value?.includes("isIgnoreCase"),isInOrder:P.value?.includes("isInOrder"),keywordCount:M.value},examRichTextContent:U.value?F.value:""})}else a.ElMessage.error("题目标题不能为空!")}t.onMounted((function(){O.title&&(_.value=O.title),O.answerList&&O.answerList.length&&(T.value=O.answerList),O.examAnswerSettingVO&&(P.value=P.value.filter((e=>"isIgnoreCase"===e&&O.examAnswerSettingVO?.isIgnoreCase||"isInOrder"===e&&O.examAnswerSettingVO?.isInOrder))),O.examAnswerSettingVO?.keywordCount&&(M.value=O.examAnswerSettingVO?.keywordCount),O.examExpand&&(D.value=O.examExpand),O.analysis&&(L.value=O.analysis),O.examRichTextContent&&(F.value=O.examRichTextContent,U.value=!0)}));const J=n.useNamespace("subject-text-fill");return(n,a)=>{const I=e.ElCheckbox,j=e.ElInput,K=e.ElInputNumber,Q=e.ElCheckboxGroup,W=e.ElTag,X=e.ElIcon,Y=e.ElButton,Z=e.ElLink;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(J).e("text-fill-exam"))},[t.createVNode(r.default,{"show-edit":n.isEdit},{preview:t.withCtx((()=>[t.createElementVNode("div",i,[t.createElementVNode("div",d,[t.createElementVNode("span",u,t.toDisplayString(n.orderIndex+1)+"."+t.toDisplayString(t.unref(_))+"(问答题)",1),t.unref(U)?(t.openBlock(),t.createElementBlock("div",c,[t.createElementVNode("div",{innerHTML:t.unref(F),class:"rich-text"},null,8,m)])):t.createCommentVNode("v-if",!0),t.createElementVNode("div",p,[t.unref(T).some((e=>e.title))?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(T),((e,l)=>(t.openBlock(),t.createBlock(I,{key:l,class:"radio",disabled:!0},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.title),1)])),_:2},1024)))),128)):t.createCommentVNode("v-if",!0)]),t.unref(D)?(t.openBlock(),t.createElementBlock("div",f,[t.createElementVNode("span",v,"正确答案:"+t.toDisplayString(t.unref(D)),1)])):t.createCommentVNode("v-if",!0)])])])),edit:t.withCtx((()=>[t.createElementVNode("div",x,[a[12]||(a[12]=t.createElementVNode("div",{class:"label flex flex-justify-end"},[t.createElementVNode("span",null,"题目:")],-1)),t.createElementVNode("div",V,[t.createVNode(j,{modelValue:t.unref(_),"onUpdate:modelValue":a[0]||(a[0]=e=>t.isRef(_)?_.value=e:null),type:"textarea",rows:2,placeholder:"【问答题】请输入问题",maxlength:200,"show-word-limit":"",disabled:n.isSave},null,8,["modelValue","disabled"])])]),t.createElementVNode("div",y,[a[13]||(a[13]=t.createElementVNode("div",{class:"label flex flex-justify-end"},[t.createElementVNode("span",null,"答题设置:")],-1)),a[14]||(a[14]=t.createElementVNode("span",null,"共答对",-1)),t.createVNode(K,{modelValue:t.unref(M),"onUpdate:modelValue":a[1]||(a[1]=e=>t.isRef(M)?M.value=e:null),style:{width:"100px",margin:"0 10px"},min:1},null,8,["modelValue"]),a[15]||(a[15]=t.createElementVNode("span",{style:{"margin-right":"10px"}},"个关键词,算是正确的",-1)),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(z,(e=>t.createVNode(Q,{key:e.value,modelValue:t.unref(P),"onUpdate:modelValue":a[2]||(a[2]=e=>t.isRef(P)?P.value=e:null)},{default:t.withCtx((()=>[t.createVNode(I,{label:e.value,class:"margin-left-10"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.label),1)])),_:2},1032,["label"])])),_:2},1032,["modelValue"]))),64))]),t.createElementVNode("div",g,[a[16]||(a[16]=t.createElementVNode("div",{class:"label flex flex-justify-end"},[t.createElementVNode("span",null,"答案:")],-1)),t.createElementVNode("div",E,[t.createVNode(j,{modelValue:t.unref(D),"onUpdate:modelValue":a[3]||(a[3]=e=>t.isRef(D)?D.value=e:null),type:"textarea",rows:2,placeholder:"请输入正确答案",maxlength:200,"show-word-limit":"",disabled:n.isSave},null,8,["modelValue","disabled"])])]),t.createElementVNode("div",k,[a[17]||(a[17]=t.createElementVNode("span",{style:{"padding-left":"60px"}},"*如遇包含特殊字符的关键词,需添加多个同义词,例:'CO₂'需添加同义词'CO2'",-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(T),((e,a)=>(t.openBlock(),t.createElementBlock("div",{key:a,class:"answer-item flex flex-items-center"},[t.createElementVNode("div",N,[t.createElementVNode("span",null,"关键词"+t.toDisplayString(a+1)+":",1)]),t.createElementVNode("div",w,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.title.split(","),(l=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:l},[l?(t.openBlock(),t.createBlock(W,{key:0,closable:"",onClose:t=>function(e,t){if(e){const l=t.title.split(","),n=l.findIndex((t=>t===e));n>-1&&(l.splice(n,1),t.title=l.join(","))}}(l,e)},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(l),1)])),_:2},1032,["onClose"])):t.createCommentVNode("v-if",!0)],64)))),128)),n.isSave?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.showInput?(t.openBlock(),t.createBlock(j,{key:0,modelValue:e.tag,"onUpdate:modelValue":t=>e.tag=t,style:{width:"80px"},onBlur:()=>function(e){e.showInput=!1,e.tag&&(e.title=e.title?[e.title,e.tag].join(","):e.tag,e.tag="")}(e)},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(t.openBlock(),t.createBlock(Y,{key:1,size:"small",onClick:t=>e.showInput=!0},{default:t.withCtx((()=>[t.createVNode(X,null,{default:t.withCtx((()=>[t.createVNode(t.unref(l.Plus))])),_:1}),t.createElementVNode("span",null,t.toDisplayString(e.title?"添加同义词":"添加关键词"),1)])),_:2},1032,["onClick"]))],64))]),t.createElementVNode("div",h,[t.createVNode(X,{class:"icon"},{default:t.withCtx((()=>[t.createVNode(t.unref(l.CirclePlus),{class:t.normalizeClass([{disabled:n.isSave}]),onClick:H},null,8,["class"])])),_:1}),t.createVNode(X,{class:"icon"},{default:t.withCtx((()=>[t.createVNode(t.unref(l.Remove),{class:t.normalizeClass([{disabled:t.unref(T).length<2||n.isSave}]),onClick:e=>function(e){T.value.length<2||O.isSave||T.value.splice(e,1)}(a)},null,8,["class","onClick"])])),_:2},1024)])])))),128))]),n.showAnalysis?(t.openBlock(),t.createElementBlock("div",C,[a[18]||(a[18]=t.createElementVNode("div",{class:"label flex flex-justify-end"},[t.createElementVNode("span",null,"解析:")],-1)),t.createElementVNode("div",b,[t.createVNode(j,{modelValue:t.unref(L),"onUpdate:modelValue":a[4]||(a[4]=e=>t.isRef(L)?L.value=e:null),type:"textarea",rows:2,placeholder:"请输入题目解析"},null,8,["modelValue"])])])):t.createCommentVNode("v-if",!0),t.unref(U)?(t.openBlock(),t.createElementBlock("div",B,[a[20]||(a[20]=t.createElementVNode("div",{class:"label flex flex-justify-center"},[t.createElementVNode("span",null,"富文本:")],-1)),t.createElementVNode("div",q,[t.createVNode(s.default,t.mergeProps({"model-value":t.unref(F),"onUpdate:modelValue":a[5]||(a[5]=e=>t.isRef(F)?F.value=e:null)},t.unref(R),{style:{width:"100%"}}),null,16,["model-value"]),t.createElementVNode("div",S,[t.createVNode(Z,{type:"danger",onClick:G},{default:t.withCtx((()=>a[19]||(a[19]=[t.createTextVNode(" 删除富文本 ")]))),_:1})])])])):t.createCommentVNode("v-if",!0)])),default:t.withCtx((()=>[n.showAction?(t.openBlock(),t.createBlock(o.default,{key:0,"is-edit":n.isEdit,"is-set":n.isSet,showOtherOption:!1,examAnswerRelationType:O.examAnswerRelationType,onMoveUp:a[6]||(a[6]=e=>A("move","up")),onMoveDown:a[7]||(a[7]=e=>A("move","down")),onDelete:a[8]||(a[8]=e=>A("delete")),onSave:$,onEdit:a[9]||(a[9]=e=>A("edit")),onAdd:a[10]||(a[10]=e=>A("add",e)),onOnShowRichText:a[11]||(a[11]=e=>U.value=!0)},null,8,["is-edit","is-set","examAnswerRelationType"])):t.createCommentVNode("v-if",!0)])),_:1},8,["show-edit"])],2)}}});exports.default=I;
|
2
2
|
//# sourceMappingURL=subject-text-fill.vue.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"subject-text-fill.vue.cjs","sources":["../../../../../../../packages/components/src/subject-list/src/components/subject-text-fill.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CirclePlus, Plus, Remove } from '@element-plus/icons-vue'\nimport { useNamespace } from '@qxs-bns/hooks'\nimport { ElMessage } from 'element-plus'\nimport SubjectAction from '../../../subject-action/src/subject-action.vue'\nimport SubjectLayout from '../../../subject-layout/src/subject-layout.vue'\nimport TinyMceEditor from '../../../tiny-mce-editor/src/tiny-mce-editor.vue'\n\nconst props = defineProps<{\n orderIndex: number\n title?: string\n isSave: boolean\n showAction?: boolean\n answerList?: any\n analysis?: string\n isEdit: boolean\n isSet: boolean\n examExpand?: string\n examAnswerSettingVO?: {\n isInOrder: boolean\n isIgnoreCase: boolean\n keywordCount: number\n }\n examRichTextContent?: string\n showAnalysis?: boolean\n examAnswerRelationType?: number\n}>()\nconst emits = defineEmits(['move', 'save', 'delete', 'edit', 'add'])\n\nconst attrs = useAttrs()\n\nconst answers = ref<{\n title: string\n tag: string\n showInput: boolean\n}[]>([{\n title: '',\n tag: '',\n showInput: false,\n}])\n\nconst title = ref('')\nconst analysis = ref('')\nconst keywordCount = ref()\nconst correct = ref('')\nconst showRichText = ref(false)\nconst richText = ref('')\n\nconst checkList = [\n {\n label: '答案不分顺序',\n value: 'isInOrder',\n },\n {\n label: '忽略大小写',\n value: 'isIgnoreCase',\n },\n]\n\nconst isCheckList = ref(['isInOrder', 'isIgnoreCase'])\n\nfunction handleAddTag(item: any) {\n item.showInput = false\n if (item.tag) {\n item.title = item.title ? [item.title, item.tag].join(',') : item.tag\n item.tag = ''\n }\n}\n\nfunction closeTag(tag: string, item: any) {\n if (tag) {\n const tags = item.title.split(',')\n const index = tags.findIndex((i: string) => i === tag)\n if (index > -1) {\n tags.splice(index, 1)\n item.title = tags.join(',')\n }\n }\n}\n\nfunction addAnswer() {\n answers.value.push({\n title: '',\n tag: '',\n showInput: false,\n })\n}\n\nfunction deleteAnswer(index: number) {\n if (answers.value.length < 2 || props.isSave) {\n return\n }\n answers.value.splice(index, 1)\n}\n\nfunction deleteRichText() {\n showRichText.value = false\n richText.value = ''\n}\n\nfunction save() {\n if (!title.value) {\n ElMessage.error('题目标题不能为空!')\n return\n }\n\n if (keywordCount.value || correct.value) {\n if (!keywordCount.value) {\n ElMessage.error('请完善答题设置!')\n return\n }\n\n if (!correct.value) {\n ElMessage.error('请输入问题正确答案!')\n return\n }\n\n if (answers.value.length !== keywordCount.value) {\n ElMessage.error('关键词个数设置有误!')\n return\n }\n const msg: string[] = []\n answers.value.forEach((item, index) => {\n if (!item.title) {\n msg.push(`关键词${index + 1}未设置`)\n }\n })\n if (msg.length > 0) {\n ElMessage.error(msg.join(','))\n return\n }\n }\n\n emits('save', {\n title: title.value,\n answers: answers.value.filter((i: any) => i.title).map((item: any) => {\n return { title: item.title }\n }),\n analysis: analysis.value,\n isSetCorrectAnswer: !!correct.value,\n examExpand: correct.value,\n examAnswerSettingBO: {\n isIgnoreCase: isCheckList.value?.includes('isIgnoreCase'),\n isInOrder: isCheckList.value?.includes('isInOrder'),\n ...{ keywordCount: keywordCount.value },\n },\n examRichTextContent: showRichText.value ? richText.value : '',\n })\n}\n\nfunction init() {\n if (props.title) {\n title.value = props.title\n }\n\n if (props.answerList && props.answerList.length) {\n answers.value = props.answerList\n }\n\n if (props.examAnswerSettingVO) {\n // 仅保留与设置匹配的选项\n isCheckList.value = isCheckList.value.filter(item =>\n (item === 'isIgnoreCase' && props.examAnswerSettingVO?.isIgnoreCase)\n || (item === 'isInOrder' && props.examAnswerSettingVO?.isInOrder),\n )\n }\n\n if (props.examAnswerSettingVO?.keywordCount) {\n keywordCount.value = props.examAnswerSettingVO?.keywordCount\n }\n\n if (props.examExpand) {\n correct.value = props.examExpand\n }\n\n if (props.analysis) {\n analysis.value = props.analysis\n }\n\n if (props.examRichTextContent) {\n richText.value = props.examRichTextContent\n showRichText.value = true\n }\n}\n\nonMounted(init)\nconst ns = useNamespace('subject-text-fill')\n</script>\n\n<template>\n <div :class=\"ns.e('text-fill-exam')\">\n <SubjectLayout :show-edit=\"isEdit\">\n <template #preview>\n <div class=\"preview\">\n <div class=\"content\">\n <span class=\"title\">{{ orderIndex + 1 }}.{{ title }}(问答题)</span>\n <div v-if=\"showRichText\">\n <div v-html=\"richText\" class=\"rich-text\" />\n </div>\n <div class=\"content flex flex-col\">\n <template v-if=\"answers.some(item => item.title)\">\n <el-checkbox\n v-for=\"(item, index) in answers\"\n :key=\"index\"\n class=\"radio\"\n :disabled=\"true\"\n >\n {{ item.title }}\n </el-checkbox>\n </template>\n </div>\n <div\n v-if=\"correct\"\n class=\"flex\"\n style=\"margin-top: 10px;color: #a8abb2;\"\n >\n <span class=\"title\">正确答案:{{ correct }}</span>\n </div>\n </div>\n </div>\n </template>\n <template #edit>\n <div class=\"flex\">\n <div class=\"label flex flex-justify-end\">\n <span>题目:</span>\n </div>\n <div style=\"flex: 1;\" class=\"margin-bottom\">\n <el-input\n v-model=\"title\"\n type=\"textarea\"\n :rows=\"2\"\n placeholder=\"【问答题】请输入问题\"\n :maxlength=\"200\"\n show-word-limit\n :disabled=\"isSave\"\n />\n </div>\n </div>\n <div class=\"margin-bottom flex flex-items-center\">\n <div class=\"label flex flex-justify-end\">\n <span>答题设置:</span>\n </div>\n <span>共答对</span>\n <el-input-number\n v-model=\"keywordCount\"\n style=\"width: 100px;margin: 0 10px;\"\n :min=\"1\"\n />\n <span style=\"margin-right: 10px;\">个关键词,算是正确的</span>\n <el-checkbox-group\n v-for=\"item in checkList\"\n :key=\"item.value\"\n v-model=\"isCheckList\"\n >\n <el-checkbox :label=\"item.value\" class=\"margin-left-10\">\n {{ item.label }}\n </el-checkbox>\n </el-checkbox-group>\n </div>\n <div class=\"flex\">\n <div class=\"label flex flex-justify-end\">\n <span>答案:</span>\n </div>\n <div style=\"flex: 1;\">\n <el-input\n v-model=\"correct\"\n type=\"textarea\"\n :rows=\"2\"\n placeholder=\"请输入正确答案\"\n :maxlength=\"200\"\n show-word-limit\n :disabled=\"isSave\"\n />\n </div>\n </div>\n <div class=\"margin-bottom answer-list\">\n <span style=\"padding-left: 60px;\">*如遇包含特殊字符的关键词,需添加多个同义词,例:'CO₂'需添加同义词'CO2'</span>\n <div\n v-for=\"(item, index) in answers\"\n :key=\"index\"\n class=\"answer-item flex flex-items-center\"\n >\n <div class=\"label flex flex-justify-end\">\n <span>关键词{{ index + 1 }}:</span>\n </div>\n\n <div class=\"answer-tags\">\n <template\n v-for=\"i in item.title.split(',')\"\n :key=\"i\"\n >\n <el-tag\n v-if=\"i\"\n closable\n @close=\"closeTag(i, item)\"\n >\n {{ i }}\n </el-tag>\n </template>\n <template v-if=\"!isSave\">\n <el-input\n v-if=\"item.showInput\"\n v-model=\"item.tag\"\n style=\"width: 80px;\"\n @blur=\"() => handleAddTag(item)\"\n />\n <el-button\n v-else\n size=\"small\"\n @click=\"item.showInput = true\"\n >\n <el-icon><Plus /></el-icon>\n <span>{{ item.title ? '添加同义词' : '添加关键词' }}</span>\n </el-button>\n </template>\n </div>\n <div class=\"operation\">\n <el-icon class=\"icon\">\n <CirclePlus\n :class=\"[{ disabled: isSave }]\"\n @click=\"addAnswer\"\n />\n </el-icon>\n <el-icon class=\"icon\">\n <Remove\n :class=\"[{ disabled: answers.length < 2 || isSave }]\"\n @click=\"deleteAnswer(index)\"\n />\n </el-icon>\n </div>\n </div>\n </div>\n <div v-if=\"showAnalysis\" class=\"margin-bottom flex\">\n <div class=\"label flex flex-justify-end\">\n <span>解析:</span>\n </div>\n <div style=\"flex: 1;\">\n <el-input\n v-model=\"analysis\"\n type=\"textarea\"\n :rows=\"2\"\n placeholder=\"请输入题目解析\"\n />\n </div>\n </div>\n <div v-if=\"showRichText\" class=\"margin-bottom flex\">\n <div class=\"label flex flex-justify-center\">\n <span>富文本:</span>\n </div>\n <div style=\"flex: 1;\">\n <TinyMceEditor v-model:model-value=\"richText\" v-bind=\"attrs\" style=\"width: 100%;\" />\n <div class=\"flex flex-justify-end\">\n <el-link\n type=\"danger\"\n @click=\"deleteRichText\"\n >\n 删除富文本\n </el-link>\n </div>\n </div>\n </div>\n </template>\n <SubjectAction\n v-if=\"showAction\"\n :is-edit=\"isEdit\"\n :is-set=\"isSet\"\n :showOtherOption=\"false\"\n :examAnswerRelationType=\"props.examAnswerRelationType\"\n @move-up=\"emits('move', 'up')\"\n @move-down=\"emits('move', 'down')\"\n @delete=\"emits('delete')\"\n @save=\"save\"\n @edit=\"emits('edit')\"\n @add=\"type => emits('add', type)\"\n @onShowRichText=\"showRichText = true\"\n />\n </SubjectLayout>\n </div>\n</template>\n"],"names":["props","__props","emits","__emit","attrs","useAttrs","answers","ref","title","tag","showInput","analysis","keywordCount","correct","showRichText","richText","checkList","label","value","isCheckList","addAnswer","push","deleteRichText","save","ElMessage","error","length","msg","forEach","item","index","join","filter","i","map","isSetCorrectAnswer","examExpand","examAnswerSettingBO","isIgnoreCase","includes","isInOrder","examRichTextContent","onMounted","answerList","examAnswerSettingVO","ns","useNamespace","tags","split","findIndex","splice","isSave"],"mappings":"mnDAQA,MAAMA,EAAQC,EAmBRC,EAAQC,EAERC,EAAQC,EAAAA,WAERC,EAAUC,EAAAA,IAIX,CAAC,CACJC,MAAO,GACPC,IAAK,GACLC,WAAW,KAGPF,EAAQD,MAAI,IACZI,EAAWJ,MAAI,IACfK,EAAeL,EAAAA,MACfM,EAAUN,MAAI,IACdO,EAAeP,OAAI,GACnBQ,EAAWR,MAAI,IAEfS,EAAY,CAChB,CACEC,MAAO,SACPC,MAAO,aAET,CACED,MAAO,QACPC,MAAO,iBAILC,EAAcZ,EAAAA,IAAI,CAAC,YAAa,iBAqBtC,SAASa,IACPd,EAAQY,MAAMG,KAAK,CACjBb,MAAO,GACPC,IAAK,GACLC,WAAW,GACZ,CAUH,SAASY,IACPR,EAAaI,OAAQ,EACrBH,EAASG,MAAQ,EAAA,CAGnB,SAASK,IACH,GAACf,EAAMU,MAAP,CAKA,GAAAN,EAAaM,OAASL,EAAQK,MAAO,CACnC,IAACN,EAAaM,MAEhB,YADAM,EAAAA,UAAUC,MAAM,YAId,IAACZ,EAAQK,MAEX,YADAM,EAAAA,UAAUC,MAAM,cAIlB,GAAInB,EAAQY,MAAMQ,SAAWd,EAAaM,MAExC,YADAM,EAAAA,UAAUC,MAAM,cAGlB,MAAME,EAAgB,GAMlB,GALJrB,EAAQY,MAAMU,SAAQ,CAACC,EAAMC,KACtBD,EAAKrB,OACRmB,EAAIN,KAAK,MAAMS,EAAQ,OAAM,IAG7BH,EAAID,OAAS,EAEf,YADAF,EAAAA,UAAUC,MAAME,EAAII,KAAK,KAE3B,CAGF7B,EAAM,OAAQ,CACZM,MAAOA,EAAMU,MACbZ,QAASA,EAAQY,MAAMc,QAAQC,GAAWA,EAAEzB,QAAO0B,KAAKL,IAC/C,CAAErB,MAAOqB,EAAKrB,UAEvBG,SAAUA,EAASO,MACnBiB,qBAAsBtB,EAAQK,MAC9BkB,WAAYvB,EAAQK,MACpBmB,oBAAqB,CACnBC,aAAcnB,EAAYD,OAAOqB,SAAS,gBAC1CC,UAAWrB,EAAYD,OAAOqB,SAAS,aAClC3B,aAAcA,EAAaM,OAElCuB,oBAAqB3B,EAAaI,MAAQH,EAASG,MAAQ,IA3C3D,MADAM,EAAAA,UAAUC,MAAM,YA6CjB,CAsCHiB,EAAAA,WAnCA,WACM1C,EAAMQ,QACRA,EAAMU,MAAQlB,EAAMQ,OAGlBR,EAAM2C,YAAc3C,EAAM2C,WAAWjB,SACvCpB,EAAQY,MAAQlB,EAAM2C,YAGpB3C,EAAM4C,sBAEIzB,EAAAD,MAAQC,EAAYD,MAAMc,QAAOH,GACjC,iBAATA,GAA2B7B,EAAM4C,qBAAqBN,cAC1C,cAATT,GAAwB7B,EAAM4C,qBAAqBJ,aAIvDxC,EAAM4C,qBAAqBhC,eAChBA,EAAAM,MAAQlB,EAAM4C,qBAAqBhC,cAG9CZ,EAAMoC,aACRvB,EAAQK,MAAQlB,EAAMoC,YAGpBpC,EAAMW,WACRA,EAASO,MAAQlB,EAAMW,UAGrBX,EAAMyC,sBACR1B,EAASG,MAAQlB,EAAMyC,oBACvB3B,EAAaI,OAAQ,EACvB,IAII,MAAA2B,EAAKC,eAAa,0hHArHf,SAASrC,EAAaoB,GAC7B,GAAIpB,EAAK,CACP,MAAMsC,EAAOlB,EAAKrB,MAAMwC,MAAM,KACxBlB,EAAQiB,EAAKE,WAAWhB,GAAcA,IAAMxB,IAC9CqB,GAAQ,IACLiB,EAAAG,OAAOpB,EAAO,GACdD,EAAArB,MAAQuC,EAAKhB,KAAK,KACzB,CACF,yXAhBF,SAAsBF,GACpBA,EAAKnB,WAAY,EACbmB,EAAKpB,MACPoB,EAAKrB,MAAQqB,EAAKrB,MAAQ,CAACqB,EAAKrB,MAAOqB,EAAKpB,KAAKsB,KAAK,KAAOF,EAAKpB,IAClEoB,EAAKpB,IAAM,GACb,kuBAsBF,SAAsBqB,GAChBxB,EAAQY,MAAMQ,OAAS,GAAK1B,EAAMmD,QAG9B7C,EAAAY,MAAMgC,OAAOpB,EAAO,EAAC"}
|
1
|
+
{"version":3,"file":"subject-text-fill.vue.cjs","sources":["../../../../../../../packages/components/src/subject-list/src/components/subject-text-fill.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CirclePlus, Plus, Remove } from '@element-plus/icons-vue'\nimport { useNamespace } from '@qxs-bns/hooks'\nimport { ElMessage } from 'element-plus'\nimport SubjectAction from '../../../subject-action/src/subject-action.vue'\nimport SubjectLayout from '../../../subject-layout/src/subject-layout.vue'\nimport TinyMceEditor from '../../../tiny-mce-editor/src/tiny-mce-editor.vue'\n\nconst props = defineProps<{\n orderIndex: number\n title?: string\n isSave: boolean\n showAction?: boolean\n answerList?: any\n analysis?: string\n isEdit: boolean\n isSet: boolean\n examExpand?: string\n examAnswerSettingVO?: {\n isInOrder: boolean\n isIgnoreCase: boolean\n keywordCount: number\n }\n examRichTextContent?: string\n showAnalysis?: boolean\n examAnswerRelationType?: number\n}>()\nconst emits = defineEmits(['move', 'save', 'delete', 'edit', 'add'])\n\nconst attrs = useAttrs()\n\nconst answers = ref<{\n title: string\n tag: string\n showInput: boolean\n}[]>([{\n title: '',\n tag: '',\n showInput: false,\n}])\n\nconst title = ref('')\nconst analysis = ref('')\nconst keywordCount = ref()\nconst correct = ref('')\nconst showRichText = ref(false)\nconst richText = ref('')\n\nconst checkList = [\n {\n label: '答案不分顺序',\n value: 'isInOrder',\n },\n {\n label: '忽略大小写',\n value: 'isIgnoreCase',\n },\n]\n\nconst isCheckList = ref(['isInOrder', 'isIgnoreCase'])\n\nfunction handleAddTag(item: any) {\n item.showInput = false\n if (item.tag) {\n item.title = item.title ? [item.title, item.tag].join(',') : item.tag\n item.tag = ''\n }\n}\n\nfunction closeTag(tag: string, item: any) {\n if (tag) {\n const tags = item.title.split(',')\n const index = tags.findIndex((i: string) => i === tag)\n if (index > -1) {\n tags.splice(index, 1)\n item.title = tags.join(',')\n }\n }\n}\n\nfunction addAnswer() {\n answers.value.push({\n title: '',\n tag: '',\n showInput: false,\n })\n}\n\nfunction deleteAnswer(index: number) {\n if (answers.value.length < 2 || props.isSave) {\n return\n }\n answers.value.splice(index, 1)\n}\n\nfunction deleteRichText() {\n showRichText.value = false\n richText.value = ''\n}\n\nfunction save() {\n if (!title.value) {\n ElMessage.error('题目标题不能为空!')\n return\n }\n\n if (keywordCount.value || correct.value) {\n if (!keywordCount.value) {\n ElMessage.error('请完善答题设置!')\n return\n }\n\n if (!correct.value) {\n ElMessage.error('请输入问题正确答案!')\n return\n }\n\n if (answers.value.length !== keywordCount.value) {\n ElMessage.error('关键词个数设置有误!')\n return\n }\n const msg: string[] = []\n answers.value.forEach((item, index) => {\n if (!item.title) {\n msg.push(`关键词${index + 1}未设置`)\n }\n })\n if (msg.length > 0) {\n ElMessage.error(msg.join(','))\n return\n }\n }\n\n emits('save', {\n title: title.value,\n answers: answers.value.filter((i: any) => i.title).map((item: any) => {\n return { title: item.title }\n }),\n analysis: analysis.value,\n isSetCorrectAnswer: !!correct.value,\n examExpand: correct.value,\n examAnswerSettingBO: {\n isIgnoreCase: isCheckList.value?.includes('isIgnoreCase'),\n isInOrder: isCheckList.value?.includes('isInOrder'),\n ...{ keywordCount: keywordCount.value },\n },\n examRichTextContent: showRichText.value ? richText.value : '',\n })\n}\n\nfunction init() {\n if (props.title) {\n title.value = props.title\n }\n\n if (props.answerList && props.answerList.length) {\n answers.value = props.answerList\n }\n\n if (props.examAnswerSettingVO) {\n // 仅保留与设置匹配的选项\n isCheckList.value = isCheckList.value.filter(item =>\n (item === 'isIgnoreCase' && props.examAnswerSettingVO?.isIgnoreCase)\n || (item === 'isInOrder' && props.examAnswerSettingVO?.isInOrder),\n )\n }\n\n if (props.examAnswerSettingVO?.keywordCount) {\n keywordCount.value = props.examAnswerSettingVO?.keywordCount\n }\n\n if (props.examExpand) {\n correct.value = props.examExpand\n }\n\n if (props.analysis) {\n analysis.value = props.analysis\n }\n\n if (props.examRichTextContent) {\n richText.value = props.examRichTextContent\n showRichText.value = true\n }\n}\n\nonMounted(init)\nconst ns = useNamespace('subject-text-fill')\n</script>\n\n<template>\n <div :class=\"ns.e('text-fill-exam')\">\n <SubjectLayout :show-edit=\"isEdit\">\n <template #preview>\n <div class=\"preview\">\n <div class=\"content\">\n <span class=\"title\">{{ orderIndex + 1 }}.{{ title }}(问答题)</span>\n <div v-if=\"showRichText\">\n <div v-html=\"richText\" class=\"rich-text\" />\n </div>\n <div class=\"content flex flex-col\">\n <template v-if=\"answers.some(item => item.title)\">\n <el-checkbox\n v-for=\"(item, index) in answers\"\n :key=\"index\"\n class=\"radio\"\n :disabled=\"true\"\n >\n {{ item.title }}\n </el-checkbox>\n </template>\n </div>\n <div\n v-if=\"correct\"\n class=\"flex\"\n style=\"margin-top: 10px;color: #a8abb2;\"\n >\n <span class=\"title\">正确答案:{{ correct }}</span>\n </div>\n </div>\n </div>\n </template>\n <template #edit>\n <div class=\"flex\">\n <div class=\"label flex flex-justify-end\">\n <span>题目:</span>\n </div>\n <div style=\"flex: 1;\" class=\"margin-bottom\">\n <el-input\n v-model=\"title\"\n type=\"textarea\"\n :rows=\"2\"\n placeholder=\"【问答题】请输入问题\"\n :maxlength=\"200\"\n show-word-limit\n :disabled=\"isSave\"\n />\n </div>\n </div>\n <div class=\"margin-bottom flex flex-items-center\">\n <div class=\"label flex flex-justify-end\">\n <span>答题设置:</span>\n </div>\n <span>共答对</span>\n <el-input-number\n v-model=\"keywordCount\"\n style=\"width: 100px;margin: 0 10px;\"\n :min=\"1\"\n />\n <span style=\"margin-right: 10px;\">个关键词,算是正确的</span>\n <el-checkbox-group\n v-for=\"item in checkList\"\n :key=\"item.value\"\n v-model=\"isCheckList\"\n >\n <el-checkbox :label=\"item.value\" class=\"margin-left-10\">\n {{ item.label }}\n </el-checkbox>\n </el-checkbox-group>\n </div>\n <div class=\"flex\">\n <div class=\"label flex flex-justify-end\">\n <span>答案:</span>\n </div>\n <div style=\"flex: 1;\">\n <el-input\n v-model=\"correct\"\n type=\"textarea\"\n :rows=\"2\"\n placeholder=\"请输入正确答案\"\n :maxlength=\"200\"\n show-word-limit\n :disabled=\"isSave\"\n />\n </div>\n </div>\n <div class=\"margin-bottom answer-list\">\n <span style=\"padding-left: 60px;\">*如遇包含特殊字符的关键词,需添加多个同义词,例:'CO₂'需添加同义词'CO2'</span>\n <div\n v-for=\"(item, index) in answers\"\n :key=\"index\"\n class=\"answer-item flex flex-items-center\"\n >\n <div class=\"label flex flex-justify-end\">\n <span>关键词{{ index + 1 }}:</span>\n </div>\n\n <div class=\"answer-tags\">\n <template\n v-for=\"i in item.title.split(',')\"\n :key=\"i\"\n >\n <el-tag\n v-if=\"i\"\n closable\n @close=\"closeTag(i, item)\"\n >\n {{ i }}\n </el-tag>\n </template>\n <template v-if=\"!isSave\">\n <el-input\n v-if=\"item.showInput\"\n v-model=\"item.tag\"\n style=\"width: 80px;\"\n @blur=\"() => handleAddTag(item)\"\n />\n <el-button\n v-else\n size=\"small\"\n @click=\"item.showInput = true\"\n >\n <el-icon><Plus /></el-icon>\n <span>{{ item.title ? '添加同义词' : '添加关键词' }}</span>\n </el-button>\n </template>\n </div>\n <div class=\"operation\">\n <el-icon class=\"icon\">\n <CirclePlus\n :class=\"[{ disabled: isSave }]\"\n @click=\"addAnswer\"\n />\n </el-icon>\n <el-icon class=\"icon\">\n <Remove\n :class=\"[{ disabled: answers.length < 2 || isSave }]\"\n @click=\"deleteAnswer(index)\"\n />\n </el-icon>\n </div>\n </div>\n </div>\n <div v-if=\"showAnalysis\" class=\"margin-bottom flex\">\n <div class=\"label flex flex-justify-end\">\n <span>解析:</span>\n </div>\n <div style=\"flex: 1;\">\n <el-input\n v-model=\"analysis\"\n type=\"textarea\"\n :rows=\"2\"\n placeholder=\"请输入题目解析\"\n />\n </div>\n </div>\n <div v-if=\"showRichText\" class=\"margin-bottom flex\">\n <div class=\"label flex flex-justify-center\">\n <span>富文本:</span>\n </div>\n <div style=\"flex: 1;\">\n <TinyMceEditor v-model:model-value=\"richText\" v-bind=\"attrs\" style=\"width: 100%;\" />\n <div class=\"flex flex-justify-end\">\n <el-link\n type=\"danger\"\n @click=\"deleteRichText\"\n >\n 删除富文本\n </el-link>\n </div>\n </div>\n </div>\n </template>\n <SubjectAction\n v-if=\"showAction\"\n :is-edit=\"isEdit\"\n :is-set=\"isSet\"\n :showOtherOption=\"false\"\n :examAnswerRelationType=\"props.examAnswerRelationType\"\n @move-up=\"emits('move', 'up')\"\n @move-down=\"emits('move', 'down')\"\n @delete=\"emits('delete')\"\n @save=\"save\"\n @edit=\"emits('edit')\"\n @add=\"type => emits('add', type)\"\n @onShowRichText=\"showRichText = true\"\n />\n </SubjectLayout>\n </div>\n</template>\n"],"names":["props","__props","emits","__emit","attrs","useAttrs","answers","ref","title","tag","showInput","analysis","keywordCount","correct","showRichText","richText","checkList","label","value","isCheckList","addAnswer","push","deleteRichText","save","ElMessage","error","length","msg","forEach","item","index","join","filter","i","map","isSetCorrectAnswer","examExpand","examAnswerSettingBO","isIgnoreCase","includes","isInOrder","examRichTextContent","onMounted","answerList","examAnswerSettingVO","ns","useNamespace","tags","split","findIndex","splice","isSave"],"mappings":"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"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("./components/subject-blank-fill.vue.cjs"),
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("./components/subject-blank-fill.vue.cjs"),s=require("./components/subject-scale.vue.cjs"),n=require("./components/subject-single.vue.cjs"),i=require("./components/subject-text-fill.vue.cjs"),a=require("./components/SubjectRichText.vue.cjs"),o=require("./components/SubjectPageEnd.vue.cjs"),l=require("@qxs-bns/hooks"),r=require("@qxs-bns/utils"),c=require("element-plus/es");require("element-plus/es/components/base/style/index"),require("element-plus/es/components/message/style/index");const d={class:"subject-list-wrapper"};var u=e.defineComponent({name:"QxsSubjectList",__name:"subject-list",props:{subjectList:{type:Array,required:!0},isPreview:{type:Boolean,required:!0}},emits:["setRelation"],setup(u,{expose:m,emit:p}){const x=u,w=e.ref([]),v=p,y=e.useAttrs();m({addSubject:T,currentList:w,uploadExcel:function(e){w.value=w.value.concat(e)},addExam:function(e){console.log(e,"items");let t=1;const s=[];e.forEach((e=>{const n={...e,customId:r.setGuid(),answerType:e.richTextContent?"rich_text":e.examTypeEnum,answers:e.answers?.map((e=>({...e,title:e.answer,answerId:e.examAnswerId,isCorrect:e.isCorrect})))||[],isSave:!1,isEdit:!0,isRealCanDel:!0,hasSet:!1};n.pageIndex>t&&(s.push({customId:r.setGuid(),answerType:"page_end",analysis:"",scaleQuestionList:[],isSave:!1,isEdit:!0,isRealCanDel:!0,hasSet:!1,examAnswerRelationType:0}),t=n.pageIndex),s.push(n)})),w.value=w.value.concat(s)},setAnswerRelation:function(e,t,s){const n=w.value.find((e=>e.customId===t));if(n){const t=n.answers?.find((e=>e.customAnswerId===s));t&&(t.answerRelations=e)}}});const f=e.computed((()=>{const e=w.value.filter((e=>"page_end"===e.answerType));return t=>{const s=e.findIndex((e=>e.customId===t));return-1!==s?s+1:0}}));function h(){return e=>{let t=0,s=0;return w.value.forEach((n=>{"page_end"!==n.answerType&&(t++,e===n.customId&&(s=t))})),s-1}}function T(e,t=null,s=null){const n={customId:r.setGuid(),answerType:e,analysis:"",scaleQuestionList:[],isSave:!1,isEdit:!0,isRealCanDel:!0,hasSet:!1,examAnswerRelationType:s};null!==t?w.value.splice(t+1,0,n):w.value.push(n)}function A(e,t){if("up"===t&&e>0){const[t]=w.value.splice(e,1);w.value.splice(e-1,0,t)}else if("down"===t&&e<w.value.length-1){const[t]=w.value.splice(e,1);w.value.splice(e+1,0,t)}}function E(e,t){w.value[e]={...w.value[e],...t,isEdit:!1,examAnswerRelationType:t.examAnswerRelationType}}function R(e){w.value.splice(e,1),c.ElMessage.success("删除成功")}function g(e,t){v("setRelation",e,t)}e.watch((()=>x.subjectList),(e=>{e&&(w.value=[...e])}),{immediate:!0});const k=l.useNamespace("subject-list");return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(k).e("list-exam"))},[e.createElementVNode("div",d,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),((r,c)=>(e.openBlock(),e.createElementBlock("div",{key:r.customId,class:"subject-item"},[["single","multiple","sort"].includes(r.answerType)?(e.openBlock(),e.createBlock(n.default,e.mergeProps({key:0,ref_for:!0},e.unref(y),{"order-index":h()(r.customId),title:r.title,type:r.answerType,"exam-id":r.examId,isKey:r.isKey,"is-save":!r.isRealCanDel,customId:r.customId,"is-set":r.hasSet||!1,"answer-list":r.answers,analysis:r.analysis,"least-answer-count":r.leastAnswerCount,"is-edit":r.isEdit||!1,"show-action":!l.isPreview,"exam-expand":r.examExpand,answerCheckType:r.answerCheckType,"exam-rich-text-content":r.examRichTextContent,examAnswerRelationType:r.examAnswerRelationType,onSetRelation:g,onMove:e=>A(c,e),onDelete:e=>R(c),onSave:e=>E(c,e),onEdit:e=>r.isEdit=!0,onAdd:(e,t)=>T(e,c,t)}),null,16,["order-index","title","type","exam-id","isKey","is-save","customId","is-set","answer-list","analysis","least-answer-count","is-edit","show-action","exam-expand","answerCheckType","exam-rich-text-content","examAnswerRelationType","onMove","onDelete","onSave","onEdit","onAdd"])):"scale"===r.answerType?(e.openBlock(),e.createBlock(s.default,e.mergeProps({key:1,ref_for:!0},e.unref(y),{"order-index":h()(r.customId),title:r.title,"is-save":!r.isRealCanDel,"is-set":r.hasSet||!1,"answer-list":r.answers,analysis:r.analysis,"is-edit":r.isEdit||!1,"scale-question-list":r.scaleQuestionList,"show-action":!l.isPreview,"exam-rich-text-content":r.examRichTextContent,examAnswerRelationType:r.examAnswerRelationType,onMove:e=>A(c,e),onDelete:e=>R(c),onSave:e=>E(c,e),onEdit:e=>r.isEdit=!0,onAdd:e=>T(e,c,null)}),null,16,["order-index","title","is-save","is-set","answer-list","analysis","is-edit","scale-question-list","show-action","exam-rich-text-content","examAnswerRelationType","onMove","onDelete","onSave","onEdit","onAdd"])):"blank_fill"===r.answerType?(e.openBlock(),e.createBlock(t.default,e.mergeProps({key:2,ref_for:!0},e.unref(y),{"order-index":h()(r.customId),title:r.title,"is-save":!r.isRealCanDel,"is-set":r.hasSet||!1,"answer-list":r.answers,analysis:r.analysis,"show-action":!l.isPreview,"is-edit":r.isEdit||!1,"exam-answer-setting-v-o":r.examAnswerSettingVO||{},"exam-rich-text-content":r.examRichTextContent,examAnswerRelationType:r.examAnswerRelationType,onMove:e=>A(c,e),onDelete:e=>R(c),onSave:e=>E(c,e),onEdit:e=>r.isEdit=!0,onAdd:e=>T(e,c,null)}),null,16,["order-index","title","is-save","is-set","answer-list","analysis","show-action","is-edit","exam-answer-setting-v-o","exam-rich-text-content","examAnswerRelationType","onMove","onDelete","onSave","onEdit","onAdd"])):"text_fill"===r.answerType?(e.openBlock(),e.createBlock(i.default,e.mergeProps({key:3,ref_for:!0},e.unref(y),{"order-index":h()(r.customId),title:r.title,"is-save":!r.isRealCanDel,"is-set":r.hasSet||!1,"answer-list":r.answers,analysis:r.analysis,"show-action":!l.isPreview,"is-edit":r.isEdit||!1,"exam-expand":r.examExpand,"exam-answer-setting-v-o":r.examAnswerSettingVO||{},examAnswerRelationType:r.examAnswerRelationType,"exam-rich-text-content":r.examRichTextContent,onMove:e=>A(c,e),onDelete:e=>R(c),onSave:e=>E(c,e),onEdit:e=>r.isEdit=!0,onAdd:e=>T(e,c,null)}),null,16,["order-index","title","is-save","is-set","answer-list","analysis","show-action","is-edit","exam-expand","exam-answer-setting-v-o","examAnswerRelationType","exam-rich-text-content","onMove","onDelete","onSave","onEdit","onAdd"])):"rich_text"===r.answerType?(e.openBlock(),e.createBlock(a.default,e.mergeProps({key:4,ref_for:!0},e.unref(y),{"order-index":h()(r.customId),richTextContent:r.richTextContent,"is-set":r.hasSet||!1,"is-save":!r.isRealCanDel,"is-edit":r.isEdit||!1,"show-action":!l.isPreview,onMove:e=>A(c,e),onDelete:e=>R(c),examAnswerRelationType:r.examAnswerRelationType,onSave:e=>E(c,e),onEdit:e=>r.isEdit=!0,onAdd:e=>T(e,c,null)}),null,16,["order-index","richTextContent","is-set","is-save","is-edit","show-action","onMove","onDelete","examAnswerRelationType","onSave","onEdit","onAdd"])):"page_end"===r.answerType?(e.openBlock(),e.createBlock(o.default,{"total-page":w.value.filter((e=>"page_end"===e.answerType)).length,key:c,"current-page-index":e.unref(f)(r.customId),item:r,"is-edit":r.isEdit||!1,"is-set":r.hasSet||!1,"is-save":!r.isRealCanDel,examAnswerRelationType:r.examAnswerRelationType,onMove:e=>A(c,e),onDelete:e=>R(c),onSave:e=>E(c,e),onEdit:e=>r.isEdit=!0,onAdd:e=>T(e,c,null)},null,8,["total-page","current-page-index","item","is-edit","is-set","is-save","examAnswerRelationType","onMove","onDelete","onSave","onEdit","onAdd"])):e.createCommentVNode("v-if",!0)])))),128))])],2))}});exports.default=u;
|
2
2
|
//# sourceMappingURL=subject-list.vue.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"subject-list.vue.cjs","sources":["../../../../../../packages/components/src/subject-list/src/subject-list.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport SubjectBlankFill from './components/subject-blank-fill.vue'\nimport SubjectScale from './components/subject-scale.vue'\nimport SubjectSingle from './components/subject-single.vue'\nimport SubjectTextFill from './components/subject-text-fill.vue'\nimport SubjectRichText from './components/SubjectRichText.vue'\nimport SubjectPageEnd from './components/SubjectPageEnd.vue'\nimport { useNamespace } from '@qxs-bns/hooks'\nimport { setGuid } from '@qxs-bns/utils'\n\ndefineOptions({\n name: 'QxsSubjectList',\n})\n\nconst props = defineProps<{\n subjectList: any[]\n isPreview: boolean\n}>()\nconst currentList = ref([] as any)\nconst emits = defineEmits(['setRelation'])\n\nconst attrs = useAttrs()\n\ndefineExpose({\n addSubject,\n currentList,\n uploadExcel,\n addExam,\n setAnswerRelation,\n})\n\nfunction totalPageIndex() {\n return currentList.value.filter((v: any) => v.answerType === 'page_end').length\n}\n\nconst currentPageIndex = computed(() => {\n const currentPageList = currentList.value.filter((v: any) => v.answerType === 'page_end')\n return (currentId: string) => {\n const currentIndex = currentPageList.findIndex((c: any) => c.customId === currentId)\n return currentIndex !== -1 ? currentIndex + 1 : 0\n }\n})\n\nfunction currentIndex() {\n return (currentExamId: string) => {\n let current = 0\n let output = 0\n\n // 遍历 currentList,过滤掉分页器,并计算题目序号\n currentList.value.forEach((v: any) => {\n if (v.answerType !== 'page_end') { // 排除分页器\n current++\n if (currentExamId === v.customId) { // 匹配当前题目 ID\n output = current\n }\n }\n })\n\n return output-1\n }\n}\n\nfunction addSubject(type: string, index: number | null = null, examAnswerRelationType: number | null = null) {\n const newSubject = {\n customId: setGuid(),\n answerType: type,\n analysis: '',\n scaleQuestionList: [],\n isSave: false,\n isEdit: true,\n isRealCanDel: true,\n hasSet: false,\n examAnswerRelationType,\n }\n\n if (index !== null) {\n currentList.value.splice(index + 1, 0, newSubject)\n } else {\n currentList.value.push(newSubject)\n }\n}\nfunction addExam(items: any[]) {\n console.log(items, 'items')\n\n let currentIndex = 1\n const newList: any[] = []\n\n items.forEach((v: any) => {\n // 创建新的题目对象\n const newItem = {\n ...v,\n customId: setGuid(),\n answerType: v.richTextContent ? 'rich_text' : v.examTypeEnum,\n answers: v.answers?.map((c: any) => ({\n ...c,\n title: c.answer,\n answerId: c.examAnswerId,\n isCorrect: c.isCorrect,\n })) || [],\n isSave: false,\n isEdit: true,\n isRealCanDel: true,\n hasSet: false,\n }\n\n // 如果当前题目的 pageIndex 和 currentIndex 不一致,则插入分页器\n if (newItem.pageIndex > currentIndex) {\n newList.push({\n customId: setGuid(),\n answerType: 'page_end',\n analysis: '',\n scaleQuestionList: [],\n isSave: false,\n isEdit: true,\n isRealCanDel: true,\n hasSet: false,\n examAnswerRelationType: 0,\n })\n currentIndex = newItem.pageIndex\n }\n\n // 将题目添加到 newList\n newList.push(newItem)\n })\n\n // 更新 currentList\n currentList.value = currentList.value.concat(newList)\n}\nfunction uploadExcel(list: any[]) {\n currentList.value = currentList.value.concat(list)\n}\n\nfunction move(index: number, type: 'up' | 'down') {\n if (type === 'up' && index > 0) {\n const [item] = currentList.value.splice(index, 1)\n currentList.value.splice(index - 1, 0, item)\n } else if (type === 'down' && index < currentList.value.length - 1) {\n const [item] = currentList.value.splice(index, 1)\n currentList.value.splice(index + 1, 0, item)\n }\n}\n\nfunction saveSubject(index: number, item: any) {\n currentList.value[index] = {\n ...currentList.value[index],\n ...item,\n isEdit: false,\n examAnswerRelationType: item.examAnswerRelationType,\n }\n}\n\nfunction deleteSubject(index: number) {\n currentList.value.splice(index, 1)\n ElMessage.success('删除成功')\n}\n\nfunction setRelation(customId: number, examAnswers: any) {\n emits('setRelation', customId, examAnswers)\n}\n\nfunction setAnswerRelation(answerRelations: any, customId: string, customAnswerId: string) {\n const targetItem = currentList.value.find((v: any) => v.customId === customId)\n if (targetItem) {\n const targetAnswer = targetItem.answers?.find((c: any) => c.customAnswerId === customAnswerId)\n if (targetAnswer) {\n targetAnswer.answerRelations = answerRelations\n }\n }\n}\n\nwatch(() => props.subjectList, (newList: any) => {\n if (newList) {\n currentList.value = [...newList]\n }\n}, { immediate: true })\n\nconst ns = useNamespace('subject-list')\n</script>\n\n<template>\n <div :class=\"ns.e('list-exam')\">\n <div class=\"subject-list-wrapper\">\n <div v-for=\"(item, index) in currentList\" :key=\"item.customId\" class=\"subject-item\">\n <template v-if=\"['single', 'multiple', 'sort'].includes(item.answerType)\">\n <SubjectSingle\n v-bind=\"attrs\"\n :order-index=\"currentIndex()(item.customId)\"\n :title=\"item.title\"\n :type=\"item.answerType\"\n :exam-id=\"item.examId\"\n :isKey=\"item.isKey\"\n :is-save=\"!item.isRealCanDel\"\n :customId=\"item.customId\"\n :is-set=\"item.hasSet || false\"\n :answer-list=\"item.answers\"\n :analysis=\"item.analysis\"\n :least-answer-count=\"item.leastAnswerCount\"\n :is-edit=\"item.isEdit || false\"\n :show-action=\"!isPreview\"\n :exam-expand=\"item.examExpand\"\n :answerCheckType=\"item.answerCheckType\"\n :exam-rich-text-content=\"item.examRichTextContent\"\n :examAnswerRelationType=\"item.examAnswerRelationType\"\n @setRelation=\"setRelation\"\n @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\"\n @save=\"(item: any) => saveSubject(index, item)\"\n @edit=\"item.isEdit = true\"\n @add=\"(type: string, examAnswerRelationType: number) => addSubject(type, index, examAnswerRelationType)\"\n />\n </template>\n <SubjectScale\n v-bind=\"attrs\"\n v-else-if=\"item.answerType === 'scale'\"\n :order-index=\"currentIndex()(item.customId)\"\n :title=\"item.title\"\n :is-save=\"!item.isRealCanDel\"\n :is-set=\"item.hasSet || false\"\n :answer-list=\"item.answers\"\n :analysis=\"item.analysis\"\n :is-edit=\"item.isEdit || false\"\n :scale-question-list=\"item.scaleQuestionList\"\n :show-action=\"!isPreview\"\n :exam-rich-text-content=\"item.examRichTextContent\"\n :examAnswerRelationType=\"item.examAnswerRelationType\"\n @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\"\n @save=\"(item: any) => saveSubject(index, item)\"\n @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\"\n />\n <SubjectBlankFill\n v-bind=\"attrs\"\n v-else-if=\"item.answerType === 'blank_fill'\"\n :order-index=\"currentIndex()(item.customId)\"\n :title=\"item.title\"\n :is-save=\"!item.isRealCanDel\"\n :is-set=\"item.hasSet || false\"\n :answer-list=\"item.answers\"\n :analysis=\"item.analysis\"\n :show-action=\"!isPreview\"\n :is-edit=\"item.isEdit || false\"\n :exam-answer-setting-v-o=\"item.examAnswerSettingVO || {}\"\n :exam-rich-text-content=\"item.examRichTextContent\"\n :examAnswerRelationType=\"item.examAnswerRelationType\"\n @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\"\n @save=\"(item: any) => saveSubject(index, item)\"\n @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\"\n />\n <SubjectTextFill\n v-bind=\"attrs\"\n v-else-if=\"item.answerType === 'text_fill'\"\n :order-index=\"currentIndex()(item.customId)\"\n :title=\"item.title\"\n :is-save=\"!item.isRealCanDel\"\n :is-set=\"item.hasSet || false\"\n :answer-list=\"item.answers\"\n :analysis=\"item.analysis\"\n :show-action=\"!isPreview\"\n :is-edit=\"item.isEdit || false\"\n :exam-expand=\"item.examExpand\"\n :exam-answer-setting-v-o=\"item.examAnswerSettingVO || {}\"\n :examAnswerRelationType=\"item.examAnswerRelationType\"\n :exam-rich-text-content=\"item.examRichTextContent\"\n @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\"\n @save=\"(item: any) => saveSubject(index, item)\"\n @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\"\n />\n <SubjectRichText\n v-bind=\"attrs\"\n :order-index=\"currentIndex()(item.customId)\"\n v-else-if=\"item.answerType === 'rich_text'\"\n :richTextContent=\"item.richTextContent\"\n :is-set=\"item.hasSet || false\"\n :is-save=\"!item.isRealCanDel\"\n :is-edit=\"item.isEdit || false\"\n :show-action=\"!isPreview\"\n @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\"\n :examAnswerRelationType=\"item.examAnswerRelationType\"\n @save=\"(item: any) => saveSubject(index, item)\"\n @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\"\n />\n <SubjectPageEnd\n v-else-if=\"item.answerType === 'page_end'\"\n :total-page=\"totalPageIndex()\"\n :key=\"index\"\n :current-page-index=\"currentPageIndex(item.customId)\"\n :item=\"item\"\n :is-edit=\"item.isEdit || false\"\n :is-set=\"item.hasSet || false\"\n :is-save=\"!item.isRealCanDel\"\n :examAnswerRelationType=\"item.examAnswerRelationType\"\n @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\"\n @save=\"(item: any) => saveSubject(index, item)\"\n @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\"\n />\n </div>\n </div>\n </div>\n</template>"],"names":["props","__props","currentList","ref","emits","__emit","attrs","useAttrs","__expose","addSubject","uploadExcel","list","value","concat","addExam","items","console","log","currentIndex","newList","forEach","v","newItem","customId","setGuid","answerType","richTextContent","examTypeEnum","answers","map","c","title","answer","answerId","examAnswerId","isCorrect","isSave","isEdit","isRealCanDel","hasSet","pageIndex","push","analysis","scaleQuestionList","examAnswerRelationType","setAnswerRelation","answerRelations","customAnswerId","targetItem","find","targetAnswer","currentPageIndex","computed","currentPageList","filter","currentId","findIndex","currentExamId","current","output","type","index","newSubject","splice","move","item","length","saveSubject","deleteSubject","ElMessage","success","setRelation","examAnswers","watch","subjectList","immediate","ns","useNamespace"],"mappings":"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"}
|
1
|
+
{"version":3,"file":"subject-list.vue.cjs","sources":["../../../../../../packages/components/src/subject-list/src/subject-list.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport SubjectBlankFill from './components/subject-blank-fill.vue'\nimport SubjectScale from './components/subject-scale.vue'\nimport SubjectSingle from './components/subject-single.vue'\nimport SubjectTextFill from './components/subject-text-fill.vue'\nimport SubjectRichText from './components/SubjectRichText.vue'\nimport SubjectPageEnd from './components/SubjectPageEnd.vue'\nimport { useNamespace } from '@qxs-bns/hooks'\nimport { setGuid } from '@qxs-bns/utils'\n\ndefineOptions({\n name: 'QxsSubjectList',\n})\n\nconst props = defineProps<{\n subjectList: any[]\n isPreview: boolean\n}>()\nconst currentList = ref([] as any)\nconst emits = defineEmits(['setRelation'])\n\nconst attrs = useAttrs()\n\ndefineExpose({\n addSubject,\n currentList,\n uploadExcel,\n addExam,\n setAnswerRelation,\n})\n\nfunction totalPageIndex() {\n return currentList.value.filter((v: any) => v.answerType === 'page_end').length\n}\n\nconst currentPageIndex = computed(() => {\n const currentPageList = currentList.value.filter((v: any) => v.answerType === 'page_end')\n return (currentId: string) => {\n const currentIndex = currentPageList.findIndex((c: any) => c.customId === currentId)\n return currentIndex !== -1 ? currentIndex + 1 : 0\n }\n})\n\nfunction currentIndex() {\n return (currentExamId: string) => {\n let current = 0\n let output = 0\n\n // 遍历 currentList,过滤掉分页器,并计算题目序号\n currentList.value.forEach((v: any) => {\n if (v.answerType !== 'page_end') { // 排除分页器\n current++\n if (currentExamId === v.customId) { // 匹配当前题目 ID\n output = current\n }\n }\n })\n\n return output-1\n }\n}\n\nfunction addSubject(type: string, index: number | null = null, examAnswerRelationType: number | null = null) {\n const newSubject = {\n customId: setGuid(),\n answerType: type,\n analysis: '',\n scaleQuestionList: [],\n isSave: false,\n isEdit: true,\n isRealCanDel: true,\n hasSet: false,\n examAnswerRelationType,\n }\n\n if (index !== null) {\n currentList.value.splice(index + 1, 0, newSubject)\n } else {\n currentList.value.push(newSubject)\n }\n}\nfunction addExam(items: any[]) {\n console.log(items, 'items')\n\n let currentIndex = 1\n const newList: any[] = []\n\n items.forEach((v: any) => {\n // 创建新的题目对象\n const newItem = {\n ...v,\n customId: setGuid(),\n answerType: v.richTextContent ? 'rich_text' : v.examTypeEnum,\n answers: v.answers?.map((c: any) => ({\n ...c,\n title: c.answer,\n answerId: c.examAnswerId,\n isCorrect: c.isCorrect,\n })) || [],\n isSave: false,\n isEdit: true,\n isRealCanDel: true,\n hasSet: false,\n }\n\n // 如果当前题目的 pageIndex 和 currentIndex 不一致,则插入分页器\n if (newItem.pageIndex > currentIndex) {\n newList.push({\n customId: setGuid(),\n answerType: 'page_end',\n analysis: '',\n scaleQuestionList: [],\n isSave: false,\n isEdit: true,\n isRealCanDel: true,\n hasSet: false,\n examAnswerRelationType: 0,\n })\n currentIndex = newItem.pageIndex\n }\n\n // 将题目添加到 newList\n newList.push(newItem)\n })\n\n // 更新 currentList\n currentList.value = currentList.value.concat(newList)\n}\nfunction uploadExcel(list: any[]) {\n currentList.value = currentList.value.concat(list)\n}\n\nfunction move(index: number, type: 'up' | 'down') {\n if (type === 'up' && index > 0) {\n const [item] = currentList.value.splice(index, 1)\n currentList.value.splice(index - 1, 0, item)\n } else if (type === 'down' && index < currentList.value.length - 1) {\n const [item] = currentList.value.splice(index, 1)\n currentList.value.splice(index + 1, 0, item)\n }\n}\n\nfunction saveSubject(index: number, item: any) {\n currentList.value[index] = {\n ...currentList.value[index],\n ...item,\n isEdit: false,\n examAnswerRelationType: item.examAnswerRelationType,\n }\n}\n\nfunction deleteSubject(index: number) {\n currentList.value.splice(index, 1)\n ElMessage.success('删除成功')\n}\n\nfunction setRelation(customId: number, examAnswers: any) {\n emits('setRelation', customId, examAnswers)\n}\n\nfunction setAnswerRelation(answerRelations: any, customId: string, customAnswerId: string) {\n const targetItem = currentList.value.find((v: any) => v.customId === customId)\n if (targetItem) {\n const targetAnswer = targetItem.answers?.find((c: any) => c.customAnswerId === customAnswerId)\n if (targetAnswer) {\n targetAnswer.answerRelations = answerRelations\n }\n }\n}\n\nwatch(() => props.subjectList, (newList: any) => {\n if (newList) {\n currentList.value = [...newList]\n }\n}, { immediate: true })\n\nconst ns = useNamespace('subject-list')\n</script>\n\n<template>\n <div :class=\"ns.e('list-exam')\">\n <div class=\"subject-list-wrapper\">\n <div v-for=\"(item, index) in currentList\" :key=\"item.customId\" class=\"subject-item\">\n <template v-if=\"['single', 'multiple', 'sort'].includes(item.answerType)\">\n <SubjectSingle\n v-bind=\"attrs\"\n :order-index=\"currentIndex()(item.customId)\"\n :title=\"item.title\"\n :type=\"item.answerType\"\n :exam-id=\"item.examId\"\n :isKey=\"item.isKey\"\n :is-save=\"!item.isRealCanDel\"\n :customId=\"item.customId\"\n :is-set=\"item.hasSet || false\"\n :answer-list=\"item.answers\"\n :analysis=\"item.analysis\"\n :least-answer-count=\"item.leastAnswerCount\"\n :is-edit=\"item.isEdit || false\"\n :show-action=\"!isPreview\"\n :exam-expand=\"item.examExpand\"\n :answerCheckType=\"item.answerCheckType\"\n :exam-rich-text-content=\"item.examRichTextContent\"\n :examAnswerRelationType=\"item.examAnswerRelationType\"\n @setRelation=\"setRelation\"\n @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\"\n @save=\"(item: any) => saveSubject(index, item)\"\n @edit=\"item.isEdit = true\"\n @add=\"(type: string, examAnswerRelationType: number) => addSubject(type, index, examAnswerRelationType)\"\n />\n </template>\n <SubjectScale\n v-bind=\"attrs\"\n v-else-if=\"item.answerType === 'scale'\"\n :order-index=\"currentIndex()(item.customId)\"\n :title=\"item.title\"\n :is-save=\"!item.isRealCanDel\"\n :is-set=\"item.hasSet || false\"\n :answer-list=\"item.answers\"\n :analysis=\"item.analysis\"\n :is-edit=\"item.isEdit || false\"\n :scale-question-list=\"item.scaleQuestionList\"\n :show-action=\"!isPreview\"\n :exam-rich-text-content=\"item.examRichTextContent\"\n :examAnswerRelationType=\"item.examAnswerRelationType\"\n @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\"\n @save=\"(item: any) => saveSubject(index, item)\"\n @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\"\n />\n <SubjectBlankFill\n v-bind=\"attrs\"\n v-else-if=\"item.answerType === 'blank_fill'\"\n :order-index=\"currentIndex()(item.customId)\"\n :title=\"item.title\"\n :is-save=\"!item.isRealCanDel\"\n :is-set=\"item.hasSet || false\"\n :answer-list=\"item.answers\"\n :analysis=\"item.analysis\"\n :show-action=\"!isPreview\"\n :is-edit=\"item.isEdit || false\"\n :exam-answer-setting-v-o=\"item.examAnswerSettingVO || {}\"\n :exam-rich-text-content=\"item.examRichTextContent\"\n :examAnswerRelationType=\"item.examAnswerRelationType\"\n @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\"\n @save=\"(item: any) => saveSubject(index, item)\"\n @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\"\n />\n <SubjectTextFill\n v-bind=\"attrs\"\n v-else-if=\"item.answerType === 'text_fill'\"\n :order-index=\"currentIndex()(item.customId)\"\n :title=\"item.title\"\n :is-save=\"!item.isRealCanDel\"\n :is-set=\"item.hasSet || false\"\n :answer-list=\"item.answers\"\n :analysis=\"item.analysis\"\n :show-action=\"!isPreview\"\n :is-edit=\"item.isEdit || false\"\n :exam-expand=\"item.examExpand\"\n :exam-answer-setting-v-o=\"item.examAnswerSettingVO || {}\"\n :examAnswerRelationType=\"item.examAnswerRelationType\"\n :exam-rich-text-content=\"item.examRichTextContent\"\n @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\"\n @save=\"(item: any) => saveSubject(index, item)\"\n @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\"\n />\n <SubjectRichText\n v-bind=\"attrs\"\n :order-index=\"currentIndex()(item.customId)\"\n v-else-if=\"item.answerType === 'rich_text'\"\n :richTextContent=\"item.richTextContent\"\n :is-set=\"item.hasSet || false\"\n :is-save=\"!item.isRealCanDel\"\n :is-edit=\"item.isEdit || false\"\n :show-action=\"!isPreview\"\n @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\"\n :examAnswerRelationType=\"item.examAnswerRelationType\"\n @save=\"(item: any) => saveSubject(index, item)\"\n @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\"\n />\n <SubjectPageEnd\n v-else-if=\"item.answerType === 'page_end'\"\n :total-page=\"totalPageIndex()\"\n :key=\"index\"\n :current-page-index=\"currentPageIndex(item.customId)\"\n :item=\"item\"\n :is-edit=\"item.isEdit || false\"\n :is-set=\"item.hasSet || false\"\n :is-save=\"!item.isRealCanDel\"\n :examAnswerRelationType=\"item.examAnswerRelationType\"\n @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\"\n @save=\"(item: any) => saveSubject(index, item)\"\n @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\"\n />\n </div>\n </div>\n </div>\n</template>"],"names":["props","__props","currentList","ref","emits","__emit","attrs","useAttrs","__expose","addSubject","uploadExcel","list","value","concat","addExam","items","console","log","currentIndex","newList","forEach","v","newItem","customId","setGuid","answerType","richTextContent","examTypeEnum","answers","map","c","title","answer","answerId","examAnswerId","isCorrect","isSave","isEdit","isRealCanDel","hasSet","pageIndex","push","analysis","scaleQuestionList","examAnswerRelationType","setAnswerRelation","answerRelations","customAnswerId","targetItem","find","targetAnswer","currentPageIndex","computed","currentPageList","filter","currentId","findIndex","currentExamId","current","output","type","index","newSubject","splice","move","item","length","saveSubject","deleteSubject","ElMessage","success","setRelation","examAnswers","watch","subjectList","immediate","ns","useNamespace"],"mappings":"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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../../packages/components/src/tiny-mce-editor/index.ts"],"sourcesContent":["import { withInstall } from '../withInstall'\nimport component from './src/tiny-mce-editor.vue'\n\nconst QxsTinyMceEditor = withInstall(component)\n
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../packages/components/src/tiny-mce-editor/index.ts"],"sourcesContent":["import { withInstall } from '../withInstall'\nimport component from './src/tiny-mce-editor.vue'\n\nconst QxsTinyMceEditor = withInstall(component)\n\nexport {\n QxsTinyMceEditor,\n}\n\nexport default QxsTinyMceEditor\n"],"names":["QxsTinyMceEditor","withInstall","component","default"],"mappings":"mJAGA,MAAMA,EAAmBC,cAAYC,EAASC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),n=require("@qxs-bns/hooks"),i=require("lodash-es"),t=require("tinymce/tinymce");require("tinymce/themes/silver/theme"),require("tinymce/icons/default/icons"),require("tinymce/models/dom"),require("tinymce/plugins/autolink"),require("tinymce/plugins/autoresize"),require("tinymce/plugins/fullscreen"),require("tinymce/plugins/image"),require("tinymce/plugins/insertdatetime"),require("tinymce/plugins/link"),require("tinymce/plugins/lists"),require("tinymce/plugins/media"),require("tinymce/plugins/preview"),require("tinymce/plugins/table"),require("tinymce/plugins/wordcount"),require("tinymce/plugins/code"),require("tinymce/plugins/searchreplace"),require("tinymce/plugins/nonbreaking");const r=["id","name"];var l=e.defineComponent({name:"QxsTinyMceEditor",__name:"tiny-mce-editor",props:{modelValue:{type:String,required:!0,default:""},config:{type:Object,required:!1,default:()=>({})},assetsBasePath:{type:String,required:!1,default:""}},emits:["update:modelValue"],setup(l,{emit:a}){const u=a,s=n.useNamespace("tiny-mce-editor"),o=l.assetsBasePath||"node_modules/",m=e.shallowRef(null),c=e.ref(`tiny-mce-textarea-${Date.now()}-${Math.random().toString(36).substr(2,9)}`),d=e.computed({get:()=>l.modelValue,set(e){u("update:modelValue",e)}}),g={selector:`textarea#${c.value}`,promotion:!1,license_key:"gpl",elementpath:!1,language:"zh-Hans",language_url:`${o}tinymce/langs/zh-Hans.js`,skin_url:`${o}tinymce/skins/ui/oxide`,content_css:`${o}tinymce/skins/content/default/content.min.css`,min_height:300,max_height:700,plugins:"autolink autoresize fullscreen image insertdatetime link lists media preview table wordcount code searchreplace nonbreaking",toolbar:"undo redo | bold italic underline strikethrough | blocks | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor removeformat | link image media table insertdatetime searchreplace | preview code",branding:!1,autoresize:!0,menubar:!1,nonbreaking_force_tab:!0,toolbar_mode:"sliding",insertdatetime_formats:["%Y年%m月%d日","%H点%M分%S秒","%Y-%m-%d","%H:%M:%S"],setup:e=>{m.value=e,e.on("input change undo redo",(()=>{d.value=e.getContent()})),e.on("init",(()=>{e.setContent(d.value)})),l.config?.expandSetup?.(e)}},p=e.computed((()=>{const e=g;return l.config.images_upload_handler||("string"==typeof e.plugins?e.plugins=e.plugins.replace("image",""):Array.isArray(e.plugins)&&(e.plugins=e.plugins.filter((e=>"image"!==e)))),i.merge(e,l.config)}));return e.watch((()=>l.modelValue),(e=>{m.value&&e!==m.value.getContent()&&m.value.setContent(e)}),{immediate:!0}),e.onMounted((async()=>{"undefined"!=typeof window&&t.init(p.value)})),e.onBeforeUnmount((()=>{m.value&&(m.value.destroy(),m.value=null)})),(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(s).e("tiny-mce"))},[e.createCommentVNode(" 使用动态生成的 id "),e.withDirectives(e.createElementVNode("textarea",{id:e.unref(c),"onUpdate:modelValue":i[0]||(i[0]=n=>e.isRef(d)?d.value=n:null),name:e.unref(c)},null,8,r),[[e.vModelText,e.unref(d)]])],2))}});exports.default=l;
|
2
2
|
//# sourceMappingURL=tiny-mce-editor.vue.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tiny-mce-editor.vue.cjs","sources":["../../../../../../packages/components/src/tiny-mce-editor/src/tiny-mce-editor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor, RawEditorOptions } from
|
1
|
+
{"version":3,"file":"tiny-mce-editor.vue.cjs","sources":["../../../../../../packages/components/src/tiny-mce-editor/src/tiny-mce-editor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor, RawEditorOptions } from 'tinymce/tinymce'\nimport { useNamespace } from '@qxs-bns/hooks'\nimport { merge } from 'lodash-es'\nimport tinymce from 'tinymce/tinymce'\n\n// 导入核心功能\nimport 'tinymce/themes/silver/theme'\nimport 'tinymce/icons/default/icons'\nimport 'tinymce/models/dom'\n\nimport 'tinymce/plugins/autolink'\nimport 'tinymce/plugins/autoresize'\nimport 'tinymce/plugins/fullscreen'\nimport 'tinymce/plugins/image'\nimport 'tinymce/plugins/insertdatetime'\nimport 'tinymce/plugins/link'\nimport 'tinymce/plugins/lists'\nimport 'tinymce/plugins/media'\nimport 'tinymce/plugins/preview'\nimport 'tinymce/plugins/table'\nimport 'tinymce/plugins/wordcount'\nimport 'tinymce/plugins/code'\nimport 'tinymce/plugins/searchreplace'\nimport 'tinymce/plugins/nonbreaking'\n// 导入语言包\n\ndefineOptions({\n name: 'QxsTinyMceEditor',\n})\n\nconst {\n modelValue = '',\n config = {},\n assetsBasePath = '',\n} = defineProps<{\n modelValue: string\n config?: RawEditorOptions & {\n expandSetup?: RawEditorOptions['setup']\n }\n assetsBasePath?: string\n}>()\n\nconst emit = defineEmits(['update:modelValue'])\n\nconst ns = useNamespace('tiny-mce-editor')\n\nconst colorScheme = 'light'\nconst basePath = assetsBasePath || 'node_modules/'\n// 存储编辑器实例的引用\nconst editorInstance = shallowRef<Editor | null>(null)\n// 生成唯一的 id\nconst uniqueId = ref(\n `tiny-mce-textarea-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,\n)\n\nconst content = computed({\n get() {\n return modelValue\n },\n set(val) {\n emit('update:modelValue', val)\n },\n})\n\nconst defaultSetting: RawEditorOptions = {\n // 使用动态生成的 id\n selector: `textarea#${uniqueId.value}`,\n promotion: false, // 禁用推广信息\n license_key: 'gpl',\n elementpath: false,\n language: 'zh-Hans',\n language_url: `${basePath}tinymce/langs/zh-Hans.js`,\n skin_url: `${basePath}${\n colorScheme === 'light' ? 'tinymce/skins/ui/oxide' : 'tinymce/skins/ui/oxide-dark'\n }`,\n content_css: `${basePath}${\n colorScheme === 'light'\n ? 'tinymce/skins/content/default/content.min.css'\n : 'tinymce/skins/content/dark/content.min.css'\n }`,\n min_height: 300,\n max_height: 700,\n plugins:\n 'autolink autoresize fullscreen image insertdatetime link lists media preview table wordcount code searchreplace nonbreaking',\n toolbar:\n 'undo redo | bold italic underline strikethrough | blocks | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor removeformat | link image media table insertdatetime searchreplace | preview code',\n branding: false,\n autoresize: true,\n menubar: false,\n nonbreaking_force_tab: true,\n toolbar_mode: 'sliding',\n insertdatetime_formats: [\n '%Y年%m月%d日',\n '%H点%M分%S秒',\n '%Y-%m-%d',\n '%H:%M:%S',\n ],\n // https://www.tiny.cloud/docs/tinymce/6/file-image-upload/#images_upload_handler\n // images_upload_handler: async (blobInfo: any, progress: any) => {\n // // blobInfo, succFun, failFun, progress\n // const files = blobInfo.blob()\n // const formData = new FormData()\n // formData.append('image', files)\n\n // const { res, error } = await useApi({\n // // ...commonUrls.uploadImage,\n // params: {\n // bucketType: classify,\n // },\n // data: formData,\n // onUploadProgress: (e: any) => {\n // progress((e.loaded / e.total) * 100)\n // },\n // })\n // if (res) {\n // const { normal } = res\n // console.log('normal: ', res)\n // return normal\n // }\n // if (error) {\n // console.log(error.message)\n // return Promise.reject(error.message)\n // }\n // },\n setup: (editor: Editor) => {\n // 保存编辑器实例\n editorInstance.value = editor\n\n // 监听编辑器内容变化\n editor.on('input change undo redo', () => {\n content.value = editor.getContent()\n })\n\n // 编辑器初始化完成后设置内容\n editor.on('init', () => {\n editor.setContent(content.value)\n })\n\n config?.expandSetup?.(editor)\n },\n}\n\nconst initSetting = computed(() => {\n const dealDefaultSetting = defaultSetting\n if (!config.images_upload_handler) {\n // 删除 image 图片 plugin\n if (typeof dealDefaultSetting.plugins === 'string') {\n dealDefaultSetting.plugins = dealDefaultSetting.plugins.replace(\n 'image',\n '',\n )\n }\n else if (Array.isArray(dealDefaultSetting.plugins)) {\n dealDefaultSetting.plugins = dealDefaultSetting.plugins.filter(\n plugin => plugin !== 'image',\n )\n }\n }\n return merge(dealDefaultSetting, config)\n})\n\n// 监听 modelValue 的变化\nwatch(() => modelValue, (newVal) => {\n // 确保编辑器已初始化且内容确实发生变化\n if (editorInstance.value && newVal !== editorInstance.value.getContent()) {\n editorInstance.value.setContent(newVal)\n }\n}, { immediate: true })\n\nonMounted(async () => {\n if (typeof window !== 'undefined') {\n tinymce.init(initSetting.value)\n }\n})\n\n// 组件卸载时清理\nonBeforeUnmount(() => {\n if (editorInstance.value) {\n editorInstance.value.destroy()\n editorInstance.value = null\n }\n})\n</script>\n\n<template>\n <div :class=\"ns.e('tiny-mce')\">\n <!-- 使用动态生成的 id -->\n <textarea\n :id=\"uniqueId\"\n v-model=\"content\"\n :name=\"uniqueId\"\n />\n </div>\n</template>\n"],"names":["emit","__emit","ns","useNamespace","basePath","__props","assetsBasePath","editorInstance","shallowRef","uniqueId","ref","Date","now","Math","random","toString","substr","content","computed","get","modelValue","set","val","defaultSetting","selector","value","promotion","license_key","elementpath","language","language_url","skin_url","content_css","min_height","max_height","plugins","toolbar","branding","autoresize","menubar","nonbreaking_force_tab","toolbar_mode","insertdatetime_formats","setup","editor","on","getContent","setContent","config","expandSetup","initSetting","dealDefaultSetting","images_upload_handler","replace","Array","isArray","filter","plugin","merge","watch","newVal","immediate","onMounted","async","window","tinymce","init","onBeforeUnmount","destroy"],"mappings":"ujCA2CA,MAAMA,EAAOC,EAEPC,EAAKC,eAAa,mBAGlBC,EAAWC,EAAAC,gBAAkB,gBAE7BC,EAAiBC,aAA0B,MAE3CC,EAAWC,EAAAA,IACf,qBAAqBC,KAAKC,SAASC,KAAKC,SAASC,SAAS,IAAIC,OAAO,EAAG,MAGpEC,EAAUC,EAAAA,SAAS,CACvBC,IAAM,IACGd,EAAAe,WAET,GAAAC,CAAIC,GACFtB,EAAK,oBAAqBsB,EAAG,IAI3BC,EAAmC,CAEvCC,SAAU,YAAYf,EAASgB,QAC/BC,WAAW,EACXC,YAAa,MACbC,aAAa,EACbC,SAAU,UACVC,aAAc,GAAG1B,4BACjB2B,SAAU,GAAG3B,0BAGb4B,YAAa,GAAG5B,iDAKhB6B,WAAY,IACZC,WAAY,IACZC,QACE,8HACFC,QACE,oPACFC,UAAU,EACVC,YAAY,EACZC,SAAS,EACTC,uBAAuB,EACvBC,aAAc,UACdC,uBAAwB,CACtB,YACA,YACA,WACA,YA6BFC,MAAQC,IAENrC,EAAekB,MAAQmB,EAGhBA,EAAAC,GAAG,0BAA0B,KAC1B5B,EAAAQ,MAAQmB,EAAOE,YAAW,IAI7BF,EAAAC,GAAG,QAAQ,KACTD,EAAAG,WAAW9B,EAAQQ,MAAK,IAG3BpB,EAAA2C,QAAEC,cAAcL,EAAM,GAI1BM,EAAchC,EAAAA,UAAS,KAC3B,MAAMiC,EAAqB5B,EAepB,OAdFlB,EAAM2C,OAACI,wBAEgC,iBAA/BD,EAAmBhB,QACTgB,EAAAhB,QAAUgB,EAAmBhB,QAAQkB,QACtD,QACA,IAGKC,MAAMC,QAAQJ,EAAmBhB,WACrBgB,EAAAhB,QAAUgB,EAAmBhB,QAAQqB,WACjC,UAAXC,MAITC,QAAMP,EAAoB9C,EAAM2C,OAAA,WAIzCW,EAAAA,OAAM,IAAMtD,EAAAe,aAAawC,IAEnBrD,EAAekB,OAASmC,IAAWrD,EAAekB,MAAMqB,cAC3CvC,EAAAkB,MAAMsB,WAAWa,EAAM,GAEvC,CAAEC,WAAW,IAEhBC,EAAAA,WAAUC,UACc,oBAAXC,QACDC,EAAAC,KAAKhB,EAAYzB,MAAK,IAKlC0C,EAAAA,iBAAgB,KACV5D,EAAekB,QACjBlB,EAAekB,MAAM2C,UACrB7D,EAAekB,MAAQ,KAAA"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@qxs-bns/components",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.48",
|
5
5
|
"description": "Vue 3 Component Library",
|
6
6
|
"license": "MIT",
|
7
7
|
"homepage": "https://trry-hub.github.io/qxs-bns/",
|
@@ -29,8 +29,7 @@
|
|
29
29
|
],
|
30
30
|
"peerDependencies": {
|
31
31
|
"@element-plus/icons-vue": "^2.3.1",
|
32
|
-
"element-plus": "^2.9.4"
|
33
|
-
"vue": "^3.5.12"
|
32
|
+
"element-plus": "^2.9.4"
|
34
33
|
},
|
35
34
|
"peerDependenciesMeta": {
|
36
35
|
"@element-plus/icons-vue": {
|
@@ -44,11 +43,10 @@
|
|
44
43
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
45
44
|
"@qxs-bns/directives": "0.0.17",
|
46
45
|
"@qxs-bns/hooks": "0.0.2",
|
47
|
-
"@qxs-bns/utils": "0.0.
|
46
|
+
"@qxs-bns/utils": "0.0.20",
|
48
47
|
"@vueuse/core": "^11.3.0",
|
49
48
|
"echarts": "^5.5.1",
|
50
49
|
"lodash-es": "^4.17.21",
|
51
|
-
"rollup-plugin-scss": "^4.0.1",
|
52
50
|
"tinymce": "^7.6.1"
|
53
51
|
},
|
54
52
|
"types": "./types/index.d.ts",
|
@@ -75,10 +73,9 @@
|
|
75
73
|
"types": "./types/*.d.ts"
|
76
74
|
},
|
77
75
|
"./*": {
|
78
|
-
"import": "./es
|
76
|
+
"import": "./es/*",
|
79
77
|
"types": "./types/*.d.ts"
|
80
78
|
},
|
81
|
-
"./theme-chalk/*": "./theme-chalk
|
82
|
-
"./theme-chalk": "./theme-chalk/index.css"
|
79
|
+
"./theme-chalk/*": "./theme-chalk/*"
|
83
80
|
}
|
84
81
|
}
|
package/theme-chalk/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root [data-fixed-calc-width]{left:0;position:fixed;right:0}:root [data-mode=mobile] [data-fixed-calc-width]{width:100%!important}.qxs-data-chart__data-chart-table{box-sizing:border-box;display:flex;flex-direction:column}.qxs-data-chart__data-chart-table .title{align-items:center;color:#464646;display:flex;font-family:sans-serif;font-size:14px;font-weight:bolder;justify-content:space-between;margin-bottom:7px;margin-top:2px;padding:0 5px}.qxs-data-chart__data-chart-table :deep(.qxs-table){background-color:transparent;border-top-left-radius:4px;border-top-right-radius:4px;display:flex;flex:1;flex-direction:column;overflow:hidden;position:relative}.qxs-data-chart__data-chart-table :deep(.qxs-table) .qxs-table__body-wrapper .qxs-table__cell{border-right:0}.qxs-data-chart__empty{align-items:center;display:flex;height:100%;justify-content:center}.qxs-data-chart__empty-content{align-items:center;display:flex;flex-direction:column;pointer-events:none}.qxs-data-chart__empty-description{color:var(--qxs-text-color-secondary,#909399);font-size:14px;line-height:1.4;margin-top:8px}.qxs-data-chart__wrapper{height:100%}.qxs-fixed-action-bar__actionbar{background-color:var(--qxs-bg-color,#fff);bottom:0;box-shadow:0 0 1px 0 var(--qxs-border-color,#f3f3f2);padding:var(--qxs-fixed-action-bar-actionbar-padding);padding-bottom:calc(env(safe-area-inset-bottom) + var(--qxs-fixed-action-bar-actionbar-padding-bottom));text-align:center;transition:box-shadow .3s,var(--qxs-transition-box-shadow,#f3f3f2);z-index:10}.qxs-fixed-action-bar__actionbar.is-shadow{box-shadow:0 -10px 10px -10px var(--qxs-border-color,#fff)}.qxs-photo-crop-tool__img-box{align-items:center;background-color:#fafafa;display:flex;height:100%;justify-content:center;overflow:hidden;position:relative;width:100%}.qxs-photo-crop-tool__error-message{color:red}.qxs-photo-crop-tool__image{-webkit-user-drag:none;max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.qxs-photo-crop-tool__crop-tool-box{aspect-ratio:var(--qxs-photo-crop-tool-aspect-ratio);border:1px dashed #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.4);cursor:move;height:calc(var(--qxs-photo-crop-tool-height)*1px);max-height:100%;max-width:100%;overflow:hidden;position:absolute;width:calc(var(--qxs-photo-crop-tool-width)*1px)}.qxs-photo-crop-tool__crop-tool-box>div{aspect-ratio:1/1;background-color:rgba(2,2,2,.01);border-radius:50%;position:absolute;transition:all .3s;width:30%;z-index:3}.qxs-photo-crop-tool__crop-tool-box>div:active,.qxs-photo-crop-tool__crop-tool-box>div:hover{background-color:rgba(2,2,2,.5)}.qxs-photo-crop-tool__top-left{cursor:nwse-resize;left:0;top:0;transform:translate3d(-50%,-50%,0)}.qxs-photo-crop-tool__top-right{cursor:nesw-resize;right:0;top:0;transform:translate3d(50%,-50%,0)}.qxs-photo-crop-tool__bottom-right{bottom:0;cursor:nwse-resize;right:0;transform:translate3d(50%,50%,0)}.qxs-photo-crop-tool__bottom-left{bottom:0;cursor:nesw-resize;left:0;transform:translate3d(-50%,50%,0)}.qxs-image-upload__container{line-height:normal}.qxs-image-upload__container .image{border-radius:6px;overflow:hidden;position:relative}.qxs-image-upload__container .image .mask{background-color:var(--qxs-overlay-color-lighter);height:100%;opacity:0;position:absolute;top:0;transition:opacity .3s;width:100%}.qxs-image-upload__container .image .mask .actions{align-items:center;display:flex;flex-wrap:wrap;height:100px;justify-content:center;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100px}.qxs-image-upload__container .image .mask .actions span{color:var(--qxs-color-white);cursor:pointer;text-align:center;transition:color .1s,transform .1s;width:50%}.qxs-image-upload__container .image .mask .actions span:hover{transform:scale(1.5)}.qxs-image-upload__container .image .mask .actions span [class=qxs-icon]{font-size:24px}.qxs-image-upload__container .image:hover .mask{opacity:1}.qxs-image-upload__control{display:inline-block;vertical-align:top}.qxs-image-upload__control .is-drag{display:inline-block!important;font-size:0}.qxs-image-upload__control .is-drag [class$=-upload-dragger]{display:inline-block;font-size:0;padding:0}.qxs-image-upload__control .is-drag [class$=-upload-dragger] [class$=-image]{display:block}.qxs-image-upload__control .is-drag [class$=-upload-dragger].is-dragover{border-width:1px}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .image-slot{align-items:center;background-color:#f5f5f5;color:var(--qxs-text-color-placeholder);display:flex;flex-direction:column;font-size:14px;height:100%;justify-content:center;transition:all .3s;width:100%}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .image-slot:hover{background-color:#eee}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .image-slot [class$=-icon]{font-size:28px}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .image-slot p{color:#5a5a5a;line-height:1em;margin-bottom:0;margin-top:10px}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .progress{position:absolute;top:0}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .progress:after{background-color:var(--qxs-overlay-color-lighter);content:"";height:100%;left:0;position:absolute;top:0;width:100%}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .progress [class$=-progress]{left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);z-index:1}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .progress [class$=-progress] [class$=-progress__text]{color:var(--qxs-text-color-placeholder)}.qxs-image-upload__container [class$=-upload__tip-text]{color:#c8c8c8;font-size:14px;line-height:32px}.qxs-file-upload__control .is-drag{display:inline-block!important}.qxs-file-upload__control .is-drag [class$=-upload-dragger]{padding:0}.qxs-file-upload__control .is-drag [class$=-upload-dragger] [class$=-icon--upload]{font-size:40px;margin-bottom:0}.qxs-file-upload__control .is-drag [class$=-upload-dragger] [class$=-upload__text]{font-size:14px;line-height:1.5;padding:0 6px}.qxs-file-upload__control .is-drag.is-dragover{border-width:1px}.qxs-file-upload__control .is-drag .slot{height:90px;width:160px}.qxs-tiny-mce-editor :deep(.tox-tinymce){border-radius:4px;border-width:1px}.qxs-tiny-mce-editor :deep(.tox-tinymce) .tox-editor-header{box-shadow:0 2px 2px -2px rgba(34,47,62,.1),0 4px 4px -4px rgba(34,47,62,.07)}.qxs-tiny-mce-editor :deep(.tox-tinymce) :deep(.tox-sidebar-wrap){max-height:600px;overflow-y:auto}.tox-tinymce-aux{z-index:2500!important}.qxs-subject-list__list-exam .flex,.qxs-subject-list__list-exam .flex-items-center{align-items:center;display:flex}.qxs-subject-list__list-exam .flex-justify-between{display:flex;justify-content:space-between}.qxs-subject-list__list-exam .flex-justify-center{display:flex;justify-content:center}.qxs-subject-list__list-exam .flex-justify-end{display:flex;justify-content:flex-end}.qxs-subject-list__list-exam .margin-left-10{margin-left:10px}.qxs-subject-list__list-exam .label{min-width:50px}.qxs-subject-list__list-exam .flex-1{flex:1}.qxs-subject-list__list-exam .subject-list-wrapper{margin-bottom:20px;width:100%}.qxs-subject-list__list-exam .margin-bottom{margin-bottom:20px}.qxs-subject-list__list-exam .auto-line{background-color:#c8c8c8;flex:1;height:1px;margin:0 15px}.qxs-subject-list__list-exam .title{font-size:14px;font-weight:500}.qxs-subject-list__list-exam .rich-text img{max-width:100%}.qxs-subject-single__single-exam .preview-answer{display:flex;flex-direction:column;margin-bottom:10px}.qxs-subject-single__single-exam .flex{align-items:center;display:flex}.qxs-subject-single__single-exam .margin-bottom{margin-bottom:20px}.qxs-subject-single__single-exam .answer-list .answer-item{margin-top:15px}.qxs-subject-single__single-exam .answer-list .answer-item .input{width:300px}.qxs-subject-single__single-exam .answer-list .answer-item .input [class$=-input]{font-weight:700}.qxs-subject-single__single-exam .answer-list .answer-item .correct{margin:0 10px}.qxs-subject-single__single-exam .answer-list .answer-item .correct:hover{color:#3d61e3;cursor:pointer}.qxs-subject-single__single-exam .answer-list .answer-item .is-correct{color:#67c23a}.qxs-subject-single__single-exam .answer-list .answer-item .icon{color:#a3a3a3;cursor:pointer;font-size:18px;margin-left:10px}.qxs-subject-single__single-exam .answer-list .answer-item .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-single__single-exam .preview .answer-radio{padding-left:10px}.qxs-subject-single__single-exam .preview .answer-radio .radio{margin-top:10px}.qxs-subject-blank-fill__blank-fill-exam .flex{align-items:center;display:flex}.qxs-subject-blank-fill__blank-fill-exam .label{margin-right:10px;min-width:50px}.qxs-subject-blank-fill__blank-fill-exam .margin-bottom{margin-bottom:20px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item{margin-top:15px;width:100%}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item .answer-tags{border:1px solid #eee;border-radius:4px;flex:1;padding:5px 15px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item .answer-tags [class$=-tag]{margin-right:10px}.qxs-subject-blank-fill__blank-fill-exam .preview .content{background-color:#fff;min-height:100px;padding-top:10px}.qxs-subject-text-fill__text-fill-exam .flex{align-items:center;display:flex}.qxs-subject-text-fill__text-fill-exam .label{margin-right:10px;min-width:50px}.qxs-subject-text-fill__text-fill-exam .margin-bottom{margin-bottom:20px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item{margin-top:15px;width:100%}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .answer-tags{border:1px solid #eee;border-radius:4px;flex:1;padding:5px 15px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .operation .icon{color:#a3a3a3;cursor:pointer;font-size:16px;margin-left:10px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .operation .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-text-fill__text-fill-exam .preview .content{margin-top:10px;min-height:100px}.qxs-subject-scale__scale-exam .flex{align-items:center;display:flex}.qxs-subject-scale__scale-exam .label{min-width:50px}.qxs-subject-scale__scale-exam .margin-bottom{margin-bottom:20px}.qxs-subject-scale__scale-exam .answer{margin:20px 0}.qxs-subject-scale__scale-exam .answer .answer-list{margin-left:40px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item{margin-bottom:20px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .order{margin-right:10px;width:16px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .icon{color:#a3a3a3;cursor:pointer;font-size:16px;margin-left:10px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-scale__scale-exam .preview .answer-radio .radio-item .qxs-radio-wrapper{margin-inline-end:0}.qxs-subject-layout__layout-exam{color:#5a5a5a;font-size:12px;padding:10px}.qxs-subject-layout__layout-exam .edit{background-color:#f6f7fb;margin-top:20px;padding:20px 10px 10px;position:relative}.qxs-subject-layout__layout-exam .edit .triangle-up{border-bottom:20px solid #f6f7fb;border-left:20px solid transparent;border-right:20px solid transparent;height:0;left:100px;position:absolute;top:-20px;width:0}.qxs-subject-action__action-exam .action{padding:20px 0}.qxs-subject-action__action-exam .active{background-color:#f6f7fb;padding-left:10px;padding-right:10px}.qxs-subject-action__action-exam .btn-margin{margin-right:10px}.qxs-subject-action__action-exam .has-set{align-items:center;color:#bbb;display:flex;font-size:12px}.qxs-subject-action__action-exam .vertical-radio-group{align-items:flex-start;display:flex;flex-direction:column;margin-left:20px}.qxs-subject-action__action-exam .vertical-radio-group ::v-deep(.qxs-radio){display:block;margin-right:0}.qxs-subject-type__type-list .type-item{margin-bottom:20px}.qxs-subject-type__type-list .base-subject{align-items:center;display:flex;flex-wrap:wrap}.qxs-subject-type__type-list .base-subject .item{background:#fafafa;color:#5a5a5a;cursor:pointer;font-size:14px;height:22px;margin-right:10px;margin-top:10px;text-align:center;width:50px}.qxs-subject-type__type-list .base-subject .item:hover{background:rgba(61,97,227,.12);color:#3d61e3}
|
1
|
+
:root [data-fixed-calc-width]{position:fixed;right:0;left:0%}:root [data-mode=mobile] [data-fixed-calc-width]{width:100% !important}.qxs-data-chart__data-chart-table{box-sizing:border-box;display:flex;flex-direction:column}.qxs-data-chart__data-chart-table .title{display:flex;align-items:center;justify-content:space-between;padding:0 5px;margin-top:2px;margin-bottom:7px;font-family:sans-serif;font-size:14px;font-weight:bolder;color:#464646}.qxs-data-chart__data-chart-table :deep(.qxs-table){position:relative;display:flex;flex:1;flex-direction:column;overflow:hidden;background-color:rgba(0,0,0,0);border-top-left-radius:4px;border-top-right-radius:4px}.qxs-data-chart__data-chart-table :deep(.qxs-table) .qxs-table__body-wrapper .qxs-table__cell{border-right:0}.qxs-data-chart__empty{display:flex;align-items:center;justify-content:center;height:100%}.qxs-data-chart__empty-content{display:flex;flex-direction:column;align-items:center;pointer-events:none}.qxs-data-chart__empty-description{margin-top:8px;font-size:14px;line-height:1.4;color:var(--qxs-text-color-secondary, #909399)}.qxs-data-chart__wrapper{height:100%}.qxs-fixed-action-bar__actionbar{bottom:0;z-index:10;padding:var(--qxs-fixed-action-bar-actionbar-padding);padding-bottom:calc(env(safe-area-inset-bottom) + var(--qxs-fixed-action-bar-actionbar-padding-bottom));text-align:center;background-color:var(--qxs-bg-color, #fff);box-shadow:0 0 1px 0 var(--qxs-border-color, #f3f3f2);transition:box-shadow .3s,var(--qxs-transition-box-shadow, #f3f3f2)}.qxs-fixed-action-bar__actionbar.is-shadow{box-shadow:0 -10px 10px -10px var(--qxs-border-color, #fff)}.qxs-photo-crop-tool__img-box{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;background-color:#fafafa}.qxs-photo-crop-tool__error-message{color:red}.qxs-photo-crop-tool__image{max-width:100%;max-height:100%;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:contain;object-fit:contain;-webkit-user-drag:none}.qxs-photo-crop-tool__crop-tool-box{position:absolute;width:calc(var(--qxs-photo-crop-tool-width)*1px);max-width:100%;height:calc(var(--qxs-photo-crop-tool-height)*1px);max-height:100%;aspect-ratio:var(--qxs-photo-crop-tool-aspect-ratio);overflow:hidden;cursor:move;border:1px dashed #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.4)}.qxs-photo-crop-tool__crop-tool-box>div{position:absolute;z-index:3;width:30%;aspect-ratio:1/1;background-color:rgba(2,2,2,.01);border-radius:50%;transition:all .3s}.qxs-photo-crop-tool__crop-tool-box>div:hover,.qxs-photo-crop-tool__crop-tool-box>div:active{background-color:rgba(2,2,2,.5)}.qxs-photo-crop-tool__top-left{top:0;left:0;cursor:nwse-resize;transform:translate3d(-50%, -50%, 0)}.qxs-photo-crop-tool__top-right{top:0;right:0;cursor:nesw-resize;transform:translate3d(50%, -50%, 0)}.qxs-photo-crop-tool__bottom-right{right:0;bottom:0;cursor:nwse-resize;transform:translate3d(50%, 50%, 0)}.qxs-photo-crop-tool__bottom-left{bottom:0;left:0;cursor:nesw-resize;transform:translate3d(-50%, 50%, 0)}.qxs-image-upload__container{line-height:initial}.qxs-image-upload__control{display:inline-block;vertical-align:top}.qxs-image-upload__control .image{position:relative;overflow:hidden;border-radius:6px}.qxs-image-upload__control .image .mask{position:absolute;top:0;width:100%;height:100%;background-color:var(--qxs-overlay-color-lighter);opacity:0;transition:opacity .3s}.qxs-image-upload__control .image .mask .actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;width:100px;height:100px;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%)}.qxs-image-upload__control .image .mask .actions span{width:50%;color:var(--qxs-color-white);text-align:center;cursor:pointer;transition:color .1s,transform .1s}.qxs-image-upload__control .image .mask .actions span:hover{transform:scale(1.5)}.qxs-image-upload__control .image .mask .actions span [class=qxs-icon]{font-size:24px}.qxs-image-upload__control .image:hover .mask{opacity:1}.qxs-image-upload__control .is-drag{font-size:0;display:inline-block !important}.qxs-image-upload__control .is-drag [class$=-upload-dragger]{display:inline-block;padding:0;font-size:0}.qxs-image-upload__control .is-drag [class$=-upload-dragger] [class$=-image]{display:block}.qxs-image-upload__control .is-drag [class$=-upload-dragger].is-dragover{border-width:1px}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .image-slot{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;font-size:14px;color:var(--qxs-text-color-placeholder);background-color:#f5f5f5;transition:all .3s}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .image-slot:hover{background-color:#eee}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .image-slot [class$=-icon]{font-size:28px}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .image-slot p{margin-top:10px;margin-bottom:0;line-height:1em;color:#5a5a5a}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .progress{position:absolute;top:0}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .progress::after{position:absolute;top:0;left:0;width:100%;height:100%;content:"";background-color:var(--qxs-overlay-color-lighter)}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .progress [class$=-progress]{z-index:1;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%)}.qxs-image-upload__control .is-drag [class$=-upload-dragger] .progress [class$=-progress] [class$=-progress__text]{color:var(--qxs-text-color-placeholder)}.qxs-image-upload__container [class$=-upload__tip-text]{font-size:14px;line-height:32px;color:#c8c8c8}.qxs-file-upload__control .is-drag{display:inline-block !important}.qxs-file-upload__control .is-drag [class$=-upload-dragger]{padding:0}.qxs-file-upload__control .is-drag [class$=-upload-dragger] [class$=-icon--upload]{margin-bottom:0;font-size:40px}.qxs-file-upload__control .is-drag [class$=-upload-dragger] [class$=-upload__text]{padding:0 6px;font-size:14px;line-height:1.5}.qxs-file-upload__control .is-drag.is-dragover{border-width:1px}.qxs-file-upload__control .is-drag .slot{width:160px;height:90px}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce{border-width:1px;border-radius:var(--qxs-border-radius-base, 4px)}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header{box-shadow:0 2px 2px -2px rgba(34,47,62,.1),0 4px 4px -4px rgba(34,47,62,.07)}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce .tox-sidebar-wrap{overflow-y:auto}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce .tox-sidebar-wrap .tox-edit-area::before{border-width:1px;border-radius:0}.qxs-tiny-mce-editor .tox-tinymce-aux{z-index:2500 !important}.qxs-subject-list__list-exam .flex{display:flex;align-items:center}.qxs-subject-list__list-exam .flex-items-center{display:flex;align-items:center}.qxs-subject-list__list-exam .flex-justify-between{display:flex;justify-content:space-between}.qxs-subject-list__list-exam .flex-justify-center{display:flex;justify-content:center}.qxs-subject-list__list-exam .flex-justify-end{display:flex;justify-content:flex-end}.qxs-subject-list__list-exam .margin-left-10{margin-left:10px}.qxs-subject-list__list-exam .label{min-width:50px}.qxs-subject-list__list-exam .flex-1{flex:1}.qxs-subject-list__list-exam .subject-list-wrapper{width:100%;margin-bottom:20px}.qxs-subject-list__list-exam .margin-bottom{margin-bottom:20px}.qxs-subject-list__list-exam .auto-line{flex:1;background-color:#c8c8c8;height:1px;margin:0 15px}.qxs-subject-list__list-exam .title{font-size:14px;font-weight:500}.qxs-subject-list__list-exam .rich-text img{max-width:100%}.qxs-subject-single__single-exam .preview-answer{display:flex;flex-direction:column;margin-bottom:10px}.qxs-subject-single__single-exam .flex{display:flex;align-items:center}.qxs-subject-single__single-exam .margin-bottom{margin-bottom:20px}.qxs-subject-single__single-exam .answer-list .answer-item{margin-top:15px}.qxs-subject-single__single-exam .answer-list .answer-item .input{width:300px}.qxs-subject-single__single-exam .answer-list .answer-item .input [class$=-input]{font-weight:bold}.qxs-subject-single__single-exam .answer-list .answer-item .correct{margin:0 10px}.qxs-subject-single__single-exam .answer-list .answer-item .correct:hover{color:#3d61e3;cursor:pointer}.qxs-subject-single__single-exam .answer-list .answer-item .is-correct{color:#67c23a}.qxs-subject-single__single-exam .answer-list .answer-item .icon{margin-left:10px;font-size:18px;color:#a3a3a3;cursor:pointer}.qxs-subject-single__single-exam .answer-list .answer-item .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-single__single-exam .preview .answer-radio{padding-left:10px}.qxs-subject-single__single-exam .preview .answer-radio .radio{margin-top:10px}.qxs-subject-blank-fill__blank-fill-exam .flex{display:flex;align-items:center}.qxs-subject-blank-fill__blank-fill-exam .label{min-width:50px;margin-right:10px}.qxs-subject-blank-fill__blank-fill-exam .margin-bottom{margin-bottom:20px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item{width:100%;margin-top:15px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item .answer-tags{flex:1;padding:5px 15px;border:1px solid #eee;border-radius:4px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item .answer-tags [class$=-tag]{margin-right:10px}.qxs-subject-blank-fill__blank-fill-exam .preview .content{min-height:100px;padding-top:10px;background-color:#fff}.qxs-subject-text-fill__text-fill-exam .flex{display:flex;align-items:center}.qxs-subject-text-fill__text-fill-exam .label{min-width:50px;margin-right:10px}.qxs-subject-text-fill__text-fill-exam .margin-bottom{margin-bottom:20px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item{width:100%;margin-top:15px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .answer-tags{flex:1;padding:5px 15px;border:1px solid #eee;border-radius:4px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .operation .icon{margin-left:10px;font-size:16px;color:#a3a3a3;cursor:pointer}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .operation .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-text-fill__text-fill-exam .preview .content{min-height:100px;margin-top:10px}.qxs-subject-scale__scale-exam .flex{display:flex;align-items:center}.qxs-subject-scale__scale-exam .label{min-width:50px}.qxs-subject-scale__scale-exam .margin-bottom{margin-bottom:20px}.qxs-subject-scale__scale-exam .answer{margin:20px 0}.qxs-subject-scale__scale-exam .answer .answer-list{margin-left:40px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item{margin-bottom:20px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .order{width:16px;margin-right:10px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .icon{margin-left:10px;font-size:16px;color:#a3a3a3;cursor:pointer}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-scale__scale-exam .preview .answer-radio .radio-item .qxs-radio-wrapper{margin-inline-end:0}.qxs-subject-layout__layout-exam{padding:10px;font-size:12px;color:#5a5a5a}.qxs-subject-layout__layout-exam .edit{position:relative;padding:20px 10px;padding-bottom:10px;margin-top:20px;background-color:#f6f7fb}.qxs-subject-layout__layout-exam .edit .triangle-up{position:absolute;top:-20px;left:100px;width:0;height:0;border-right:20px solid rgba(0,0,0,0);border-bottom:20px solid #f6f7fb;border-left:20px solid rgba(0,0,0,0)}.qxs-subject-action__action-exam .action{padding:20px 0}.qxs-subject-action__action-exam .active{background-color:#f6f7fb;padding-left:10px;padding-right:10px}.qxs-subject-action__action-exam .btn-margin{margin-right:10px}.qxs-subject-action__action-exam .has-set{display:flex;align-items:center;font-size:12px;color:#bbb}.qxs-subject-action__action-exam .vertical-radio-group{display:flex;flex-direction:column;align-items:flex-start;margin-left:20px}.qxs-subject-action__action-exam .vertical-radio-group ::v-deep(.qxs-radio){display:block;margin-right:0}.qxs-subject-type__type-list .type-item{margin-bottom:20px}.qxs-subject-type__type-list .base-subject{display:flex;flex-wrap:wrap;align-items:center}.qxs-subject-type__type-list .base-subject .item{width:50px;height:22px;margin-top:10px;margin-right:10px;font-size:14px;color:#5a5a5a;text-align:center;cursor:pointer;background:#fafafa}.qxs-subject-type__type-list .base-subject .item:hover{color:#3d61e3;background:rgba(61,97,227,.12)}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@use "./src/base";
|
2
|
+
// component styles
|
3
|
+
|
4
|
+
@use "./src/data-chart/index";
|
5
|
+
@use "./src/fixed-action-bar";
|
6
|
+
@use "./src/photo-crop-tool";
|
7
|
+
@use "./src/image-upload";
|
8
|
+
@use "./src/file-upload";
|
9
|
+
@use "./src/tiny-mce-editor";
|
10
|
+
@use "./src/subject-list";
|
11
|
+
@use "./src/subject-layout";
|
12
|
+
@use "./src/subject-action";
|
13
|
+
@use "./src/subject-type";
|
@@ -0,0 +1 @@
|
|
1
|
+
:root [data-fixed-calc-width]{position:fixed;right:0;left:0%}:root [data-mode=mobile] [data-fixed-calc-width]{width:100% !important}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@forward './mixins/var.scss';
|
2
|
+
|
3
|
+
:root {
|
4
|
+
// 右侧内容区针对fixed元素,有横向铺满的需求,可在fixed元素上设置 [data-fixed-calc-width]
|
5
|
+
[data-fixed-calc-width] {
|
6
|
+
position: fixed;
|
7
|
+
right: 0;
|
8
|
+
left: 0%;
|
9
|
+
}
|
10
|
+
|
11
|
+
[data-mode="mobile"] {
|
12
|
+
[data-fixed-calc-width] {
|
13
|
+
width: 100% !important;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
.customize-input-number.qxs-input-number{width:98px}.customize-input-number.qxs-input-number [class$=qxs-input-number__]{top:2px;width:24px;height:21px;overflow:hidden;font-weight:500;line-height:22px;background-color:#fbfbfb}.customize-input-number.qxs-input-number [class$=qxs-input-number__] i{padding-top:1px;font-size:16px;font-weight:600}.customize-input-number.qxs-input-number [class$=qxs-input-number__]:hover{color:#3d61e3}.customize-input-number.qxs-input-number .qxs-input__inner{height:24px;padding-right:28px;padding-left:28px;line-height:24px;border:1px solid #e1e1e1;border-radius:3px}.customize-input-number.qxs-input-number .qxs-input__inner::-moz-placeholder{color:#5a5a5a}.customize-input-number.qxs-input-number .qxs-input__inner::placeholder{color:#5a5a5a}.customize-date-picker:not([class*=cs-in]).qxs-date-editor{background-color:#fbfbfb}.customize-date-picker:not([class*=cs-in]).qxs-date-editor .qxs-icon:nth-child(1){order:1;margin-left:4px}.customize-dialog:not([class*=cs-in]).qxs-dialog{padding:0}.customize-dialog:not([class*=cs-in]).qxs-dialog .qxs-dialog__header{position:relative;height:40px;padding:0 calc(var(--qxs-dialog-padding-primary) - 3px);margin-right:0;font-weight:600;border-bottom:var(--qxs-border)}.customize-dialog:not([class*=cs-in]).qxs-dialog .qxs-dialog__header .qxs-dialog__title{font-size:14px;line-height:40px}.customize-dialog:not([class*=cs-in]).qxs-dialog .qxs-dialog__header .qxs-dialog__headerbtn{top:2px;width:40px;height:40px;font-size:22px}.customize-dialog:not([class*=cs-in]).qxs-dialog .qxs-dialog__body{padding:var(--qxs-dialog-padding-primary)}.customize-dialog:not([class*=cs-in]).qxs-dialog .qxs-dialog__footer{padding:var(--qxs-dialog-padding-primary);padding-top:0;text-align:center}.customize-dialog:not([class*=cs-in]).qxs-dialog .qxs-dialog__footer .qxs-button{min-width:90px}.customize-button.cs-in-info{background-color:#fbfbfb}.customize-button:not([class*=cs-in]).qxs-button{min-width:90px;--qxs-button-size: 28px;--qxs-border-radius-base: 4px}.customize-tree.qxs-tree .qxs-tree-node__content{--qxs-tree-node-content-height: 30px}.customize-tree.qxs-tree .qxs-tree-node__content .qxs-checkbox{--qxs-color-primary: #30c691}.customize-tree.qxs-tree .qxs-tree-node__content .qxs-checkbox .qxs-checkbox__inner{width:14px;height:14px}.customize-tree.qxs-tree .qxs-tree-node__content .qxs-checkbox .qxs-checkbox__inner::after{width:3px;height:7px}.customize-input.cs-in-line.qxs-input .qxs-input__wrapper{border-radius:0;box-shadow:0 1px 0 0 var(--qxs-input-border-color, var(--qxs-border-color))}.customize-input.cs-in-line.qxs-input .qxs-input__wrapper:hover{box-shadow:0 1px 0 0 var(--qxs-input-hover-border-color)}.customize-input.cs-in-line.qxs-input .qxs-input__wrapper.is-focus{box-shadow:0 1px 0 0 var(--qxs-input-focus-border-color)}.customize-input.cs-in-line.qxs-input .qxs-input__wrapper .qxs-input__count .qxs-input__count-inner{background-color:rgba(0,0,0,0)}.customize-input:not([class*=cs-in]).qxs-input{width:160px}.customize-input:not([class*=cs-in]).qxs-input .qxs-input__wrapper{background-color:var(--qxs-fill-color-lighter);border-radius:20px}.customize-input:not([class*=cs-in]).qxs-input .qxs-input__wrapper .qxs-input__count .qxs-input__count-inner{background-color:rgba(0,0,0,0)}.customize-message-box.qxs-message-box{--qxs-messagebox-border-radius: 0px;padding:0}.customize-message-box.qxs-message-box .qxs-message-box__header{padding:0}.customize-message-box.qxs-message-box .qxs-message-box__header .qxs-message-box__title{height:36px;padding-left:12px;font-size:14px;font-weight:600;line-height:36px;border-bottom:1px solid var(--qxs-color-info-light-9)}.customize-message-box.qxs-message-box .qxs-message-box__content{padding:35px 10px 23px}.customize-message-box.qxs-message-box .qxs-message-box__content .qxs-message-box__container{justify-content:center}.customize-message-box.qxs-message-box .qxs-message-box__btns{justify-content:center;padding-bottom:20px}.customize-message-box.qxs-message-box .qxs-message-box__btns .qxs-button{min-width:90px}.customize-tooltip.qxs-popper.is-light{padding:5px 10px;font-size:14px;font-weight:bold;border:none;box-shadow:0 1px 8px 0 rgba(0,0,0,.2)}.customize-tooltip.qxs-popper.is-light .qxs-popper__arrow::before{width:8px;height:8px;border-color:rgba(0,0,0,0) !important}.customize-dropdown.cs-in-noarrow.qxs-dropdown__popper .qxs-popper__arrow{display:none}.customize-table.qxs-table{border:1px solid var(--qxs-color-info-light-9) !important;border-bottom:none !important;border-radius:var(--qxs-border-radius-base)}.customize-table.qxs-table thead th{padding:10px 0;background-color:var(--qxs-color-info-light-9)}.customize-table.qxs-table thead th.qxs-table-fixed-column--left,.customize-table.qxs-table thead th.qxs-table-fixed-column--right{background-color:var(--qxs-color-info-light-9)}.customize-table.qxs-table .qxs-scrollbar__view .qxs-table__empty-block{width:calc(100% - 2px) !important}.customize-table.qxs-table .qxs-scrollbar__view .qxs-table__body tbody{width:calc(100% - 2px)}.customize-table.qxs-table .qxs-scrollbar__view .qxs-table__body tbody .qxs-table__row .qxs-table__cell .cell:empty::before{content:"——"}.customize-table.qxs-table+.customize-pagination{margin-top:20px}.customize-select.cs-in-line.qxs-select .qxs-select__wrapper{border-radius:0;box-shadow:0 1px 0 0 var(--qxs-border-color)}.customize-select.cs-in-line.qxs-select .qxs-select__wrapper.is-hovering:not(.is-focused){box-shadow:0 1px 0 0 var(--qxs-border-color-hover)}.customize-select.cs-in-line.qxs-select .qxs-select__wrapper.is-focused{box-shadow:0 1px 0 0 var(--qxs-color-primary)}.customize-select:not([class*=cs-in]).qxs-select .qxs-select__wrapper{padding:0 10px;padding-right:10px;color:#5a5a5a;background:#fbfbfb}.customize-select:not([class*=cs-in]).qxs-select .qxs-select__wrapper .qxs-select__selection::-moz-placeholder{color:#5a5a5a}.customize-select:not([class*=cs-in]).qxs-select .qxs-select__wrapper .qxs-select__selection::placeholder{color:#5a5a5a}.customize-select:not([class*=cs-in]).qxs-select .qxs-select__wrapper .qxs-input__suffix{right:0}.customize-select:not([class*=cs-in]).qxs-select .qxs-select__wrapper .qxs-input__suffix .qxs-icon-arrow-up::before{position:absolute;top:50%;left:50%;content:"";border-top:5px solid rgba(0,0,0,0);border-right:4px solid rgba(0,0,0,0);border-bottom:5px solid #a3a3a3;border-left:4px solid rgba(0,0,0,0);transform:translate3d(-50%, -75%, 0);transform-origin:-25% center}.customize-pagination.qxs-pagination{color:#5a5a5a}.customize-pagination.qxs-pagination .qxs-pagination__sizes .qxs-select{width:95px !important}.customize-pagination.qxs-pagination .btn-prev,.customize-pagination.qxs-pagination .btn-next{background-color:rgba(0,0,0,0) !important;border:1px solid #e1e1e1;border-radius:var(--qxs-border-radius-base)}.customize-pagination.qxs-pagination .qxs-pager>.number,.customize-pagination.qxs-pagination .qxs-pager .more{color:#5a5a5a;background-color:rgba(0,0,0,0);border:1px solid #e1e1e1;border-radius:var(--qxs-border-radius-base)}.customize-pagination.qxs-pagination .qxs-pager>.number.active,.customize-pagination.qxs-pagination .qxs-pager .more.active{border-color:#3d61e3}.customize-pagination.qxs-pagination .qxs-pager li:not(.disabled):hover{border-color:var(--qxs-color-primary)}.customize-pagination.qxs-pagination .qxs-pager .is-active{border:1px solid var(--qxs-color-primary)}.customize-pagination.qxs-pagination .qxs-pagination__jump .qxs-pagination__goto{margin-right:5px;font-size:0}.customize-pagination.qxs-pagination .qxs-pagination__jump .qxs-pagination__goto::after{font-size:14px;content:"跳转至"}.customize-pagination.qxs-pagination .qxs-pagination__jump .qxs-pagination__classifier{margin-left:5px}.customize-pagination.qxs-pagination .qxs-pagination__jump .qxs-pagination__editor{width:40px}.customize-form[class*=cs-in].cs-in-bold-title .title-input .qxs-input__inner{font-weight:600;color:#0f0f0f}.customize-form[class*=cs-in].cs-in-bold-title .title-input .qxs-textarea__inner{color:#0f0f0f}.customize-form.qxs-form.qxs-form--inline .qxs-form-item{margin-right:10px}.customize-tabs.qxs-tabs .qxs-tabs__header .qxs-tabs__nav-wrap::after{height:1px}.customize-tabs.qxs-tabs .qxs-tabs__item{--qxs-tabs-header-height: 36px;font-size:14px;color:#7784a1}.customize-tabs.qxs-tabs .qxs-tabs__item.is-active{font-weight:bold;color:#272e40}.customize-tabs.qxs-tabs .qxs-tabs__active-bar{height:3px}.customize-page-main{padding-top:0 !important}.customize-page-main .qxs-tabs{position:sticky;top:0;z-index:10}.customize-page-main .qxs-tabs .qxs-tabs__header{position:relative;margin:0}.customize-page-main .qxs-tabs .qxs-tabs__header .qxs-tabs__nav-wrap{overflow:inherit}.customize-page-main .qxs-tabs .qxs-tabs__header .qxs-tabs__nav-wrap .qxs-tabs__nav .qxs-tabs__item{box-sizing:content-box;min-width:48px;height:40px;padding:0 16px;line-height:40px;text-align:center}.customize-page-main .qxs-tabs .qxs-tabs__header .qxs-tabs__nav-wrap .qxs-tabs__nav .qxs-tabs__item:nth-child(2){padding-left:8px}.customize-page-main .qxs-tabs .qxs-tabs__header .qxs-tabs__nav-wrap::after{display:none}.customize-page-main .qxs-tabs .qxs-tabs__header::after{position:absolute;bottom:0;left:-10px;z-index:1;width:calc(100% + 2*10px);height:1px;content:"";background-color:#e4e7ed}.customize-page-main .qxs-tabs .qxs-tabs__content{padding-right:2px;padding-left:5px;margin-top:11px}.customize-search-form.qxs-form--inline{display:flex;flex-wrap:wrap;align-items:flex-start;padding:10px 10px 0;margin:10px 0;background-color:#f5f5f5}.customize-search-form.qxs-form--inline .qxs-form-item{display:inline-flex;flex:0 1 auto;margin-bottom:10px !important}.customize-search-form.qxs-form--inline .qxs-form-item.last-box{margin-right:0;margin-left:auto}.customize-search-form.qxs-form--inline .new-line-placeholder{margin-right:100%}.customize-driver{box-shadow:unset}.customize-driver .driver-popover-arrow::before{position:absolute;content:"";background-color:#fff}.customize-driver .driver-popover-arrow.driver-popover-arrow-side-left::before{left:-3px;width:var(--popover-offset);height:1px;transform:translateY(-50%)}.customize-driver .driver-popover-arrow.driver-popover-arrow-side-right::before{right:-3px;width:var(--popover-offset);height:1px;transform:translateY(-50%)}.customize-driver .driver-popover-arrow.driver-popover-arrow-side-top::before{top:-1px;width:1px;height:var(--popover-offset);transform:translateX(-50%)}.customize-driver .driver-popover-arrow.driver-popover-arrow-side-bottom::before{bottom:-1px;width:1px;height:var(--popover-offset);transform:translateX(-50%)}.customize-driver .driver-popover-footer .driver-popover-navigation-btns button{color:var(--qxs-color-primary);background-color:rgba(0,0,0,0);border:none}
|