Prechádzať zdrojové kódy

统计修改,检索修改

asd26269546 1 rok pred
rodič
commit
19ae296409

+ 49 - 3
src/assets/icons/iconfont/demo_index.html

@@ -55,6 +55,18 @@
           <ul class="icon_lists dib-box">
           
             <li class="dib">
+              <span class="icon iconfont">&#xe8b4;</span>
+                <div class="name">iconx_saixuan</div>
+                <div class="code-name">&amp;#xe8b4;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe8b5;</span>
+                <div class="name">iconm_saixuan</div>
+                <div class="code-name">&amp;#xe8b5;</div>
+              </li>
+          
+            <li class="dib">
               <span class="icon iconfont">&#xe8b2;</span>
                 <div class="name">icon_biaoqian2</div>
                 <div class="code-name">&amp;#xe8b2;</div>
@@ -2754,9 +2766,9 @@
 <pre><code class="language-css"
 >@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1685685956827') format('woff2'),
-       url('iconfont.woff?t=1685685956827') format('woff'),
-       url('iconfont.ttf?t=1685685956827') format('truetype');
+  src: url('iconfont.woff2?t=1686554047584') format('woff2'),
+       url('iconfont.woff?t=1686554047584') format('woff'),
+       url('iconfont.ttf?t=1686554047584') format('truetype');
 }
 </code></pre>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -2783,6 +2795,24 @@
         <ul class="icon_lists dib-box">
           
           <li class="dib">
+            <span class="icon iconfont icon-iconx_saixuan"></span>
+            <div class="name">
+              iconx_saixuan
+            </div>
+            <div class="code-name">.icon-iconx_saixuan
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-iconm_saixuan"></span>
+            <div class="name">
+              iconm_saixuan
+            </div>
+            <div class="code-name">.icon-iconm_saixuan
+            </div>
+          </li>
+          
+          <li class="dib">
             <span class="icon iconfont icon-icon_biaoqian2"></span>
             <div class="name">
               icon_biaoqian2
@@ -6834,6 +6864,22 @@
           
             <li class="dib">
                 <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-iconx_saixuan"></use>
+                </svg>
+                <div class="name">iconx_saixuan</div>
+                <div class="code-name">#icon-iconx_saixuan</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-iconm_saixuan"></use>
+                </svg>
+                <div class="name">iconm_saixuan</div>
+                <div class="code-name">#icon-iconm_saixuan</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#icon-icon_biaoqian2"></use>
                 </svg>
                 <div class="name">icon_biaoqian2</div>

+ 11 - 3
src/assets/icons/iconfont/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 3933484 */
-  src: url('iconfont.woff2?t=1685685956827') format('woff2'),
-       url('iconfont.woff?t=1685685956827') format('woff'),
-       url('iconfont.ttf?t=1685685956827') format('truetype');
+  src: url('iconfont.woff2?t=1686554047584') format('woff2'),
+       url('iconfont.woff?t=1686554047584') format('woff'),
+       url('iconfont.ttf?t=1686554047584') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,14 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-iconx_saixuan:before {
+  content: "\e8b4";
+}
+
+.icon-iconm_saixuan:before {
+  content: "\e8b5";
+}
+
 .icon-icon_biaoqian2:before {
   content: "\e8b2";
 }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
src/assets/icons/iconfont/iconfont.js


+ 14 - 0
src/assets/icons/iconfont/iconfont.json

