Compare commits

..

No commits in common. "c1325db9e7d12e7fd5667d9d06ac1c32cceff6cd" and "44b341f7ac5e6d81891158a1adae44ef5320d953" have entirely different histories.

1 changed files with 7 additions and 9 deletions

View File

@ -15,10 +15,10 @@
</template>
</el-dropdown>
<div>
<el-button type="danger" link :disabled="!(templateList.length)" @click="removeItem(curTemplate, false)">
<el-button type="danger" link @click="removeItem(curTemplate, false)">
删除
</el-button>
<el-button type="primary" link :disabled="!(templateList.length)" @click="onAdd">
<el-button type="primary" link @click="onAdd">
<i class="iconfont icon-jiahao"></i>
添加提示词
</el-button>
@ -137,17 +137,15 @@ const curTemplate = reactive({ name: '', id: '' })
const templateList = ref([])
const childTempList = ref([])
const getTemplateList = () => {
modelList({ model: props.type, type: 1, pageNum: 1, pageSize: 10000, ex1: curNode.edustage, ex2: curNode.edusubject }).then(res => {
modelList({ model: props.type, type: 1, pageNum: 1, pageSize: 10000 }).then(res => {
templateList.value = res.rows
if(res.rows.length > 0){
Object.assign(curTemplate, res.rows[0]);
getChildTemplate()
}
Object.assign(curTemplate, res.rows[0]);
getChildTemplate()
})
}
const getChildTemplate = () => {
tempLoading.value = true
modelList({ model: props.type, type: 2, parentId: curTemplate.id, ex1: curNode.edustage, ex2: curNode.edusubject }).then(res => {
modelList({ model: props.type, type: 2, parentId: curTemplate.id }).then(res => {
childTempList.value = res.rows
if(childTempList.value.length){
childTempList.value.forEach(item => item.answer = '')
@ -400,9 +398,9 @@ emitter.on('onGetMain', () => {
const curNode = reactive({})
onMounted(() => {
getTemplateList()
let data = sessionStore.get('subject.curNode')
Object.assign(curNode, data);
getTemplateList()
let jsonKey = `${modeType.value}-${data.edustage}-${data.edusubject}`
params.dataset_id = dataSetJson[jsonKey]
})