|
@@ -18,7 +18,14 @@
|
|
|
<a-space>
|
|
<a-space>
|
|
|
<a @click="updateName(record)" >更改名称</a>
|
|
<a @click="updateName(record)" >更改名称</a>
|
|
|
<a @click="pushVersion(record)" >新增版本</a>
|
|
<a @click="pushVersion(record)" >新增版本</a>
|
|
|
- <a @click="delOperator(record)" >删除</a>
|
|
|
|
|
|
|
+ <a-popconfirm
|
|
|
|
|
+ title="确实要删除吗?"
|
|
|
|
|
+ ok-text="确定"
|
|
|
|
|
+ cancel-text="取消"
|
|
|
|
|
+ @confirm="delOperator(record)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a >删除</a>
|
|
|
|
|
+ </a-popconfirm>
|
|
|
</a-space>
|
|
</a-space>
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
@@ -125,14 +132,14 @@ const { resetFields, validate, validateInfos } = useForm(operatorState, {
|
|
|
|
|
|
|
|
const submit = () => {
|
|
const submit = () => {
|
|
|
validate().then(async () => {
|
|
validate().then(async () => {
|
|
|
- state.modalType === 'add' ? await OperatorController.add(operatorState) : await OperatorController.upadteName(operatorState.aiId, operatorState.aiName)
|
|
|
|
|
|
|
+ state.modalType === 'add' ? await OperatorController.add(operatorState) : await OperatorController.upadteName(operatorState.id! as unknown as string, operatorState.aiName)
|
|
|
closeModal()
|
|
closeModal()
|
|
|
tableProDom.value.reload()
|
|
tableProDom.value.reload()
|
|
|
}).catch(() => {})
|
|
}).catch(() => {})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const delOperator = async (record) => {
|
|
const delOperator = async (record) => {
|
|
|
- await OperatorController.del(record.aiId)
|
|
|
|
|
|
|
+ await OperatorController.del(record.id)
|
|
|
tableProDom.value.reload()
|
|
tableProDom.value.reload()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -147,6 +154,7 @@ const closeModal = () => {
|
|
|
const openModal = () => {
|
|
const openModal = () => {
|
|
|
state.visible = true
|
|
state.visible = true
|
|
|
state.modalType = 'add'
|
|
state.modalType = 'add'
|
|
|
|
|
+ resetFields({})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const getOperatorType = async () => {
|
|
const getOperatorType = async () => {
|
|
@@ -154,14 +162,14 @@ const getOperatorType = async () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const updateName = async (record) => {
|
|
const updateName = async (record) => {
|
|
|
- const data = await OperatorController.byId(record.aiId)
|
|
|
|
|
|
|
+ const data = await OperatorController.byId(record.id)
|
|
|
resetFields(data)
|
|
resetFields(data)
|
|
|
state.modalType = 'update'
|
|
state.modalType = 'update'
|
|
|
state.visible = true
|
|
state.visible = true
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const pushVersion = (record) => {
|
|
const pushVersion = (record) => {
|
|
|
- router.push({ path: '/cvs/operator/version', query: { aiId: record.aiId } })
|
|
|
|
|
|
|
+ router.push({ path: '/cvs/operator/version', query: { aiId: record.id } })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|