|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
<!-- 知识库 --> |
|
|
<!-- 知识库 --> |
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
|
|
|
|
|
|
import { ref, toRaw, onMounted, computed } from 'vue' |
|
|
import { ref, toRaw, onMounted, computed } from 'vue' |
|
|
// @ts-ignore crudFrom模板 |
|
|
// @ts-ignore crudFrom模板 |
|
|
import CrudTemplate from '@/crud/index.vue' |
|
|
import CrudTemplate from '@/crud/index.vue' |
|
|
|
|
|
|
|
|
const route = useRoute() |
|
|
const route = useRoute() |
|
|
const crudRef = ref() |
|
|
const crudRef = ref() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//问题类型 |
|
|
//问题类型 |
|
|
let serviceTypeOptinos = [ |
|
|
let serviceTypeOptinos = [ |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
// 删除按钮 |
|
|
// 删除按钮 |
|
|
function handleDelete(idx: any, row: any) { |
|
|
function handleDelete(idx: any, row: any) { |
|
|
const data = { |
|
|
const data = { |
|
|
id:row.id |
|
|
|
|
|
|
|
|
id: row.id, |
|
|
} |
|
|
} |
|
|
BaseService.post('/managew/knowledgebase/deleteById', data).then( |
|
|
BaseService.post('/managew/knowledgebase/deleteById', data).then( |
|
|
(res: any) => { |
|
|
(res: any) => { |
|
|
|
|
|
|
|
|
crudRef.value.tableLoding = false |
|
|
crudRef.value.tableLoding = false |
|
|
//分页总数 |
|
|
//分页总数 |
|
|
field.value.paging.total = bizContent.totalCount |
|
|
field.value.paging.total = bizContent.totalCount |
|
|
console.log(bizContent, 'getList'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(bizContent, 'getList') |
|
|
} else { |
|
|
} else { |
|
|
crudRef.value.tableLoding = false |
|
|
crudRef.value.tableLoding = false |
|
|
ElMessage.error(res.message) |
|
|
ElMessage.error(res.message) |
|
|
|
|
|
|
|
|
if (res && res.code === 0) { |
|
|
if (res && res.code === 0) { |
|
|
//数据转换 |
|
|
//数据转换 |
|
|
let bizContent = res.data |
|
|
let bizContent = res.data |
|
|
businessTypeList.value = bizContent.map(item => { |
|
|
|
|
|
|
|
|
businessTypeList.value = bizContent.map((item) => { |
|
|
return { |
|
|
return { |
|
|
label: item, |
|
|
label: item, |
|
|
value: item, |
|
|
value: item, |
|
|
|
|
|
|
|
|
(res: any) => { |
|
|
(res: any) => { |
|
|
if (res && res.code === 0) { |
|
|
if (res && res.code === 0) { |
|
|
ElMessage.success('操作成功') |
|
|
ElMessage.success('操作成功') |
|
|
|
|
|
feedBackShow.value = false |
|
|
getList() |
|
|
getList() |
|
|
cancel() |
|
|
cancel() |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
|
|
|
(res: any) => { |
|
|
(res: any) => { |
|
|
if (res && res.code === 0) { |
|
|
if (res && res.code === 0) { |
|
|
ElMessage.success('操作成功') |
|
|
ElMessage.success('操作成功') |
|
|
|
|
|
feedBackShow.value = false |
|
|
|
|
|
|
|
|
getList() |
|
|
getList() |
|
|
cancel() |
|
|
cancel() |
|
|
} else { |
|
|
} else { |