【删除】 删除复制页面的时候多余的方法
This commit is contained in:
@@ -126,7 +126,7 @@
|
|||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
<el-button @click="addWordInfo">添加</el-button>
|
<el-button @click="addEmailInfo">添加</el-button>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
@@ -394,70 +394,11 @@ const documentList = ref([
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
const dialogFormVisibleWordInfo = ref(false)
|
const dialogFormVisibleWordInfo = ref(false)
|
||||||
const dialogFormVisibleWordInfos = ref(false)
|
|
||||||
const nodeFunction = ref('')
|
|
||||||
const titles = ref('')
|
|
||||||
const englishName = ref('')
|
|
||||||
const filePath = ref('')
|
|
||||||
const upFilePath = ref('')
|
|
||||||
|
|
||||||
const functionList = ref<string[]>([])
|
|
||||||
const wordData = reactive({
|
|
||||||
chineseName: '',
|
|
||||||
englishName: '',
|
|
||||||
filePath: '',
|
|
||||||
function: [] as string[]
|
|
||||||
})
|
|
||||||
|
|
||||||
const handleCheckChange = (data: Tree, checked: boolean, indeterminate: boolean) => {
|
const addEmailInfo = async () => {
|
||||||
// if (checked || indeterminate) {
|
|
||||||
// wordPoints.value.belongTo = data.belongTo
|
|
||||||
// wordPoints.value.parameter = data.isboo
|
|
||||||
// wordPoints.value.type = data.type
|
|
||||||
// wordPointsFun.value = {
|
|
||||||
// chineseName: '',
|
|
||||||
// function: ''
|
|
||||||
// }
|
|
||||||
// wordPointsFun.value.chineseName = data.toChinese
|
|
||||||
// wordPointsFun.value.function = data.nodeFunction
|
|
||||||
// wordPoints.value.function.push(cloneDeep(wordPointsFun.value))
|
|
||||||
// console.log(wordPoints)
|
|
||||||
// }
|
|
||||||
if (data.titleType == '2') {
|
|
||||||
wordPoints.value.name = chineseName.value + data.toChinese
|
|
||||||
wordPoints.value.filePath = filePath.value
|
|
||||||
wordPoints.value.function = englishNames.value + data.nodeFunction
|
|
||||||
wordPoints.value.englishName = englishNames.value
|
|
||||||
wordPoints.value.belongTo = data.belongTo
|
|
||||||
wordPoints.value.isboo = data.isboo
|
|
||||||
wordPoints.value.type = data.type
|
|
||||||
wordPoints.value.unit = data.unit
|
|
||||||
wordPoints.value.isExam = '0'
|
|
||||||
wordPointsInfosList.push(cloneDeep(wordPoints.value))
|
|
||||||
}
|
|
||||||
console.log(data, checked, indeterminate)
|
|
||||||
}
|
|
||||||
|
|
||||||
const addWordInfo = async () => {
|
|
||||||
dialogFormVisibleWordInfo.value = true
|
dialogFormVisibleWordInfo.value = true
|
||||||
}
|
}
|
||||||
const queryParams = reactive({
|
|
||||||
nodeFunction: undefined
|
|
||||||
})
|
|
||||||
const chineseName = ref('')
|
|
||||||
const nodeFunctions = ref('')
|
|
||||||
const englishNames = ref('')
|
|
||||||
const handleNodelClick = async (row: any) => {
|
|
||||||
queryParams.nodeFunction = row.selectName
|
|
||||||
chineseName.value = '【' + row.name + '】'
|
|
||||||
filePath.value = row.filePath
|
|
||||||
nodeFunctions.value = row.selectName
|
|
||||||
englishNames.value = row.englishName
|
|
||||||
const res = await WordApi.getWordInfos(queryParams)
|
|
||||||
wordPointsInfoList.value = []
|
|
||||||
wordPointsInfoList.value.push(...handleTree(res))
|
|
||||||
dialogFormVisibleWordInfos.value = true
|
|
||||||
}
|
|
||||||
const handleDelete = (row) => {
|
const handleDelete = (row) => {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
for (let i = 0; i < list.value.length; i++) {
|
for (let i = 0; i < list.value.length; i++) {
|
||||||
@@ -466,40 +407,6 @@ const handleDelete = (row) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const submitWordPoints = async () => {
|
|
||||||
const res = await WordApi.getWordListInfos(wordPointsInfosList)
|
|
||||||
wordPoints.value = {
|
|
||||||
name: '',
|
|
||||||
englishName: '',
|
|
||||||
filePath: '',
|
|
||||||
type: '',
|
|
||||||
belongTo: '',
|
|
||||||
isboo: '',
|
|
||||||
function: '',
|
|
||||||
unit: '',
|
|
||||||
isExam: ''
|
|
||||||
}
|
|
||||||
let index = 0
|
|
||||||
wordPointsInfosList = []
|
|
||||||
for (let i = 0; i < res.length; i++) {
|
|
||||||
var indexFlag = false
|
|
||||||
for (let x = 0; x < list.value.length; x++) {
|
|
||||||
if (res[i].content == list.value[x].content) {
|
|
||||||
// 如果存在相同的数据话 不进入
|
|
||||||
indexFlag = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!indexFlag) {
|
|
||||||
index += 1
|
|
||||||
res[i].sort = index
|
|
||||||
list.value.push(res[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dialogFormVisibleWordInfo.value = false
|
|
||||||
dialogFormVisibleWordInfos.value = false
|
|
||||||
wordPointsList.value = []
|
|
||||||
}
|
|
||||||
const formRules = reactive<FormRules>({
|
const formRules = reactive<FormRules>({
|
||||||
status: [{ required: true, message: '启用状态必填', trigger: 'blur' }]
|
status: [{ required: true, message: '启用状态必填', trigger: 'blur' }]
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user