Browse Source

reactor:拓展表单BUG修复;

zhangchong 6 tháng trước cách đây
mục cha
commit
537cd74d05

+ 2 - 2
package.json

@@ -23,8 +23,8 @@
 		"@microsoft/signalr": "^7.0.0",
 		"@originjs/vite-plugin-commonjs": "^1.0.3",
 		"@vueuse/motion": "^2.0.0",
-		"@wangeditor/editor": "^5.1.23",
-		"@wangeditor/editor-for-vue": "^5.1.12",
+		"@wangeditor-next/editor": "^5.6.1",
+		"@wangeditor-next/editor-for-vue": "^5.1.12",
 		"axios": "^1.4.0",
 		"dayjs": "^1.11.9",
 		"echarts": "^5.5.0",

+ 7 - 3
src/theme/iconfont/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 4614264 */
-  src: url('iconfont.woff2?t=1723532317723') format('woff2'),
-       url('iconfont.woff?t=1723532317723') format('woff'),
-       url('iconfont.ttf?t=1723532317723') format('truetype');
+  src: url('iconfont.woff2?t=1728972425748') format('woff2'),
+       url('iconfont.woff?t=1728972425748') format('woff'),
+       url('iconfont.ttf?t=1728972425748') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,10 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-daohang:before {
+  content: "\e640";
+}
+
 .icon-suoyou:before {
   content: "\e62d";
 }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/theme/iconfont/iconfont.js


+ 7 - 0
src/theme/iconfont/iconfont.json

@@ -5,6 +5,13 @@
   "css_prefix_text": "icon-",
   "description": "",
   "glyphs": [
+    {
+      "icon_id": "1069168",
+      "name": "导航",
+      "font_class": "daohang",
+      "unicode": "e640",
+      "unicode_decimal": 58944
+    },
     {
       "icon_id": "356475",
       "name": "所有",

BIN
src/theme/iconfont/iconfont.ttf


BIN
src/theme/iconfont/iconfont.woff


BIN
src/theme/iconfont/iconfont.woff2


+ 0 - 1
src/views/auxiliary/notice/components/Notice-add.vue

@@ -207,7 +207,6 @@
 
 <script setup lang="tsx" name="noticeDetail">
 import { reactive, ref, defineAsyncComponent, computed, unref, FunctionalComponent } from 'vue';
-import '@wangeditor/editor/dist/css/style.css'; // 引入 css
 import { bulletinAdd, bulletinAddBaseData, circularAdd, circularAddBaseData, getAllUsers } from '@/api/auxiliary/notice';
 import { throttle } from '@/utils/tools';
 import { CheckboxValueType, ElMessage, FormInstance } from 'element-plus';

+ 0 - 1
src/views/auxiliary/notice/components/Notice-edit.vue

@@ -216,7 +216,6 @@
 
 <script setup lang="tsx" name="noticeDetail">
 import { reactive, ref, defineAsyncComponent, computed, FunctionalComponent, unref, nextTick } from 'vue';
-import '@wangeditor/editor/dist/css/style.css'; // 引入 css
 import {
 	bulletinAddBaseData,
 	bulletinDetail,

+ 19 - 5
src/views/home/components/Home-date.vue

@@ -1,9 +1,13 @@
-
 <template>
 	<el-card shadow="never">
 		<el-text type="danger">欢迎:{{ userInfos.name }}使用本系统!</el-text>
 		<el-text type="info" class="ml20">公历:{{ formatDate(now, 'YYYY-mm-dd HH:MM:SS WWW') }}</el-text>
-		<el-text type="info" class="ml20">农历:{{ changeDate() }}</el-text>
+		<el-text type="info" class="ml20">农历:{{ getChineseDate() }}</el-text>
+		<el-badge :is-dot="isDot" class="ml20">
+			<el-button class="share-button" type="primary" @click="linkOld"
+				><SvgIcon name="iconfont icon-daohang" class="mr5" size="18px" /> 一键登录到老系统</el-button
+			>
+		</el-badge>
 	</el-card>
 </template>
 <script setup lang="ts">
@@ -12,14 +16,24 @@ import { useNow } from '@vueuse/core';
 import calendar from '@/utils/calendar';
 import { useUserInfo } from '@/stores/userInfo';
 import { storeToRefs } from 'pinia';
+import { ref } from 'vue';
 
 const stores = useUserInfo(); // 用户信息
 const { userInfos } = storeToRefs(stores); // 用户信息
 
-const now = useNow();// 获取当前时间
+const now = useNow(); // 获取当前时间
 // 获取农历
-const changeDate = () => {
+const getChineseDate = () => {
 	const lunarDay: any = calendar.solar2lunar(new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate());
 	return `${lunarDay.IMonthCn}${lunarDay.IDayCn} ${lunarDay.gzYear}${lunarDay.Animal}年 ${lunarDay.gzMonth}月 ${lunarDay.gzDay}日`;
+};
+// 一建登录到老系统
+const isDot = ref(true);
+const linkOld = () => {};
+</script>
+<style lang="scss" scoped>
+:deep(.el-badge__content.is-dot) {
+	height: 12px;
+	width: 12px;
 }
-</script>
+</style>

+ 0 - 2
src/views/knowledge/config/standard/index.vue

@@ -27,11 +27,9 @@
 import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
 import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
 import { throttle } from '@/utils/tools';
-import { auth } from '@/utils/authFunction';
 import { useRoute } from 'vue-router';
 import { standardInfo, standardUpdate } from '@/api/knowledge/standard';
 import mittBus from '@/utils/mitt';
-import '@wangeditor/editor/dist/css/style.css'; // 引入 css
 
 // 引入组件
 const Editor = defineAsyncComponent(() => import('@/components/Editor/index.vue')); // 富文本编辑器

+ 19 - 4
src/views/knowledge/index/edit.vue

@@ -279,6 +279,8 @@
 										:disable="state.disable"
 										placeholder="请填写知识内容"
 										@blur="isRepeat('content')"
+										:defaultContent="defaultContent"
+										ref="editorRef"
 									/>
 								</el-form-item>
 							</template>
@@ -325,7 +327,7 @@
 </template>
 
 <script setup lang="ts" name="knowledgeEdit">
-import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
+import { defineAsyncComponent, nextTick, onMounted, reactive, ref } from 'vue';
 import type { FormInstance } from 'element-plus';
 import { ElMessage } from 'element-plus';
 import mittBus from '@/utils/mitt';
@@ -418,6 +420,14 @@ const isRepeat = (type: string) => {
 			});
 	}
 };
+// 默认配置
+const defaultContent = ref([
+	{
+		type: "paragraph",
+		children: [ { text: '', fontFamily: '仿宋', fontSize: '20px' },],
+		lineHeight: '1',
+	},
+])
 // 展示编写规范
 const KnowledgeStandardRef = ref<RefType>();
 const showStandard = () => {
@@ -591,12 +601,14 @@ const getKnowledgeType = async () => {
 		state.typeData = typeDataRes.result ?? [];
 		state.knowledgeOptions = knowledgeOptionsRes.result ?? [];
 		orgsOptions.value = orgsOptionsRes.result ?? [];
-		await getDetail();
+
 		state.loading = false;
 	} catch (error) {
+		console.log(error)
 		state.loading = false;
 	}
 };
+const editorRef = ref<RefType>();
 const getDetail = async () => {
 	if (route.params.id) {
 		const res: any = await KnowledgeInfo(route.params.id); //知识详情
@@ -611,9 +623,12 @@ const getDetail = async () => {
 			state.ruleForm.keywordsName = state.ruleForm.keywordsDto.map((item: any) => item.tag).join(',');
 		}
 		state.ruleForm.knowledgeTypeId = state.ruleForm.knowledgeType.map((item: any) => item.knowledgeTypeId);
+
 	}
 };
-onMounted(() => {
-	getKnowledgeType();
+onMounted(async () => {
+	await getKnowledgeType();
+	await nextTick();
+	await getDetail();
 });
 </script>

+ 2 - 2
src/views/knowledge/index/index.vue

@@ -138,8 +138,8 @@
 				</pane>
 				<pane class="h100">
 					<el-tabs v-model="state.queryParams.Status" @tab-change="handleClick" v-loading="state.loading">
-						<el-tab-pane label="全部" name=""></el-tab-pane>
 						<el-tab-pane :label="v.value" :name="v.key" v-for="(v, i) in state.statusOptions" :key="i"></el-tab-pane>
+						<el-tab-pane label="全部" name=""></el-tab-pane>
 					</el-tabs>
 					<ProTable
 						ref="proTableRef"
@@ -400,7 +400,7 @@ const state = reactive<any>({
 		PageIndex: 1, //页码
 		PageSize: 20, //每页条数
 		Keyword: null, //关键字
-		Status: '', //状态
+		Status: 3, //状态 默认已上架
 		OrgId: null, //组织机构
 		HotSpotTypeId: null, //热点分类
 		KnowledgeTypeId: null, //知识类型

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 475 - 434
yarn.lock


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác