@qxs-bns/components 0.0.37 → 0.0.39
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/package.json.mjs +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/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/subject-list.vue.mjs +1 -1
- package/es/src/subject-list/src/subject-list.vue.mjs.map +1 -1
- package/lib/package.json.cjs +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/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/subject-list.vue.cjs +1 -1
- package/lib/src/subject-list/src/subject-list.vue.cjs.map +1 -1
- package/package.json +2 -2
- package/types/src/subject-action/src/subject-action.vue.d.ts.map +1 -1
- package/types/src/subject-list/index.d.ts +1 -1
- package/types/src/subject-list/src/components/subject-scale.vue.d.ts.map +1 -1
- package/types/src/subject-list/src/subject-list.vue.d.ts +1 -1
- package/types/src/subject-list/src/subject-list.vue.d.ts.map +1 -1
- package/types/tsconfig.tsbuildinfo +1 -1
@@ -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}\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})\nfunction addPageEnd() {\n currentList.value.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}\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}\n\nfunction addExam(item: any) {\n const answerList = item.answers?.map((v: any) => ({\n ...v,\n title: v.answer,\n answerId: v.examAnswerId,\n isCorrect: v.isCorrect,\n })) || []\n\n // 创建新的题目对象\n const newItem = {\n ...item,\n customId: setGuid(),\n answerType: item.richTextContent ? 'rich_text' : item.examTypeEnum,\n answers: answerList,\n isSave: false,\n isEdit: true,\n isRealCanDel: true,\n hasSet: false,\n }\n\n // 将新题目添加到 currentList\n currentList.value.push(newItem)\n\n // 获取刚刚添加的题目的 customId\n const newCustomId = newItem.customId\n\n // 判断是否需要添加 page_end \n if ((item.pageIndex - currentPageIndex.value(newCustomId)) === 1) {\n console.log(currentPageIndex.value(newCustomId));\n addPageEnd()\n }\n\n if (currentPageIndex.value(newCustomId) > 1) {\n addPageEnd()\n }\n}\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=\"index\" \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 </template>\n <SubjectScale v-bind=\"attrs\" v-else-if=\"item.answerType === 'scale'\" :order-index=\"index\" :title=\"item.title\"\n :is-save=\"!item.isRealCanDel\" :is-set=\"item.hasSet || false\" :answer-list=\"item.answers\"\n :analysis=\"item.analysis\" :is-edit=\"item.isEdit || false\" :scale-question-list=\"item.scaleQuestionList\"\n :show-action=\"!isPreview\" :exam-rich-text-content=\"item.examRichTextContent\"\n :examAnswerRelationType=\"item.examAnswerRelationType\" @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\" @save=\"(item: any) => saveSubject(index, item)\" @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\" />\n <SubjectBlankFill v-bind=\"attrs\" v-else-if=\"item.answerType === 'blank_fill'\" :order-index=\"index\"\n :title=\"item.title\" :is-save=\"!item.isRealCanDel\" :is-set=\"item.hasSet || false\" :answer-list=\"item.answers\"\n :analysis=\"item.analysis\" :show-action=\"!isPreview\" :is-edit=\"item.isEdit || false\"\n :exam-answer-setting-v-o=\"item.examAnswerSettingVO || {}\" :exam-rich-text-content=\"item.examRichTextContent\"\n :examAnswerRelationType=\"item.examAnswerRelationType\" @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\" @save=\"(item: any) => saveSubject(index, item)\" @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\" />\n <SubjectTextFill v-bind=\"attrs\" v-else-if=\"item.answerType === 'text_fill'\" :order-index=\"index\"\n :title=\"item.title\" :is-save=\"!item.isRealCanDel\" :is-set=\"item.hasSet || false\" :answer-list=\"item.answers\"\n :analysis=\"item.analysis\" :show-action=\"!isPreview\" :is-edit=\"item.isEdit || false\"\n :exam-expand=\"item.examExpand\" :exam-answer-setting-v-o=\"item.examAnswerSettingVO || {}\"\n :examAnswerRelationType=\"item.examAnswerRelationType\" :exam-rich-text-content=\"item.examRichTextContent\"\n @move=\"(type: 'up' | 'down') => move(index, type)\" @delete=\"deleteSubject(index)\"\n @save=\"(item: any) => saveSubject(index, item)\" @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\" />\n <SubjectRichText v-bind=\"attrs\" v-else-if=\"item.answerType === 'rich_text'\" :order-index=\"index\"\n :richTextContent=\"item.richTextContent\" :is-set=\"item.hasSet || false\" :is-save=\"!item.isRealCanDel\"\n :is-edit=\"item.isEdit || false\" :show-action=\"!isPreview\" @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\" :examAnswerRelationType=\"item.examAnswerRelationType\"\n @save=\"(item: any) => saveSubject(index, item)\" @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\" />\n <SubjectPageEnd v-else-if=\"item.answerType === 'page_end'\" :total-page=\"totalPageIndex()\" :key=\"index\"\n :current-page-index=\"currentPageIndex(item.customId)\" :item=\"item\" :order-index=\"index\"\n :is-edit=\"item.isEdit || false\" :is-set=\"item.hasSet || false\" :is-save=\"!item.isRealCanDel\"\n :examAnswerRelationType=\"item.examAnswerRelationType\" @move=\"(type: 'up' | 'down') => move(index, type)\"\n @delete=\"deleteSubject(index)\" @save=\"(item: any) => saveSubject(index, item)\" @edit=\"item.isEdit = true\"\n @add=\"(type: string) => addSubject(type, index, null)\" />\n </div>\n </div>\n </div>\n</template>\n"],"names":["props","__props","currentList","ref","emits","__emit","attrs","useAttrs","__expose","addSubject","uploadExcel","list","value","concat","addExam","item","answerList","answers","map","v","title","answer","answerId","examAnswerId","isCorrect","newItem","customId","setGuid","answerType","richTextContent","examTypeEnum","isSave","isEdit","isRealCanDel","hasSet","push","newCustomId","pageIndex","currentPageIndex","console","log","addPageEnd","setAnswerRelation","answerRelations","customAnswerId","targetItem","find","targetAnswer","c","computed","currentPageList","filter","currentId","currentIndex","findIndex","analysis","scaleQuestionList","examAnswerRelationType","type","index","newSubject","splice","move","length","saveSubject","deleteSubject","ElMessage","success","setRelation","examAnswers","watch","subjectList","newList","immediate","ns","useNamespace"],"mappings":"0sBAcA,MAAMA,EAAQC,EAIRC,EAAcC,EAAIA,IAAA,IAClBC,EAAQC,EAERC,EAAQC,EAAAA,WAEDC,EAAA,CACXC,aACAP,cACAQ,YAsFF,SAAqBC,GACnBT,EAAYU,MAAQV,EAAYU,MAAMC,OAAOF,EAAI,EAtFjDG,QAgDF,SAAiBC,GACf,MAAMC,EAAaD,EAAKE,SAASC,KAAKC,IAAY,IAC7CA,EACHC,MAAOD,EAAEE,OACTC,SAAUH,EAAEI,aACZC,UAAWL,EAAEK,eACR,GAGDC,EAAU,IACXV,EACHW,SAAUC,EAAAA,UACVC,WAAYb,EAAKc,gBAAkB,YAAcd,EAAKe,aACtDb,QAASD,EACTe,QAAQ,EACRC,QAAQ,EACRC,cAAc,EACdC,QAAQ,GAIEhC,EAAAU,MAAMuB,KAAKV,GAGvB,MAAMW,EAAcX,EAAQC,SAGvBX,EAAKsB,UAAYC,EAAiB1B,MAAMwB,IAAkB,IAC7DG,QAAQC,IAAIF,EAAiB1B,MAAMwB,IACxBK,KAGTH,EAAiB1B,MAAMwB,GAAe,GAC7BK,GACb,EAjFAC,kBAoHO,SAAkBC,EAAsBjB,EAAkBkB,GAC3D,MAAAC,EAAa3C,EAAYU,MAAMkC,MAAM3B,GAAWA,EAAEO,WAAaA,IACrE,GAAImB,EAAY,CACR,MAAAE,EAAeF,EAAW5B,SAAS6B,MAAME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EACHiB,QAAQ,EACRyB,uBAAwB1C,EAAK0C,uBAC/B,CAGF,SAASQ,EAAcN,GACTzD,EAAAU,MAAMiD,OAAOF,EAAO,GAChCO,EAAAA,UAAUC,QAAQ,OAAM,CAGjB,SAAAC,EAAY1C,EAAkB2C,GAC/BjE,EAAA,cAAesB,EAAU2C,EAAW,CAa5CC,EAAAA,OAAM,IAAMtE,EAAMuE,cAAcC,IAC1BA,IACUtE,EAAAU,MAAQ,IAAI4D,GAAO,GAEhC,CAAEC,WAAW,IAEV,MAAAC,EAAKC,eAAa,6mIAhIfzE,EAAYU,MAAMuC,QAAQhC,GAA4B,aAAjBA,EAAES,aAA2BmC"}
|
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\n// function addPageEnd() {\n// currentList.value.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// }\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}\n\n// function addExam(item: any) {\n// let currentPageIndex = 1\n// const answerList = item.answers?.map((v: any) => ({\n// ...v,\n// title: v.answer,\n// answerId: v.examAnswerId,\n// isCorrect: v.isCorrect,\n// })) || []\n\n// const newItem = {\n// ...item,\n// customId: setGuid(),\n// answerType: item.richTextContent ? 'rich_text' : item.examTypeEnum,\n// answers: answerList,\n// isSave: false,\n// isEdit: true,\n// isRealCanDel: true,\n// hasSet: false,\n// }\n\n// currentList.value.push(newItem)\n\n// if (item.pageIndex - currentPageIndex === 1) {\n// addPageEnd()\n// currentPageIndex++\n// }\n\n// if (currentPageIndex > 1) {\n// addPageEnd()\n// }\n// }\nfunction addExam(items: any[]) {\n console.log(items, 'items')\n\n let currentPageIndex = 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 和 currentPageIndex 不一致,则插入分页器\n if (newItem.pageIndex > currentPageIndex) {\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 currentPageIndex = 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=\"index\"\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=\"index\"\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=\"index\"\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=\"index\"\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 v-else-if=\"item.answerType === 'rich_text'\"\n :order-index=\"index\"\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 :order-index=\"index\"\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","currentPageIndex","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","computed","currentPageList","filter","currentId","currentIndex","findIndex","type","index","newSubject","splice","move","item","length","saveSubject","deleteSubject","ElMessage","success","setRelation","examAnswers","watch","subjectList","immediate","ns","useNamespace"],"mappings":"0sBAcA,MAAMA,EAAQC,EAIRC,EAAcC,EAAIA,IAAA,IAClBC,EAAQC,EAERC,EAAQC,EAAAA,WAEDC,EAAA,CACXC,aACAP,cACAQ,YAiIF,SAAqBC,GACnBT,EAAYU,MAAQV,EAAYU,MAAMC,OAAOF,EAAI,EAjIjDG,QAiFF,SAAiBC,GACPC,QAAAC,IAAIF,EAAO,SAEnB,IAAIG,EAAmB,EACvB,MAAMC,EAAiB,GAEjBJ,EAAAK,SAASC,IAEb,MAAMC,EAAU,IACXD,EACHE,SAAUC,EAAAA,UACVC,WAAYJ,EAAEK,gBAAkB,YAAcL,EAAEM,aAChDC,QAASP,EAAEO,SAASC,KAAKC,IAAY,IAChCA,EACHC,MAAOD,EAAEE,OACTC,SAAUH,EAAEI,aACZC,UAAWL,EAAEK,eACR,GACPC,QAAQ,EACRC,QAAQ,EACRC,cAAc,EACdC,QAAQ,GAINjB,EAAQkB,UAAYtB,IACtBC,EAAQsB,KAAK,CACXlB,SAAUC,EAAAA,UACVC,WAAY,WACZiB,SAAU,GACVC,kBA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YU,MAAMgD,OAAOF,EAAO,GAC/CxD,EAAYU,MAAMgD,OAAOF,EAAQ,EAAG,EAAGI,EAAI,CAC7C,CAGO,SAAAE,EAAYN,EAAeI,GACtB5D,EAAAU,MAAM8C,GAAS,IACtBxD,EAAYU,MAAM8C,MAClBI,EACHzB,QAAQ,EACRO,uBAAwBkB,EAAKlB,uBAC/B,CAGF,SAASqB,EAAcP,GACTxD,EAAAU,MAAMgD,OAAOF,EAAO,GAChCQ,EAAAA,UAAUC,QAAQ,OAAM,CAGjB,SAAAC,EAAY7C,EAAkB8C,GAC/BjE,EAAA,cAAemB,EAAU8C,EAAW,CAa5CC,EAAAA,OAAM,IAAMtE,EAAMuE,cAAcpD,IAC1BA,IACUjB,EAAAU,MAAQ,IAAIO,GAAO,GAEhC,CAAEqD,WAAW,IAEV,MAAAC,EAAKC,eAAa,6mIA3KfxE,EAAYU,MAAMyC,QAAQhC,GAA4B,aAAjBA,EAAEI,aAA2BsC"}
|
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.39",
|
5
5
|
"description": "Vue 3 Component Library",
|
6
6
|
"license": "MIT",
|
7
7
|
"homepage": "https://trry-hub.github.io/qxs-bns/",
|
@@ -41,7 +41,7 @@
|
|
41
41
|
},
|
42
42
|
"dependencies": {
|
43
43
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
44
|
-
"@qxs-bns/directives": "0.0.
|
44
|
+
"@qxs-bns/directives": "0.0.16",
|
45
45
|
"@qxs-bns/hooks": "0.0.2",
|
46
46
|
"@qxs-bns/utils": "0.0.19",
|
47
47
|
"@vueuse/core": "^11.3.0",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"subject-action.vue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/subject-action/src/subject-action.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
1
|
+
{"version":3,"file":"subject-action.vue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/subject-action/src/subject-action.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAy3BA,wBAiCG"}
|
@@ -5,7 +5,7 @@ declare const QxsSubjectList: import("../withInstall").SFCWithInstall<import("vu
|
|
5
5
|
addSubject: (type: string, index?: number | null, examAnswerRelationType?: number | null) => void;
|
6
6
|
currentList: globalThis.Ref<any, any>;
|
7
7
|
uploadExcel: (list: any[]) => void;
|
8
|
-
addExam: (
|
8
|
+
addExam: (items: any[]) => void;
|
9
9
|
setAnswerRelation: (answerRelations: any, customId: string, customAnswerId: string) => void;
|
10
10
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
11
11
|
setRelation: (...args: any[]) => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"subject-scale.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/subject-list/src/components/subject-scale.vue"],"names":[],"mappings":"AA6SA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,GAAG,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,iBAAiB,CAAC,EAAE,GAAG,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAChC,CAAC;;;;;;;;;;;;;;
|
1
|
+
{"version":3,"file":"subject-scale.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/subject-list/src/components/subject-scale.vue"],"names":[],"mappings":"AA6SA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,GAAG,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,iBAAiB,CAAC,EAAE,GAAG,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAChC,CAAC;;;;;;;;;;;;;;AA0mBF,wBAOG"}
|
@@ -3,7 +3,7 @@ type __VLS_Props = {
|
|
3
3
|
isPreview: boolean;
|
4
4
|
};
|
5
5
|
declare function addSubject(type: string, index?: number | null, examAnswerRelationType?: number | null): void;
|
6
|
-
declare function addExam(
|
6
|
+
declare function addExam(items: any[]): void;
|
7
7
|
declare function uploadExcel(list: any[]): void;
|
8
8
|
declare function setAnswerRelation(answerRelations: any, customId: string, customAnswerId: string): void;
|
9
9
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"subject-list.vue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/subject-list/src/subject-list.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"subject-list.vue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/subject-list/src/subject-list.vue"],"names":[],"mappings":"AA8VA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,GAAG,EAAE,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAC;AA0CF,iBAAS,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,GAAG,IAAW,EAAE,sBAAsB,GAAE,MAAM,GAAG,IAAW,QAkB1G;AAiCD,iBAAS,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,QA8C5B;AACD,iBAAS,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,QAE/B;AA8BD,iBAAS,iBAAiB,CAAC,eAAe,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,QAQxF;;;;;;;;;;;;AA0dD,wBAQG"}
|