|
|
@@ -701,15 +701,6 @@ const getKbList = async () => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
-const exchangeArray = (array, beforeIdx, newIdx, isDeep = false) => {
|
|
|
- const newArray = isDeep ? cloneDeep(array) : array;
|
|
|
- if (beforeIdx > -1 && newIdx > -1) {
|
|
|
- // 先替换后面的,然后拿到替换的结果替换前面的
|
|
|
- newArray.splice(beforeIdx, 1, newArray.splice(newIdx, 1, newArray[beforeIdx]).pop());
|
|
|
- }
|
|
|
- return newArray;
|
|
|
-};
|
|
|
-
|
|
|
function upTabdateItem(id, newName) {
|
|
|
const itemToUpdate = renderData.value.find((item) => item.id === id);
|
|
|
if (itemToUpdate) {
|
|
|
@@ -721,6 +712,7 @@ const deleteItem = async (row) => {
|
|
|
let data = await kbdocumentrm({ doc_id: row.id });
|
|
|
if (data.retcode == 0) {
|
|
|
Message.success(t('management.delete_success'));
|
|
|
+ toSyncOwnKnowledge(props.kb_id);
|
|
|
fetchData({
|
|
|
kb_id: kbobj.id,
|
|
|
...basePagination
|
|
|
@@ -735,28 +727,8 @@ const onDownloadDocument = async (record) => {
|
|
|
filename: record.name
|
|
|
});
|
|
|
};
|
|
|
-const previewArea = async (row) => {
|
|
|
- Object.assign(seeObj, row);
|
|
|
- let type = row.name.split('.')[1];
|
|
|
- if (type == 'pdf') {
|
|
|
- documenttype.value = 'txtPdf';
|
|
|
- } else if (type == 'docx') {
|
|
|
- documenttype.value = 'docx';
|
|
|
- } else if (type == 'xlsx') {
|
|
|
- documenttype.value = 'excel';
|
|
|
- } else if (type == 'txt') {
|
|
|
- documenttype.value = 'txtPdf';
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- previewSrc.value = `${import.meta.env.VITE_API_BASE_URL}/v1/document/get/${row.id}`;
|
|
|
- // previewSrc.value = `${ httpUrl }/v1/document/get/${row.id}`
|
|
|
- visible.value = true;
|
|
|
-};
|
|
|
|
|
|
const handleChangeStatus = async (row) => {
|
|
|
- // console.log(row);
|
|
|
let data = await kbdocumentchangeStatus({
|
|
|
doc_id: row.id,
|
|
|
status: row.status
|
|
|
@@ -817,7 +789,6 @@ const handlePreview = (file) => {
|
|
|
watch(
|
|
|
() => columns.value,
|
|
|
(val) => {
|
|
|
- // alert(columns.value)
|
|
|
cloneColumns.value = cloneDeep(val);
|
|
|
cloneColumns.value.forEach((item, index) => {
|
|
|
item.checked = true;
|
|
|
@@ -826,12 +797,6 @@ watch(
|
|
|
},
|
|
|
{ deep: true, immediate: true }
|
|
|
);
|
|
|
-
|
|
|
-onBeforeMount(async () => {
|
|
|
- // const {data} = await queryKbtenantInfo();
|
|
|
- // Object.assign(kbtenantInfo,data);
|
|
|
- // console.log(kbtenantInfo,'kbtenantInfo的数据');
|
|
|
-});
|
|
|
onMounted(() => {
|
|
|
knowledgeData();
|
|
|
});
|
|
|
@@ -839,7 +804,6 @@ onMounted(() => {
|
|
|
|
|
|
<style scoped lang="css">
|
|
|
.container {
|
|
|
- /* padding: 0 20px 20px 20px; */
|
|
|
height: 100%;
|
|
|
.main-container {
|
|
|
display: flex;
|
|
|
@@ -907,9 +871,6 @@ onMounted(() => {
|
|
|
|
|
|
.rt-container {
|
|
|
position: relative;
|
|
|
- //background: #626aea;
|
|
|
- /* margin-left: 20px; */
|
|
|
- /* width: calc(100% - 200px); */
|
|
|
overflow: hidden;
|
|
|
|
|
|
.rt-container-main {
|