@@ -6,6 +6,20 @@
   "description": "",
   "glyphs": [
     {
+      "icon_id": "35941342",
+      "name": "iconx_saixuan",
+      "font_class": "iconx_saixuan",
+      "unicode": "e8b4",
+      "unicode_decimal": 59572
+    },
+    {
+      "icon_id": "35941343",
+      "name": "iconm_saixuan",
+      "font_class": "iconm_saixuan",
+      "unicode": "e8b5",
+      "unicode_decimal": 59573
+    },
+    {
       "icon_id": "35800526",
       "name": "icon_biaoqian2",
       "font_class": "icon_biaoqian2",

BIN
src/assets/icons/iconfont/iconfont.ttf


BIN
src/assets/icons/iconfont/iconfont.woff


BIN
src/assets/icons/iconfont/iconfont.woff2


+ 139 - 68
src/components/byTable/index.vue

@@ -1,5 +1,4 @@
 <template>
-	
 	<div class="header-actions" v-if="getActionList.length != 0">
 		<div class="overflow-box">
 			<el-button
@@ -15,27 +14,54 @@
 			</el-button>
 		</div>
 	</div>
-	<div class="stat-warp" v-if="statConfig.length != 0">
+	<div class="stat-warp" v-if="statConfig.length != 0" :class="statWarpHeight > 200  && isMore ? 'show-more' : ''">
 		<div class="title">
-			
-			<select v-model="statSelectVal" v-if="statConfig.length > 1">
-				<option :value="index" v-for="(i,index) in statConfig" :key="index">{{i.label}}</option>
+			<select v-model="statSelectVal" v-if="statConfig.length > 1" @change="changeStatData">
+				<option
+					:value="index"
+					v-for="(i, index) in statConfig"
+					:key="index"
+					
+				>
+					{{ i.label }}
+				</option>
 			</select>
-			<div v-if="statConfig.length === 1">{{statConfig[0].label}}</div>
+			<div v-if="statConfig.length === 1">{{ statConfig[0].label }}</div>
+		</div>
+		<div class="more-btn">
+			<span @click="isMore = !isMore" v-if="statWarpHeight > 200">
+				{{ isMore ? '收起' : '展开' }}
+				<i class="el-icon-arrow-down" :class="isMore ? 'el-icon-arrow-up' : ''"></i>
+			</span>
 		</div>
-		<ul>
-			<li v-show="!i.data" :class="'theme' + i.type" v-for="(i,index) in statConfig[statSelectVal].data" :key='index'>
-				<div class="label">{{i.label}}</div>
+		<ul id="statWarp" >
+			<li
+				v-show="!i.data"
+				:class="'theme' + i.type"
+				v-for="(i, index) in statConfig[statSelectVal].data"
+				:key="index"
+			>
+				<div class="label">{{ i.label }}</div>
 				<div class="num">300000.00</div>
 			</li>
-			<li v-show="i.data" v-for="(i,index) in statConfig[statSelectVal].data" :key='index' class="multi-data">
-				<div class="label">{{i.label}}</div>
+			<li
+				v-show="i.data"
+				v-for="(i, index) in statConfig[statSelectVal].data"
+				:key="index"
+				class="multi-data"
+			>
+				<div class="label">{{ i.label }}</div>
 				<div class="num-warp">
-					<div class="num-box" v-for="(j,jindex) in i.data" :key="jindex">
-						<div class="num-small" :style="'color:' + j.color">{{j.num}}</div>
-						<div class="label-small">{{j.label}}</div>
+					<div
+						class="num-box"
+						v-for="(j, jindex) in i.data"
+						:key="jindex"
+					>
+						<div class="num-small" :style="'color:' + j.color">
+							{{ j.num }}
+						</div>
+						<div class="label-small">{{ j.label }}</div>
 					</div>
-					
 				</div>
 			</li>
 		</ul>
@@ -104,8 +130,12 @@
 					@click="searchFn"
 					>{{ $t('common.search') }}</el-button
 				>
-				<div class="more-icon" @click="retrievalModalFn">
-					<img src="@/assets/images/iconm_xiangyzk.png" alt="" />
+				<div
+					class="more-icon"
+					@click="retrievalModalFn"
+					v-if="$attrs.onMoreSearch"
+				>
+					<i class="iconfont icon-iconx_saixuan"></i>
 				</div>
 			</div>
 		</div>
@@ -198,14 +228,16 @@
 import { isFunction as isFn, isBoolean } from './type'
 import ElementsMapping from './ElementsMapping'
 import ComponentsMapping from './ComponentsMapping'
-import { computed, defineComponent, getCurrentInstance, ref } from 'vue'
+import { computed, defineComponent, getCurrentInstance, ref,watch } from 'vue'
 import expand from './expand'
+
 export default defineComponent({
 	name: 'Table',
 	components: {
 		ElementsMapping,
 		ComponentsMapping,
 	},
+	
 	props: {
 		hideSearch: {
 			type: Boolean,
@@ -318,6 +350,7 @@ export default defineComponent({
 		//   default: true,
 		// },
 	},
+	
 	setup(props) {
 		const { proxy } = getCurrentInstance()
 		const selectConfigCopy = computed(() => {
@@ -326,6 +359,18 @@ export default defineComponent({
 				return item
 			})
 		})
+		let isMore = ref(true)
+		const changeStatData = () => {
+			statWarpHeight.value = document.getElementById('statWarp').offsetHeight
+			console.log(statWarpHeight.value)
+		}
+		let statWarpHeight = ref(0)
+		watch(proxy.statConfig,(newValue,oldValue)=>{
+			setTimeout(() => {
+				//获取statWarp的height
+				statWarpHeight.value = document.getElementById('statWarp').offsetHeight
+			}, 100);
+		},{immediate:true})
 		let statSelectVal = ref(0)
 		const retrievalModal = ref(false)
 		console.log(selectConfigCopy)
@@ -409,7 +454,9 @@ export default defineComponent({
 			)
 		}
 		const retrievalModalFn = () => {
+			console.log(proxy.$attrs)
 			proxy.$emit('moreSearch', '')
+			//获取父组件定义的moreSearch方法
 		}
 		const handlePageChange = (val) => {
 			proxy.$emit(
@@ -494,7 +541,10 @@ export default defineComponent({
 			isSelectable,
 			retrievalModal,
 			retrievalModalFn,
-			statSelectVal
+			statSelectVal,
+			statWarpHeight,
+			isMore,
+			changeStatData
 		}
 	},
 })
@@ -520,119 +570,137 @@ export default defineComponent({
 }
 </style>
 <style lang="scss" scoped>
-.stat-warp{
+.show-more{
+	height: auto!important;
+}
+.stat-warp {
 	margin-bottom: 20px;
 	background: #fff;
 	padding: 0 20px;
-	.title{
+	height: 200px;
+	overflow: hidden;
+	position: relative;
+	.more-btn{
+		position: absolute;
+		right:0;
+		top: 0;
+		width: 40px;
+		height: 30px;
+		cursor: pointer;
+		font-size: 12px;
+		line-height: 30px;
+		text-align: center;
+	}
+	.title {
 		height: 60px;
-		select{
+		select {
 			height: 60px;
-			border:none;
+			border: none;
 			outline: none;
-			-webkit-appearance: none; 
-			appearance: none; 
+			-webkit-appearance: none;
+			appearance: none;
 			font-size: 14px;
 			font-weight: bold;
-			background:url('@/assets/images/sanjiao.png') no-repeat right center; 
+			background: url('@/assets/images/sanjiao.png') no-repeat right
+				center;
 			padding-right: 20px;
 		}
-		div{
+		div {
 			height: 60px;
 			font-size: 14px;
 			font-weight: bold;
 			line-height: 60px;
 		}
 	}
-	ul{
+	ul {
 		padding: 0;
 		overflow: hidden;
 		margin: 0;
-		li{
+		li {
 			list-style: none;
-			min-width: 368px;
+			min-width: 285px;
 			box-sizing: border-box;
-			margin:0 20px 20px 0;
-			background: #EFF6FF;
+			margin: 0 20px 20px 0;
+			background: #eff6ff;
 			float: left;
 			overflow: hidden;
-			padding:20px;
+			padding: 20px;
 			color: #333333;
 			border-radius: 10px;
-			.label{
+			.label {
 				font-size: 14px;
 			}
-			.label::before{
+			.label::before {
 				width: 10px;
 				height: 10px;
 				content: '';
 				border-radius: 50%;
-				background: #0084FF;
+				background: #0084ff;
 				display: inline-block;
 				margin-right: 10px;
 			}
-			.num{
-				margin-top:10px;
+			.num {
+				margin-top: 10px;
 				font-size: 24px;
 				font-weight: bold;
 			}
 		}
 		//#F5F3FF #9E64ED
-		.theme2{
-			background: #F5F3FF;
-			.label::before{
-				background: #9E64ED;
+		.theme2 {
+			background: #f5f3ff;
+			.label::before {
+				background: #9e64ed;
 			}
 		}
 		//#FFF1E1 #FF9315
-		.theme3{
-			background: #FFF1E1;
-			.label::before{
-				background: #FF9315;
+		.theme3 {
+			background: #fff1e1;
+			.label::before {
+				background: #ff9315;
 			}
 		}
 		//#E2FBE8 #39C55A
-		.theme4{
-			background: #E2FBE8;
-			.label::before{
-				background: #39C55A;
+		.theme4 {
+			background: #e2fbe8;
+			.label::before {
+				background: #39c55a;
 			}
 		}
-		.theme5{
-			background: #FFEBE9;
-			.label::before{
-				background: #F94539;
+		.theme5 {
+			background: #ffebe9;
+			.label::before {
+				background: #f94539;
 			}
 		}
-		.theme6{
-			background: #E4F9F9;
-			.label::before{
-				background: #53CBCB;
+		.theme6 {
+			background: #e4f9f9;
+			.label::before {
+				background: #53cbcb;
 			}
 		}
-		.multi-data{
-			.label::before{
+		.multi-data {
+			.label::before {
 				display: none;
 			}
-			.label{
+			.label {
 				font-size: 14px;
 				font-weight: bold;
 				color: #333;
-				margin-bottom:8px;
+				margin-bottom: 8px;
 			}
-			.num-warp{
+			.num-warp {
 				overflow: hidden;
-				.num-box{
+				.num-box {
 					float: left;
 					min-width: 80px;
 					margin-right: 20px;
-					.num-small{
+					.num-small {
 						font-size: 16px;
 						font-weight: bold;
-						margin-bottom:8px;
+						margin-bottom: 8px;
 					}
-					.label-small{
-						color:#666;
+					.label-small {
+						color: #666;
 						font-size: 14px;
 					}
 				}
@@ -647,6 +715,9 @@ export default defineComponent({
 	.more-icon {
 		float: right;
 		cursor: pointer;
+		line-height: 32px;
+		text-align: center;
+		margin-left: 5px;
 	}
 }
 .by-dropdown {

+ 1 - 1
src/layout/components/AppMain.vue

@@ -17,7 +17,7 @@ import iframeToggle from "./IframeToggle/index"
 import useTagsViewStore from '@/store/modules/tagsView'
 
 const tagsViewStore = useTagsViewStore()
-console.log(tagsViewStore)
+console.log(tagsViewStore,12312312)
 </script>
 
 <style lang="scss" scoped>

+ 1 - 1
src/layout/components/TagsView/index.vue

@@ -142,7 +142,7 @@ function initTags() {
 }
 function addTags() {
   const { name } = route
-  console.log(route)
+  console.log(route,123123)
   if (name) {
     useTagsViewStore().addView(route)
     if (route.meta.link) {

+ 0 - 2
src/utils/request.js

@@ -211,7 +211,6 @@ export function get(url, params = {}) {
 
 export function post(url, data = {}, method) {
   return new Promise((resolve, reject) => {
-    console.log(method)
     service({
       method: method || 'post',
       url: url,
@@ -221,7 +220,6 @@ export function post(url, data = {}, method) {
     }).catch(err => {
       reject(err)
     })
-
   })
 }
 

+ 83 - 0
src/views/product/product/index.vue

@@ -36,6 +36,7 @@
           },
         ]"
         @get-list="getList"
+        @moreSearch="retrievalModal = true"
       >
         <template #pic="{ item }">
           <div v-if="item.fileList.length > 0">
@@ -49,6 +50,26 @@
         </template>
       </byTable>
     </div>
+    <el-drawer v-model="retrievalModal" direction="rtl">
+			<template #header>
+				<h4>高级检索</h4>
+			</template>
+			<template #default>
+				<byForm
+					:formConfig="formConfig2"
+					:formOption="formOption"
+					v-model="sourceList.pagination"
+				>
+					<template #slot> 可自定义所需功能 </template>
+				</byForm>
+			</template>
+			<template #footer>
+				<div style="flex: auto">
+				<el-button @click="retrievalModal = false">取消</el-button>
+				<el-button type="primary" @click="getList">确认</el-button>
+				</div>
+			</template>
+		</el-drawer>
     <el-dialog
       :title="modalType == 'add' ? '添加' : '编辑'"
       v-model="dialogVisible"
@@ -138,8 +159,14 @@ const sourceList = ref({
     productClassifyId: "",
     keyword: "",
     definition: "1",
+    name:null,
+    customCode:null,
+    barCode:null,
+    englishName:null,
+    customsCode:null,
   },
 });
+const retrievalModal = ref(false);
 let dialogVisible = ref(false);
 let openExcelDialog = ref(false);
 
@@ -376,6 +403,48 @@ const formConfig = computed(() => {
     },
   ];
 });
+const formConfig2 = computed(() => {
+  return [
+    {
+      type: "treeSelect",
+      prop: "productClassifyId",
+      label: "产品分类",
+      data: [],
+    },
+    {
+      type: "select",
+      prop: "type",
+      label: "产品类型",
+      required: true,
+      data: [],
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "产品名称",
+    },
+    {
+      type: "input",
+      prop: "spec",
+      label: "自定义编码",
+    },
+    {
+      type: "input",
+      prop: "barCode",
+      label: "条码编号",
+    },
+    {
+      type: "input",
+      prop: "englishName",
+      label: "英文名",
+    },
+    {
+      type: "input",
+      prop: "customsCode",
+      label: "海关编码",
+    },
+  ];
+});
 const newPassword = () => {
   formData.data.password = generatePassword();
 };
@@ -488,6 +557,12 @@ const getTreeList = () => {
     .then((message) => {
       treeListData.value = message;
       formConfig.value[0].data = message;
+      formConfig2.value[0].data = message;
+      formConfig2.value[0].data.unshift({
+        id: "",
+        label: "全部",
+        children: [],
+      });
     });
 };
 
@@ -543,6 +618,14 @@ const getDict = () => {
       label: x.dictValue,
       value: x.dictKey,
     }));
+    formConfig2.value[1].data = productType.value.map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    formConfig2.value[1].data.unshift({
+      id: "",
+      name: "全部",
+    });
     selectConfig[0].data = productType.value.map((x) => ({
       label: x.dictValue,
       value: x.dictKey,

+ 1 - 1
src/views/publicModule/documentary/index.vue

@@ -288,7 +288,7 @@ const rules = ref({
   type: [{ required: true, message: "请选择跟单类型", trigger: "change" }],
   name: [{ required: true, message: "请输入节点名称", trigger: "blur" }],
   sort: [{ required: true, message: "请输入节点排序", trigger: "blur" }],
-  bind: [{ required: true, message: "请输入绑定功能", trigger: "blur" }],
+  // bind: [{ required: true, message: "请输入绑定功能", trigger: "blur" }],
 });
 const formData = reactive({
   data: {},

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov