@@ -220,23 +232,40 @@ watch(asideValue, (newVal) => {
updateComponent(item.key, e)"
+ :is="item.config.component"
+ v-for="(item, index) in showItems"
+ :id="item.key"
+ :key="index"
+ v-model:value="asideValue[item.key]"
+ :label="item.config.label"
+ @update:value="(e) => updateComponent(item.key, e)"
/>
-
+
-
+
@@ -248,7 +277,7 @@ watch(asideValue, (newVal) => {
display: flex;
position: relative;
flex-direction: column;
- background: #FFF;
+ background: #fff;
border: 1px solid #efeff5;
border-radius: 3px;
box-sizing: border-box;
@@ -285,11 +314,17 @@ watch(asideValue, (newVal) => {
right: -20px;
}
- ::v-deep(.n-collapse .n-collapse-item.n-collapse-item--right-arrow-placement .n-collapse-item__header .n-collapse-item-arrow) {
+ ::v-deep(.n-collapse
+ .n-collapse-item.n-collapse-item--right-arrow-placement
+ .n-collapse-item__header
+ .n-collapse-item-arrow) {
margin-left: 8px;
}
- ::v-deep(.n-collapse .n-collapse-item .n-collapse-item__header .n-collapse-item__header-main) {
+ ::v-deep(.n-collapse
+ .n-collapse-item
+ .n-collapse-item__header
+ .n-collapse-item__header-main) {
font-weight: bold;
justify-content: space-between;
}
@@ -302,11 +337,18 @@ watch(asideValue, (newVal) => {
border-top: 0px;
}
- ::v-deep(.n-collapse .n-collapse-item .n-collapse-item__content-wrapper .n-collapse-item__content-inner) {
+ ::v-deep(.n-collapse
+ .n-collapse-item
+ .n-collapse-item__content-wrapper
+ .n-collapse-item__content-inner) {
padding-top: 10px;
}
- ::v-deep(.n-scrollbar > .n-scrollbar-rail.n-scrollbar-rail--vertical > .n-scrollbar-rail__scrollbar, .n-scrollbar + .n-scrollbar-rail.n-scrollbar-rail--vertical > .n-scrollbar-rail__scrollbar) {
+ ::v-deep(.n-scrollbar
+ > .n-scrollbar-rail.n-scrollbar-rail--vertical
+ > .n-scrollbar-rail__scrollbar, .n-scrollbar
+ + .n-scrollbar-rail.n-scrollbar-rail--vertical
+ > .n-scrollbar-rail__scrollbar) {
width: 0px;
}
}
diff --git a/src/views/home/aside/comp/AdvanceFilter.vue b/src/views/home/aside/comp/AdvanceFilter.vue
index 80595df..4c461d5 100644
--- a/src/views/home/aside/comp/AdvanceFilter.vue
+++ b/src/views/home/aside/comp/AdvanceFilter.vue
@@ -156,12 +156,16 @@ const inputHandler = debounce((word) => {
getSearchedList(word);
}, 300);
-function getSearchedList(word) {
+function getSearchedList(word, isScroll = false) {
if (word) {
pagination.pageSize = 300;
- } else {
+ }
+ if (!word) {
pagination.pageSize = 10;
}
+ if (isScroll) {
+ pagination.pageSize = 300;
+ }
ruleForm.keyword = word;
featchList().then((list) => {
let dataArr: FilterEntity[] = [];
@@ -233,9 +237,16 @@ function unFavoriteHandler(event: MouseEvent, item) {
}
}
-const handleScroll= (event)=>{
- console.log(event)
-}
+const handleScroll = (event) => {
+ let timer;
+ if (timer) {
+ clearTimeout(timer);
+ } else {
+ timer = setTimeout(() => {
+ getSearchedList("", true);
+ }, 2000);
+ }
+};
const moveEnd = () => {
unData.value.map((v, index) => {
@@ -438,7 +449,7 @@ const moveEnd = () => {
align-items: center;
}
}
-::v-deep(.wrapper-left-popover .n-form-item){
+::v-deep(.wrapper-left-popover .n-form-item) {
display: block !important;
}
diff --git a/src/views/home/aside/comp/modals/NewFilterModal.vue b/src/views/home/aside/comp/modals/NewFilterModal.vue
index 7b1212e..d1369bc 100644
--- a/src/views/home/aside/comp/modals/NewFilterModal.vue
+++ b/src/views/home/aside/comp/modals/NewFilterModal.vue
@@ -1,105 +1,107 @@
-
+
{{ modalTitle }}
@@ -302,32 +315,61 @@ defineExpose({
-
+
-
+
-
-
-
-
+
@@ -337,15 +379,13 @@ defineExpose({
+
- 添加筛选条件
+ 添加筛选条件
@@ -402,7 +442,7 @@ defineExpose({
position: relative;
&:before {
- background-color: #1980FF;
+ background-color: #1980ff;
content: "";
width: 5px;
border-radius: 2px;
diff --git a/src/views/task/aside/Aside.vue b/src/views/task/aside/Aside.vue
index 9e2ff6e..484c1d2 100644
--- a/src/views/task/aside/Aside.vue
+++ b/src/views/task/aside/Aside.vue
@@ -186,7 +186,8 @@ defineExpose({
-
-
-
@@ -661,6 +604,39 @@ function reloadList() {
margin-left: 6px;
}
}
+ .right {
+ display: flex;
+ align-items: center;
+
+ .btn {
+ width: 118px;
+ height: 36px;
+ background: linear-gradient(135deg, #5b85f8, #3c6cf0);
+ border-radius: 17px;
+ box-shadow: 0px 2px 6px 0px rgba(116, 153, 253, 0.3);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #fff;
+ margin-right: 6px;
+ cursor: pointer;
+ }
+
+ .batch {
+ display: flex;
+ align-items: center;
+
+ .btn-approval {
+ width: 68px;
+ height: 28px;
+ cursor: pointer;
+ }
+
+ .btn-left {
+ margin-left: 16px;
+ }
+ }
+ }
.font {
font-size: 20px;
From 9d433b2e323f9cc01626ee78615efdf10b9ee380 Mon Sep 17 00:00:00 2001
From: liushilong <2224574157@qq.com>
Date: Tue, 2 Apr 2024 11:07:42 +0800
Subject: [PATCH 5/5] =?UTF-8?q?feat:=20=E5=AE=A1=E6=89=B9=E7=8A=B6?=
=?UTF-8?q?=E6=80=81=E5=B1=95=E7=A4=BA=E6=B7=BB=E5=8A=A0=EF=BC=8C=E4=BB=BB?=
=?UTF-8?q?=E5=8A=A1=E5=AE=A1=E6=89=B9=E5=AE=A1=E6=89=B9=E7=8A=B6=E6=80=81?=
=?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=8F=98=E6=9B=B4=EF=BC=8C=E5=AE=8C=E5=96=84?=
=?UTF-8?q?=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/dictionary/index.ts | 11 +++
src/config/final.ts | 6 +-
src/store/modules/dictonary.ts | 37 +++++++-
src/views/home/aside/Aside.vue | 12 +--
.../aside/comp/items/IzApprovalStatus.vue | 77 +++++++++++++++++
.../home/aside/comp/items/Similarity.vue | 60 +++++++------
src/views/home/aside/comp/items/index.ts | 3 +-
src/views/task/modal/CustomFieldModal.vue | 12 ++-
src/views/task/modal/NewFilterModal.vue | 3 +-
.../worksheet/modal/CustomFieldModal.vue | 85 ++++++++++++++-----
10 files changed, 249 insertions(+), 57 deletions(-)
create mode 100644 src/views/home/aside/comp/items/IzApprovalStatus.vue
diff --git a/src/api/dictionary/index.ts b/src/api/dictionary/index.ts
index 23ca588..6968f53 100644
--- a/src/api/dictionary/index.ts
+++ b/src/api/dictionary/index.ts
@@ -377,6 +377,17 @@ export async function getizstatusList() {
url: `/static/admin/web/distionary/bytypecode/izstatus`,
method: 'get',
})
+ return res.data[0].distionaryList
+}
+/**
+ * 获取审核状态字典(任务审核)
+ * @returns
+ */
+export async function getizApprovalStatusList() {
+ const res = await http.request({
+ url: `/static/admin/web/distionary/bytypecode/izApprovalStatus`,
+ method: 'get',
+ })
return res.data[0].distionaryList
}
diff --git a/src/config/final.ts b/src/config/final.ts
index fcc931d..2b6a2e5 100644
--- a/src/config/final.ts
+++ b/src/config/final.ts
@@ -1,5 +1,5 @@
import type { AsideEntity } from './aside'
-import { IzProjectVue, IzStatus, IztaskrromVue, PictureDownloadVue, PlanVue, ReportUserVue, TimeVue, IzCustomname, IzCustomtype, IzVisitcity, IzCustomlevel, IzProjecttype, IzProductVue, IzvisitproVue, IzfirmVue } from '@/views/home/aside/comp/items'
+import { IzApprovalStatus, IzProjectVue, IzStatus, IztaskrromVue, PictureDownloadVue, PlanVue, ReportUserVue, TimeVue, IzCustomname, IzCustomtype, IzVisitcity, IzCustomlevel, IzProjecttype, IzProductVue, IzvisitproVue, IzfirmVue } from '@/views/home/aside/comp/items'
export interface RowData {
id: string
@@ -137,8 +137,8 @@ export const asideTaskMap: Recordable
= {
label: '审批状态',
defaultValue: null,
isDefaultFilter: true,
- key: 'izstatus',
- component: IzStatus, // todo
+ key: 'izApprovalStatus',
+ component: IzApprovalStatus, // todo
},
izuptime: {
label: '提报时间',
diff --git a/src/store/modules/dictonary.ts b/src/store/modules/dictonary.ts
index e54fb1b..c43121e 100644
--- a/src/store/modules/dictonary.ts
+++ b/src/store/modules/dictonary.ts
@@ -1,6 +1,6 @@
import { defineStore } from 'pinia'
import { store } from '@/store'
-import { getBackList, getBusinessList, getIzShowList, getIztaskstatusList, getPictureTypeList, getRegionList, getRejectList, getRelationTypeList, getTFList, getizstatusList } from '@/api/dictionary'
+import { getBackList, getBusinessList, getIzShowList, getIztaskstatusList, getPictureTypeList, getRegionList, getRejectList, getRelationTypeList, getTFList, getizstatusList, getizApprovalStatusList } from '@/api/dictionary'
export interface DictionaryState {
regionList: any
@@ -24,6 +24,7 @@ export interface DictionaryState {
backList: any
relationTypeList: any
izstatusList: any
+ izApprovalStatusList: any
}
export const useDictionaryStore = defineStore({
@@ -50,6 +51,7 @@ export const useDictionaryStore = defineStore({
backList: null,
relationTypeList: null,
izstatusList: null,
+ izApprovalStatusList: null,
}),
getters: {
getRegionList: (state) => {
@@ -100,8 +102,35 @@ export const useDictionaryStore = defineStore({
getizstatus: (state) => {
return state.izstatusList
},
+ getizApprovalStatus: (state) => {
+ return state.izApprovalStatusList
+ }
},
actions: {
+ initData(){
+ this.fetchRegionList();
+ this.fetchPictureTypeList();
+ this.fetchPersionList();
+ this.fetchPlanList();
+ this.fetchTFList();
+ this.fetchIzShowList();
+ this.fetchIzProjectList();
+ this.fetchIztaskrromList();
+ this.fetchIztaskstatusList();
+ this.fetchIzvisitproList();
+ this.fetchIzfirmList();
+ this.fetchIzproductnameList();
+ this.fetchizcustomnameList();
+ this.fetchIzCustomtypeList();
+ this.fetchIzcustomlevelList();
+ this.fetchizizprojecttypeList();
+ this.fetchizvisitcityList();
+ this.fetchRejectList();
+ this.fetchBackList();
+ this.fetchRelationTypeList();
+ this.fetchizstatusListt();
+ this.fetchizApprovalStatusList();
+ },
settfList(config) {
this.tfList = config
},
@@ -231,6 +260,12 @@ export const useDictionaryStore = defineStore({
this.izstatusList = generateOptions2(list, 'codeno', 'name')
return this.izstatusList
},
+ // 审核状态(任务审核模块)
+ async fetchizApprovalStatusList() {
+ const list = await getizApprovalStatusList()
+ this.izApprovalStatusList = generateOptions2(list, 'codeno', 'name')
+ return this.izApprovalStatusList
+ },
},
})
diff --git a/src/views/home/aside/Aside.vue b/src/views/home/aside/Aside.vue
index b395d41..53ba0a7 100644
--- a/src/views/home/aside/Aside.vue
+++ b/src/views/home/aside/Aside.vue
@@ -18,7 +18,7 @@ import { cloneDeep } from 'lodash-es'
const configStore = useConfig()
// 所有左侧模块的值
-const asideValue: Record = reactive({})
+let asideValue: Record = reactive({})
// 左侧某个模块是否显示: 显示需同时满足系统配置和个人配置
const asideVisible: Partial> = reactive({})
// 当前显示的模块,按照数组顺序显示
@@ -165,7 +165,6 @@ function setShowSearch(value: boolean) {
showSearch.value = value
}
const newFilterOk = () => {
- console.log('home', 'newFilterOk',filterModalRef.value);
filterModalRef.value.query(
filterModalRef.value.pagination.page,
filterModalRef.value.pagination.pageSize
@@ -206,13 +205,16 @@ function editFilter(filter: any) {
function updateComponent(key, e) {
console.log("跟新值", key, e);
let tempobj = cloneDeep(asideValue);
- tempobj[key] = e;
- customObjRef.value = tempobj;
- Object.assign(asideValue, tempobj);
+ // tempobj[key] = e;
+ // customObjRef.value = tempobj;
+ // Object.assign(asideValue, tempobj);
+ asideValue[key] = e;
+ customObjRef.value = cloneDeep(asideValue)
}
watch(asideValue, (newVal) => {
console.log("asideValue处理后", newVal);
+ console.log('asideValue--->',asideValue)
configStore.setAsideValue(newVal)
}, { deep: true })
diff --git a/src/views/home/aside/comp/items/IzApprovalStatus.vue b/src/views/home/aside/comp/items/IzApprovalStatus.vue
new file mode 100644
index 0000000..287bc64
--- /dev/null
+++ b/src/views/home/aside/comp/items/IzApprovalStatus.vue
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/home/aside/comp/items/Similarity.vue b/src/views/home/aside/comp/items/Similarity.vue
index 874311e..6b0458f 100644
--- a/src/views/home/aside/comp/items/Similarity.vue
+++ b/src/views/home/aside/comp/items/Similarity.vue
@@ -1,42 +1,46 @@
@@ -45,7 +49,13 @@ function onChange(value: number & number[]) {
-
+
@@ -56,7 +66,7 @@ function onChange(value: number & number[]) {
.wrapper {
padding: 10px;
}
-::v-deep(.n-collapse-item-arrow){
- color: #999999 !important;;
+::v-deep(.n-collapse-item-arrow) {
+ color: #999999 !important;
}
diff --git a/src/views/home/aside/comp/items/index.ts b/src/views/home/aside/comp/items/index.ts
index 7843f5b..22655ea 100644
--- a/src/views/home/aside/comp/items/index.ts
+++ b/src/views/home/aside/comp/items/index.ts
@@ -19,6 +19,7 @@ import RegionVue from './Region.vue'
import ReportUserVue from './ReportUser.vue'
import SimilarityVue from './Similarity.vue'
import TimeVue from './Time.vue'
+import IzApprovalStatus from './IzApprovalStatus.vue'
-export { IzProjecttype, IzStatus, IzVisitcity, IzCustomlevel, IzCustomtype, IzCustomname, IzfirmVue, IzProductVue, IzvisitproVue, IztaskstatusVue, IztaskrromVue, IzProjectVue, PictureDownloadVue, PictureUploadVue, PlaceHolderVue, RegionVue, SimilarityVue, ReportUserVue, PlanVue, PictureTypeVue, TimeVue }
+export { IzProjecttype, IzStatus, IzVisitcity, IzCustomlevel, IzCustomtype, IzCustomname, IzfirmVue, IzProductVue, IzvisitproVue, IztaskstatusVue, IztaskrromVue, IzProjectVue, PictureDownloadVue, PictureUploadVue, PlaceHolderVue, RegionVue, SimilarityVue, ReportUserVue, PlanVue, PictureTypeVue, TimeVue, IzApprovalStatus }
diff --git a/src/views/task/modal/CustomFieldModal.vue b/src/views/task/modal/CustomFieldModal.vue
index 3bb4fd0..db84160 100644
--- a/src/views/task/modal/CustomFieldModal.vue
+++ b/src/views/task/modal/CustomFieldModal.vue
@@ -260,7 +260,17 @@ function removeHandler(id: string) {
offList.value[index].checked = false;
offShowList.value = cloneDeep(offList.value);
}
+const initData = ()=>{
+ offList.value = [];
+ onList.value = [];
+ fixList.value = [];
+ offShowList.value = [];
+ onShowList.value = [];
+ fixShowList.value = [];
+ selectIds.value = [];
+}
const getData = async (type = "") => {
+ initData();
const userStore = useUser();
const userInfo = userStore.getUserInfo;
let res;
@@ -478,7 +488,7 @@ const queryData = (value, type) => {
diff --git a/src/views/task/modal/NewFilterModal.vue b/src/views/task/modal/NewFilterModal.vue
index 56a93ff..5bac79d 100644
--- a/src/views/task/modal/NewFilterModal.vue
+++ b/src/views/task/modal/NewFilterModal.vue
@@ -182,7 +182,8 @@ const operatorOptions = [
const logicOptions = ref([]);
onBeforeMount(() => {
- dicStore.fetchRelationTypeList();
+ // dicStore.fetchRelationTypeList();
+ dicStore.initData();
});
watch(
diff --git a/src/views/worksheet/modal/CustomFieldModal.vue b/src/views/worksheet/modal/CustomFieldModal.vue
index 0bffa8d..8c0c80d 100644
--- a/src/views/worksheet/modal/CustomFieldModal.vue
+++ b/src/views/worksheet/modal/CustomFieldModal.vue
@@ -91,8 +91,15 @@ function generateDefaultList() {
}
const show = ref(false);
-const checkAll = ref(false);
-
+const checkAll = computed(() => {
+ let baseNum = 0;
+ offList.value.map((v) => {
+ if (v.fix) {
+ baseNum += 1;
+ }
+ });
+ return onList.value.length == offList.value.length - baseNum;
+});
function showModal() {
show.value = true;
}
@@ -221,11 +228,22 @@ function removeHandler(id: string) {
});
if (index !== -1) onList.value.splice(index, 1);
- index = offList.value.findIndex(v=>v.id==id);
+ index = offList.value.findIndex((v) => v.id == id);
offList.value[index].checked = false;
}
-onMounted(async () => {
+const initData = () => {
+ offList.value = [];
+ onList.value = [];
+ fixList.value = [];
+ // offShowList.value = [];
+ // onShowList.value = [];
+ // fixShowList.value = [];
+ selectIds.value = [];
+};
+
+const getData = async () => {
+ initData();
const userStore = useUser();
const userInfo = userStore.getUserInfo;
let res;
@@ -249,8 +267,8 @@ onMounted(async () => {
fix: v.isrequired == 2,
checked:
v.isrequired == 2 ||
- Boolean(userFieldFixed?.find(v2=>v2==v.name)) ||
- Boolean(userFieldUnFixed?.find(v2=>v2==v.name))
+ Boolean(userFieldFixed?.find((v2) => v2 == v.name)) ||
+ Boolean(userFieldUnFixed?.find((v2) => v2 == v.name)),
};
if (item.fix) {
fixList.value.push(item);
@@ -274,8 +292,23 @@ onMounted(async () => {
}
}
});
- console.log(offList.value,'offList.value');
- console.log(useList, 'useList');
+};
+
+onMounted(async () => {
+ getData();
+});
+
+const indeterminate = computed(() => {
+ let baseNum = 0;
+ offList.value.map((v) => {
+ if (v.fix) {
+ baseNum += 1;
+ }
+ });
+ return (
+ onList.value.length > 0 &&
+ offList.value.length - baseNum > onList.value.length
+ );
});
@@ -311,11 +344,12 @@ onMounted(async () => {
-
+
@@ -377,7 +411,7 @@ onMounted(async () => {
:class="{ fix: item.fix }"
class="cursor-move draggable-item"
>
-
+
{{ item.name }}
{
@@ -484,7 +518,7 @@ onMounted(async () => {
color: #333;
display: flex;
align-items: center;
- border-bottom: 1px solid #E8E8E8;
+ border-bottom: 1px solid #e8e8e8;
}
.disable-check {
@@ -492,9 +526,7 @@ onMounted(async () => {
}
}
-::v-deep(
- .n-card.n-card--content-segmented > .n-card__content:not(:first-child)
- ) {
+::v-deep(.n-card.n-card--content-segmented > .n-card__content:not(:first-child)) {
border: 0px;
}
@@ -502,15 +534,28 @@ onMounted(async () => {
--n-padding-top: 0px;
--n-padding-bottom: 12px;
}
-::v-deep(.n-card > .n-card-header .n-card-header__main){
+::v-deep(.n-card > .n-card-header .n-card-header__main) {
font-weight: lighter !important;
font-size: 14px;
}
-::v-deep(.n-scrollbar){
+::v-deep(.n-scrollbar) {
border-top: none !important;
}
-::v-deep(.n-button--info-type){
- background: #507AFD !important;
+::v-deep(.n-button--info-type) {
+ background: #507afd !important;
+}
+::v-deep(.checkAll .n-checkbox.n-checkbox--indeterminate .n-checkbox-box) {
+ background: none;
+ border: none;
+}
+::v-deep(.checkAll .n-checkbox-box__border) {
+ border: 1px solid #e8e8e8 !important;
+}
+::v-deep(.checkAll .n-checkbox-icon) {
+ border: 3px solid #fff;
+ background: #1980ff;
+}
+::v-deep(.checkAll .n-checkbox-icon svg) {
+ display: none !important;
}
-