diff --git a/.env.development b/.env.development
index c92ea84..9b3c2c7 100644
--- a/.env.development
+++ b/.env.development
@@ -2,7 +2,7 @@
ENV = development
# 本地环境接口地址
-# VITE_API_URL = https://4155gf93ll13.vicp.fun/admin
+# VITE_API_URL = http://4155gf93ll13.vicp.fun/admin
# VITE_API_URL = http://localhost:13579/admin
# VITE_API_URL = https://cankao.cs.com.cn/admin
VITE_API_URL = http://123.60.153.169:8040/admin
diff --git a/src/api/api.ts b/src/api/api.ts
index cfa1f7e..465ed55 100644
--- a/src/api/api.ts
+++ b/src/api/api.ts
@@ -214,7 +214,6 @@ export const getNewsInfo = (params: any, headers?: any) => {
method: 'get',
params,
headers,
-
});
};
@@ -283,7 +282,6 @@ export const getIndustryHierarchy = (params?: any) => {
});
};
-
export const getTagConcept = (params?: any) => {
return request({
url: '/tag/concept',
@@ -312,7 +310,8 @@ export const doRecover = (data?: any) => {
export const doNewSubmit = (data?: any) => {
return request({
url: '/news/submit',
- method: 'post', data
+ method: 'post',
+ data,
});
};
@@ -329,7 +328,7 @@ export const doNewLog = (params?: any) => {
return request({
url: '/news/log',
method: 'get',
- params
+ params,
});
};
@@ -338,7 +337,7 @@ export const doNewCheck = (params?: any) => {
return request({
url: '/news/check',
method: 'post',
- params
+ params,
});
};
@@ -347,6 +346,23 @@ export const doNewReturn = (params?: any) => {
return request({
url: '/news/return',
method: 'post',
- params
+ params,
+ });
+};
+
+// 筛选项-获取信号规则级联列表
+export const getSignalRules = (params?: any) => {
+ return request({
+ url: '/news/getSignalRulesList',
+ method: 'get',
+ params,
+ });
+};
+
+export const searchCompany = (params?: any) => {
+ return request({
+ url: '/news/getCompanyNames',
+ method: 'get',
+ params,
});
};
diff --git a/src/stores/themeConfig.ts b/src/stores/themeConfig.ts
index 17c0e25..7384746 100644
--- a/src/stores/themeConfig.ts
+++ b/src/stores/themeConfig.ts
@@ -60,7 +60,7 @@ export const useThemeConfig = defineStore('themeConfig', {
* 界面设置
*/
// 是否开启菜单水平折叠效果
- isCollapse: false,
+ isCollapse: true,
// 是否开启菜单手风琴效果
isUniqueOpened: true,
// 是否开启固定 Header
diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts
index 59c84df..3fb7768 100644
--- a/src/utils/Utils.ts
+++ b/src/utils/Utils.ts
@@ -1,8 +1,18 @@
// 工具函数:判断是否为移动设备(基于屏幕宽度)
export const isMobileByWidth = (): boolean => {
- if (typeof window === 'undefined') {
- return false; // 非浏览器环境
- }
- // 通常以 768px 作为移动设备的宽度阈值
- return window.innerWidth < 768;
-};
\ No newline at end of file
+ if (typeof window === 'undefined') {
+ return false; // 非浏览器环境
+ }
+ // 通常以 768px 作为移动设备的宽度阈值
+ return window.innerWidth < 768;
+};
+/* 防抖 */
+export function debounce(fn, delay) {
+ let timer = null;
+ return function () {
+ clearTimeout(timer);
+ timer = setTimeout(() => {
+ fn.apply(this, arguments);
+ }, delay);
+ };
+}
diff --git a/src/views/pages/richedit/DetailDrawer/index.vue b/src/views/pages/richedit/DetailDrawer/index.vue
index 905a9f5..998f753 100644
--- a/src/views/pages/richedit/DetailDrawer/index.vue
+++ b/src/views/pages/richedit/DetailDrawer/index.vue
@@ -21,10 +21,10 @@
v-if="!form.deleted && (data.status == 0 || data.status == 1 || data.status == -1)"
@click="doDeleteNewsFn(data)">删除 -->
-
{{ readOnly ?
- '编辑' : '浏览' }}
+ @click="handleEditStatus(!readOnly)">{{
+ readOnly ? '编辑' : '浏览'
+ }}
{{ readOnly ?
- '编辑' : '浏览' }}
+ @click="handleEditStatus(!readOnly)">{{ readOnly ? '编辑' : '浏览' }}
- {{ readOnly ?
- '编辑' : '浏览' }}
-
+ {{
+ readOnly ? '编辑' : '浏览'
+ }}
+
@@ -80,11 +80,16 @@
}}
+
+
+
@@ -116,6 +121,14 @@
+
+
+
+ 是
+ 否
+
+
@@ -128,11 +141,10 @@
-
+ style="margin-top: 10px; padding: 0 30px; border-top: 0">
@@ -143,12 +155,12 @@
:rows="5" type="textarea" placeholder="请输入编辑审核备注" max="300" :disabled="readOnly" />
-
-
+
{{ isMobileByWidth() ? '保存并反馈' : '保存' }}
+
-
+
-
+
+
+ [独家]
+
+
+
+
+
+ {{ scope.row.companyName }}
+
+
+
+
+
+
+
+ {{ scope.row.conceptLabels[0] }}
+
+
+ {{ scope.row.industryLabels[0] }}
+
+
+
-
+
+
+
+ -
+
+
+
+
+
+
+ {{ scope.row.sourceName }}
+
+ -
+
+
@@ -152,7 +183,8 @@
-
+
+
草稿
未发布
已发布
@@ -196,7 +228,8 @@
-
+
{{ scope.row.score }}
@@ -205,14 +238,16 @@
-
{{ formatTime(scope.row.updateTime) == formatTime(scope.row.createTime) ? scope.row.publishTime : scope.row.updateTime }}
+
{{ formatTime(scope.row.updateTime) == formatTime(scope.row.createTime) ?
+ scope.row.publishTime : scope.row.updateTime }}
+
+
+
@@ -71,11 +179,71 @@
:tableLoading="tableLoading" @currentChange="currentChange" @sizeChange="sizeChange">
-
+
+
+ [独家]
+
+
+
+
+
+ {{ scope.row.companyName }}
+
+
+
+
+
+
+
+
+ {{ scope.row.conceptLabels[0] }}
+
+
+ {{ scope.row.industryLabels[0] }}
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+ {{ scope.row.sourceName }}
+
+ -
-
@@ -348,6 +516,7 @@ import DetailDrawer from './DetailDrawer/index.vue';
import {
doNewRevoke,
doNewSubmit,
+ searchCompany,
getNews,
doNewsPublish,
doDeleteNews,
@@ -358,6 +527,7 @@ import {
doRecover,
doNewCheck,
doNewReturn,
+ getSignalRules,
} from '/@/api/api';
import { highlightTitle } from '/@/utils/highlight';
import clipboard from 'clipboard';
@@ -461,6 +631,8 @@ async function getData() {
dateline_from: _sdate || undefined,
dateline_to: _edate || undefined,
range: Session.get('userInfoLocal').userType == '01' ? 'review' : Session.get('userInfoLocal').userType == '02' ? 'secondReview' : 'all',
+ includeRuleIds: includeRuleIds.value,
+ excludeRuleIds: excludeRuleIds.value,
});
tableLoading.value = false;
if (code == 200) {
@@ -477,6 +649,21 @@ async function getData() {
}
});
item.title = highlightTitle(item.title, form.value.keyword);
+
+ // item.companys = [
+ // "英伟达",
+ // "微软",
+ // ]
+
+ // item.labels = [
+ // "新科技-人工智能",
+ // "新科技-人工智能",
+ // ]
+
+ // item.signalNames = [
+ // "信号规则1",
+ // "信号规则2",
+ // ]
});
}
} catch (error) {
@@ -683,7 +870,9 @@ const isScoreShow = ref(false);
const curScore = ref(0);
const scoreDetail = ref({});
const isAdmin = computed(() => {
- return route.query.admin == 'superman' || Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01' ? true : false;
+ return route.query.admin == 'superman' || Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'
+ ? true
+ : false;
});
async function getScoreDetail(id: any) {
if (!isAdmin.value) return;
@@ -750,6 +939,15 @@ function restData() {
tableRef.value.clearSort();
tableData.page = 1;
+
+ form.value.includeRuleIds = null;
+ form.value.excludeRuleIds = null;
+
+ includeRuleIds.value = null;
+ excludeRuleIds.value = null;
+ form.value.companyName = null;
+ form.value.exclusive = null;
+
getData();
}
@@ -792,6 +990,63 @@ async function doNewReturnFn(item) {
}
}
+const signalRulesList = ref([
+ {
+ label: '全部',
+ value: 1,
+ },
+ {
+ label: '全部1',
+ value: 2,
+ },
+]);
+
+async function getSignalRulesFn() {
+ let { code, data } = await getSignalRules({});
+ if (code == 200) {
+ signalRulesList.value = data;
+ }
+}
+const includeRuleIds = ref('');
+const excludeRuleIds = ref('');
+
+function signalChange(event, type) {
+ console.log('🚀 ~ signalChange ~ event:', event);
+ if (type == 1) {
+ // form.value.signalId1 = signalId1.value;
+ includeRuleIds.value = event.join(',');
+ // excludeRuleIds.value = null;
+ } else {
+ // form.value.signalId2 = signalId2.value;
+ excludeRuleIds.value = event.join(',');
+ // includeRuleIds.value = null;
+ }
+
+ getData();
+}
+
+import { debounce } from '/@/utils/utils';
+
+const companyList = ref([]);
+const getCompany = debounce(async (val: string) => {
+ // if (!val) {
+ // return;
+ // }
+ let { code, data } = await searchCompany({
+ companyName: val,
+ });
+
+ if (code == 200) {
+ companyList.value = data;
+ // data.forEach((item) => {
+ // companyList.value.push({
+ // label: item.companyName,
+ // value: item.companyName,
+ // });
+ // });
+ }
+}, 500);
+
// 页面加载时
onMounted(async () => {
if (isMobileByWidth() && (Session.get('userInfoLocal').userType == '01' || Session.get('userInfoLocal').userType == '02')) {
@@ -818,6 +1073,11 @@ onMounted(async () => {
}
});
}
+ if (Session.get('userInfoLocal').userType == '00') {
+ getSignalRulesFn();
+ }
+
+ getCompany();
});
@@ -912,15 +1172,51 @@ onMounted(async () => {
flex: 1;
display: flex;
flex-direction: column;
- align-items: flex-end;
- min-width: 700px;
+ // align-items: flex-end;
+ // min-width: 700px;
.colHeader-right-1,
.colHeader-right-2 {
display: flex;
- justify-self: flex-end;
+ // justify-self: flex-end;
align-items: center;
margin-bottom: 10px;
}
}
+
+.labels {
+ display: flex;
+ gap: 5px;
+ flex-wrap: wrap;
+
+ .label_item {
+ height: 24px;
+ background: #f6f6f6;
+ border-radius: 2px;
+ border: 1px solid #e2e2e2;
+ padding: 0 5px;
+
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 400;
+ font-size: 12px;
+ color: #656363;
+ line-height: 16px;
+ text-align: left;
+ font-style: normal;
+
+ display: flex;
+ text-align: center;
+ justify-content: center;
+ align-items: center;
+
+ flex-wrap: nowrap;
+ white-space: nowrap;
+ }
+}
+
+.label_item_box {
+ // width: 100%;
+ display: flex;
+ gap: 5px;
+}