achao 1 year ago
parent
commit
bcfb25f7c2

+ 77 - 24
unimall-admin/src/views/gubi/info/index.vue

@@ -93,7 +93,7 @@
                       class="img"
                       class="img"
                       alt=""
                       alt=""
                     >
                     >
-                    <span class="item_name_title">{{ item.typeName }}</span>
+                    <span class="item_name_title">{{ item.secondName }}</span>
                   </div>
                   </div>
                   <div class="item_sort">
                   <div class="item_sort">
                     {{ item.weight }}
                     {{ item.weight }}
@@ -145,7 +145,7 @@
                 <div v-loading="loading" v-for="(item,index) in tertiary" :key="index" class="item_attr">
                 <div v-loading="loading" v-for="(item,index) in tertiary" :key="index" class="item_attr">
                   <div class="item_name_box">
                   <div class="item_name_box">
                     <span class="item_name_title" style="margin-right:20px">{{ item.postion }}</span>
                     <span class="item_name_title" style="margin-right:20px">{{ item.postion }}</span>
-                    <span class="item_name_title">{{ item.typeName }}</span>
+                    <span class="item_name_title">{{ item.typeId }}</span>
                   </div>
                   </div>
                   <div class="item_sort">
                   <div class="item_sort">
                     {{ item.weight }}
                     {{ item.weight }}
@@ -677,20 +677,44 @@ export default {
       //     this.$message.error(res.message);
       //     this.$message.error(res.message);
       //   }
       //   }
       // });
       // });
-      typeList().then(response => {
-        this.makeData(response.data.data)
+      // typeList().then(response => {
+      //   this.makeData(response.data.data)
 
 
-        // this.threeList = response.data.data.items
-        // for(let i =0;i<this.threeList.length;i++){
-        //   if(this.threeList[i].urlPath){
-        //     this.threeList[i].urlPath = this.threeList[i].urlPath.split(',')
-        // }else{
-        //   this.threeList[i].urlPath=[]
-        // }
-        // }
-        // this.total = response.data.data.count
-        // this.loading = false;
-      })
+      //   // this.threeList = response.data.data.items
+      //   // for(let i =0;i<this.threeList.length;i++){
+      //   //   if(this.threeList[i].urlPath){
+      //   //     this.threeList[i].urlPath = this.threeList[i].urlPath.split(',')
+      //   // }else{
+      //   //   this.threeList[i].urlPath=[]
+      //   // }
+      //   // }
+      //   // this.total = response.data.data.count
+      //   // this.loading = false;
+      // })
+      listInfo().then(response => {
+          // this.makeData(response.data.data)
+          this.first = response.data.data.items
+          this.arrList = this.resFormat(this.first) // 搜索一级分类
+          this.loading = false;
+          listSecond({
+            page: 1,
+            limit: 100,
+            typeId: this.first[0].id,
+      },).then(response => {
+          // this.makeData(response.data.data)
+          this.second = response.data.data.items
+          listThree({
+            page: 1,
+            limit: 100,
+            secondId: this.second[0].id,
+      },).then(response => {
+          // this.makeData(response.data.data)
+          this.tertiary = response.data.data.items
+         
+        });
+         
+        });
+        });
     },
     },
     makeData(val) {
     makeData(val) {
       for (let i = 0; i < val.length; i++) {
       for (let i = 0; i < val.length; i++) {
@@ -719,27 +743,56 @@ export default {
       this.searchList(this.first)// 搜素框递归查找分类
       this.searchList(this.first)// 搜素框递归查找分类
     },
     },
     // 分类切换
     // 分类切换
-    tabClass(type, index) { debugger
+    tabClass(type, index) {
       console.log(type, index)
       console.log(type, index)
       if (type == '1') {
       if (type == '1') {
         this.num = index
         this.num = index
         this.selectOneType = this.arrList[index]
         this.selectOneType = this.arrList[index]
         console.log(this.selectOneType)
         console.log(this.selectOneType)
-        console.log(this.first, '一级分类')
+        listSecond({
+            page: 1,
+            limit: 100,
+            typeId: this.selectOneType.id,
+      },).then(response => {
+          // this.makeData(response.data.data)
+          this.sum = 0
+          this.second = response.data.data.items
+          listThree({
+            page: 1,
+            limit: 100,
+            secondId: this.second[0].id,
+      },).then(response => {
+          // this.makeData(response.data.data)
+          this.tertiary = response.data.data.items
+         
+        });
+         
+        });
+        // console.log(this.first, '一级分类')
+
       } else {
       } else {
         this.sum = index
         this.sum = index
         this.selectTwoType = this.second[index]
         this.selectTwoType = this.second[index]
+        listThree({
+            page: 1,
+            limit: 100,
+            secondId: this.selectTwoType.id,
+      },).then(response => {
+          // this.makeData(response.data.data)
+          this.tertiary = response.data.data.items
+         
+        });
       }
       }
-      this.listType()
+      // this.listType()
     },
     },
     listType() { // 分类查找
     listType() { // 分类查找
       debugger
       debugger
-      this.first = this.arrList
-      console.log(this.first, '一级分类')
-      this.second = this.first[this.num] && this.first[this.num].children ? this.first[this.num].children: ''
-      console.log(this.second, '二级分类')
-      this.tertiary = this.second[this.sum] && this.second[this.sum].children ? this.second[this.sum].children :''
-      console.log(this.tertiary, '三级分类')
+      // this.first = this.arrList
+      // console.log(this.first, '一级分类')
+      // this.second = this.first[this.num] && this.first[this.num].children ? this.first[this.num].children: ''
+      // console.log(this.second, '二级分类')
+      // this.tertiary = this.second[this.sum] && this.second[this.sum].children ? this.second[this.sum].children :''
+      // console.log(this.tertiary, '三级分类')
     },
     },
     resFormat(arr) { // 递归查找一级分类
     resFormat(arr) { // 递归查找一级分类
       return arr.map(item => {
       return arr.map(item => {

+ 158 - 27
unimall-admin/src/views/gubi/priceHis/index.vue

@@ -87,6 +87,11 @@
       <el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+        type="primary"
+        size="mini"
+        @click="sx"
+      >筛选</el-button>
       </el-form-item>
       </el-form-item>
     </el-form>
     </el-form>
 
 
@@ -193,10 +198,40 @@
         <el-form-item label="分值id" prop="orderId">
         <el-form-item label="分值id" prop="orderId">
           <el-input v-model="form.orderId" placeholder="请输入分值id" />
           <el-input v-model="form.orderId" placeholder="请输入分值id" />
         </el-form-item> -->
         </el-form-item> -->
-        <el-form-item label="分值" prop="orderId">
-          <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div>
-        
+        <el-form-item label="一级分类" prop="">
+          <!-- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div> -->
+          <el-select v-model="value1" filterable placeholder="请选择" @change="type1" style="width: 100%">
+            <el-option
+              v-for="item in first"
+              :key="item.id"
+              :label="item.typeName"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="二级分类" prop="">
+          <!-- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div> -->
+          <el-select v-model="value2" filterable placeholder="请选择" @change="type2" style="width: 100%">
+            <el-option
+              v-for="item in second"
+              :key="item.id"
+              :label="item.secondName"
+              :value="item.id">
+            </el-option>
+          </el-select>
         </el-form-item>
         </el-form-item>
+        <el-form-item label="三级分类" prop="">
+          <!-- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div> -->
+          <el-select v-model="value3" filterable placeholder="请选择" @change="type33" style="width: 100%">
+            <el-option
+              v-for="item in tertiary"
+              :key="item.id"
+              :label="item.typeId"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+    
         <el-form-item label="时间" prop="collection">
         <el-form-item label="时间" prop="collection">
           <el-date-picker clearable size="small" style="width: 100%"
           <el-date-picker clearable size="small" style="width: 100%"
             v-model="form.collection"
             v-model="form.collection"
@@ -244,7 +279,7 @@
         <el-button @click="cancel">取 消</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
-    <el-dialog title="分值" :visible.sync="dialogFormVisible">
+    <!-- <el-dialog title="分值" :visible.sync="dialogFormVisible">
       <el-form :model="form">
       <el-form :model="form">
         <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
         <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
       </el-form>
       </el-form>
@@ -252,16 +287,67 @@
         <el-button @click="dialogFormVisible = false">取 消</el-button>
         <el-button @click="dialogFormVisible = false">取 消</el-button>
         <el-button type="primary" @click="typeConfirm">确 定</el-button>
         <el-button type="primary" @click="typeConfirm">确 定</el-button>
       </div>
       </div>
+    </el-dialog> -->
+    <el-dialog :visible.sync="dialogFormVisible1" title="分类">
+      
+      <!-- <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"/> -->
+      <div>
+        <div style="margin-bottom:20px">一级分类</div>
+        <el-select v-model="value1" filterable placeholder="请选择" @change="type1">
+          <el-option
+            v-for="item in first"
+            :key="item.id"
+            :label="item.typeName"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </div>
+      <div style="margin-top:20px">
+        <div style="margin-bottom:20px">二级分类</div>
+        <el-select v-model="value2" filterable placeholder="请选择" @change="type2">
+          <el-option
+            v-for="item in second"
+            :key="item.id"
+            :label="item.secondName"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </div>
+      <div style="margin-top:20px">
+        <div style="margin-bottom:20px">三级分类</div>
+        <el-select v-model="value3" filterable placeholder="请选择" @change="type3">
+          <el-option
+            v-for="item in tertiary"
+            :key="item.id"
+            :label="item.typeId"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible1 = false">取 消</el-button>
+        <el-button type="primary" @click="typeConfirm1">确 定</el-button>
+      </div>
     </el-dialog>
     </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, clearCache } from '@/api/gubi/info'
+import { listThree, getThree, delThree, addThree, updateThree, exportThree } from '@/api/gubi/three'
+import { listSecond, getSecond, delSecond, addSecond, updateSecond, exportSecond } from '@/api/gubi/second'
 import { listPriceHis, getPriceHis, delPriceHis, addPriceHis, updatePriceHis, exportPriceHis } from "@/api/gubi/priceHis";
 import { listPriceHis, getPriceHis, delPriceHis, addPriceHis, updatePriceHis, exportPriceHis } from "@/api/gubi/priceHis";
 import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from "@/api/gubi/transaction";
 import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from "@/api/gubi/transaction";
 export default {
 export default {
   data() {
   data() {
     return {
     return {
+      first: [],
+      second:[],
+      tertiary:[],
+      value1: '',
+        value2: '',
+        value3: '',
+      dialogFormVisible1:false,
       defaultProps: {
       defaultProps: {
         children: 'children',
         children: 'children',
         label: 'typeName'
         label: 'typeName'
@@ -313,6 +399,46 @@ export default {
     this.getList();
     this.getList();
   },
   },
   methods: {
   methods: {
+    typeConfirm1() {
+      this.dialogFormVisible1 = false
+      this.handleQuery()
+    },
+    type1(e){
+      this.value2=''
+      this.value3=''
+      console.log(e)
+    listSecond({
+            page: 1,
+            limit: 100,
+            typeId: e,
+      },).then(response => {
+        this.second = response.data.data.items
+
+      });
+    },
+    type2(e){
+      console.log(e)
+      this.value3=''
+      listThree({
+            page: 1,
+            limit: 100,
+            secondId: e,
+      },).then(response => {
+          this.tertiary = response.data.data.items
+         
+        });
+    },
+    type3(e){
+      console.log(e)
+      this.queryParams.orderId = e
+    },
+    type33(e){
+      console.log(e)
+      this.form.orderId = e
+    },
+    sx() {
+      this.dialogFormVisible1 = true
+    },
     handleNodeClick(data) {
     handleNodeClick(data) {
       console.log(data);
       console.log(data);
       this.form.orderId = data.id
       this.form.orderId = data.id
@@ -328,35 +454,38 @@ export default {
     /** 查询价格历史列表 */
     /** 查询价格历史列表 */
     getList() {
     getList() {
       this.loading = true;
       this.loading = true;
+      listInfo().then(response => {
+          this.first = response.data.data.items
+        });
       listPriceHis(this.queryParams).then(response => {
       listPriceHis(this.queryParams).then(response => {
         this.priceHisList = response.data.data.items
         this.priceHisList = response.data.data.items
         this.total = response.data.data.count
         this.total = response.data.data.count
         this.loading = false;
         this.loading = false;
       });
       });
-      typeList().then(response => {
-        this.makeData(response.data.data)
-      });
-    },
-    makeData(val) {
-      for (let i = 0; i < val.length; i++) {
-        if (val[i].children) {
-          for (let j = 0; j < val[i].children.length; j++) {
-            let _obj = val[i].children[j]
-            _obj.typeName = val[i].children[j].secondName
-            val[i].children[j] = _obj
-            if (val[i].children[j].children) {
-              for (let k = 0; k < val[i].children[j].children.length; k++) {
-                let _obj1 = val[i].children[j].children[k]
-                _obj1.typeName = val[i].children[j].children[k].typeId
-                val[i].children[j].children[k] = _obj1
-              }
-            }
-          }
-        }
-      }
-      this.data = val
-      console.log(this.data)
+      // typeList().then(response => {
+      //   this.makeData(response.data.data)
+      // });
     },
     },
+    // makeData(val) {
+    //   for (let i = 0; i < val.length; i++) {
+    //     if (val[i].children) {
+    //       for (let j = 0; j < val[i].children.length; j++) {
+    //         let _obj = val[i].children[j]
+    //         _obj.typeName = val[i].children[j].secondName
+    //         val[i].children[j] = _obj
+    //         if (val[i].children[j].children) {
+    //           for (let k = 0; k < val[i].children[j].children.length; k++) {
+    //             let _obj1 = val[i].children[j].children[k]
+    //             _obj1.typeName = val[i].children[j].children[k].typeId
+    //             val[i].children[j].children[k] = _obj1
+    //           }
+    //         }
+    //       }
+    //     }
+    //   }
+    //   this.data = val
+    //   console.log(this.data)
+    // },
     // 取消按钮
     // 取消按钮
     cancel() {
     cancel() {
       this.open = false;
       this.open = false;
@@ -386,7 +515,9 @@ export default {
     },
     },
     /** 重置按钮操作 */
     /** 重置按钮操作 */
     resetQuery() {
     resetQuery() {
+      this.queryParams.orderId = '';
       this.resetForm("queryForm");
       this.resetForm("queryForm");
+
       this.handleQuery();
       this.handleQuery();
     },
     },
     // 多选框选中数据
     // 多选框选中数据

+ 99 - 16
unimall-admin/src/views/gubi/three/index1.vue

@@ -409,8 +409,30 @@
       </div>
       </div>
     </el-dialog>
     </el-dialog>
     <el-dialog :visible.sync="dialogFormVisible1" title="分类">
     <el-dialog :visible.sync="dialogFormVisible1" title="分类">
-      <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"/>
-
+      
+      <!-- <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"/> -->
+      <div>
+        <div style="margin-bottom:20px">一级分类</div>
+        <el-select v-model="value1" filterable placeholder="请选择" @change="type1">
+          <el-option
+            v-for="item in first"
+            :key="item.id"
+            :label="item.typeName"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </div>
+      <div style="margin-top:20px">
+        <div style="margin-bottom:20px">二级分类</div>
+        <el-select v-model="value2" filterable placeholder="请选择" @change="type2">
+          <el-option
+            v-for="item in second"
+            :key="item.secondName"
+            :label="item.secondName"
+            :value="item.secondName">
+          </el-option>
+        </el-select>
+      </div>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible1 = false">取 消</el-button>
         <el-button @click="dialogFormVisible1 = false">取 消</el-button>
         <el-button type="primary" @click="typeConfirm">确 定</el-button>
         <el-button type="primary" @click="typeConfirm">确 定</el-button>
@@ -420,6 +442,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
+import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, clearCache } from '@/api/gubi/info'
 import { listThree, getThree, delThree, addThree, updateThree, exportThree } from '@/api/gubi/three'
 import { listThree, getThree, delThree, addThree, updateThree, exportThree } from '@/api/gubi/three'
 import { listSecond, getSecond, delSecond, addSecond, updateSecond, exportSecond } from '@/api/gubi/second'
 import { listSecond, getSecond, delSecond, addSecond, updateSecond, exportSecond } from '@/api/gubi/second'
 import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from '@/api/gubi/transaction'
 import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from '@/api/gubi/transaction'
@@ -428,6 +451,26 @@ import { getToken } from '@/utils/auth'
 export default {
 export default {
   data() {
   data() {
     return {
     return {
+      second:[],
+      tertiary:[],
+      first: [{
+          value: '选项1',
+          label: '黄金糕'
+        }, {
+          value: '选项2',
+          label: '双皮奶'
+        }, {
+          value: '选项3',
+          label: '蚵仔煎'
+        }, {
+          value: '选项4',
+          label: '龙须面'
+        }, {
+          value: '选项5',
+          label: '北京烤鸭'
+        }],
+        value1: '',
+        value2: '',
       defaultProps: {
       defaultProps: {
         children: 'children',
         children: 'children',
         label: 'typeName'
         label: 'typeName'
@@ -544,9 +587,48 @@ export default {
         // this.form.pictureUrl = this.form.urlPath[0]
         // this.form.pictureUrl = this.form.urlPath[0]
       }
       }
     },
     },
+    type1(e){
+      this.value2=''
+      console.log(e)
+    listSecond({
+            page: 1,
+            limit: 100,
+            typeId: e,
+      },).then(response => {
+        this.second = response.data.data.items
+
+      });
+    },
+    type2(e){
+      console.log(e)
+      this.queryParams.secondName = e
+    },
     /** 查询分值信息列表 */
     /** 查询分值信息列表 */
     getList() {
     getList() {
       this.loading = true
       this.loading = true
+      listInfo().then(response => {
+          // this.makeData(response.data.data)
+          this.first = response.data.data.items
+      //     listSecond({
+      //       page: 1,
+      //       limit: 100,
+      //       typeId: this.first[0].id,
+      // },).then(response => {
+      //     // this.makeData(response.data.data)
+      //     this.second = response.data.data.items
+      //     listThree({
+      //       page: 1,
+      //       limit: 100,
+      //       secondId: this.second[0].id,
+      // },).then(response => {
+      //     // this.makeData(response.data.data)
+      //     this.tertiary = response.data.data.items
+         
+      //   });
+         
+      //   });
+        });
+
       listSecond(this.queryParams).then(response => {
       listSecond(this.queryParams).then(response => {
         this.secondList = response.data.data.items
         this.secondList = response.data.data.items
 
 
@@ -559,21 +641,22 @@ export default {
         }
         }
         console.log(this.secondList)
         console.log(this.secondList)
         this.total = response.data.data.count
         this.total = response.data.data.count
+        this.loading = false;
       })
       })
-      typeList().then(response => {
-        this.makeData(response.data.data)
-        this.loading = false
-        // this.threeList = response.data.data.items
-        // for(let i =0;i<this.threeList.length;i++){
-        //   if(this.threeList[i].urlPath){
-        //     this.threeList[i].urlPath = this.threeList[i].urlPath.split(',')
-        // }else{
-        //   this.threeList[i].urlPath=[]
-        // }
-        // }
-        // this.total = response.data.data.count
-        // this.loading = false;
-      })
+      // typeList().then(response => {
+      //   this.makeData(response.data.data)
+      //   this.loading = false
+      //   // this.threeList = response.data.data.items
+      //   // for(let i =0;i<this.threeList.length;i++){
+      //   //   if(this.threeList[i].urlPath){
+      //   //     this.threeList[i].urlPath = this.threeList[i].urlPath.split(',')
+      //   // }else{
+      //   //   this.threeList[i].urlPath=[]
+      //   // }
+      //   // }
+      //   // this.total = response.data.data.count
+      //   // this.loading = false;
+      // })
       // listThree(this.queryParams).then(response => {
       // listThree(this.queryParams).then(response => {
       //   this.threeList = response.data.data.items
       //   this.threeList = response.data.data.items
       //   for(let i =0;i<this.threeList.length;i++){
       //   for(let i =0;i<this.threeList.length;i++){

+ 113 - 50
unimall-admin/src/views/gubi/transaction/index.vue

@@ -218,19 +218,42 @@
     <!-- 添加或修改交易记录对话框 -->
     <!-- 添加或修改交易记录对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px">
     <el-dialog :title="title" :visible.sync="open" width="500px">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <!-- <el-form-item label="" prop="companyId">
-          <el-input v-model="form.companyId" placeholder="请输入" />
-        </el-form-item> -->
-        <el-form-item label="分值" prop="orderId">
-          <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div>
-          <!-- <el-select v-model="form.orderId" clearable style="width: 100%" class="filter-item" placeholder="请选择分值" >
-            <el-option v-for="(item,index) in threeList" :key="index" :label="item.typeId" :value="item.id" />
-          </el-select> -->
-          <!-- <el-input v-model="form.orderId" placeholder="请输入分值id" /> -->
+        <el-form-item label="一级分类" prop="">
+          <!-- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div> -->
+          <el-select v-model="value1" filterable placeholder="请选择" @change="type1" style="width: 100%">
+            <el-option
+              v-for="item in first"
+              :key="item.id"
+              :label="item.typeName"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="二级分类" prop="">
+          <!-- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div> -->
+          <el-select v-model="value2" filterable placeholder="请选择" @change="type2" style="width: 100%">
+            <el-option
+              v-for="item in second"
+              :key="item.id"
+              :label="item.secondName"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="三级分类" prop="">
+          <!-- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div> -->
+          <el-select v-model="value3" filterable placeholder="请选择" @change="type33" style="width: 100%">
+            <el-option
+              v-for="item in tertiary"
+              :key="item.id"
+              :label="item.typeId"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="名称" prop="grade">
+          <el-input v-model="form.grade" placeholder="请输入名称" />
         </el-form-item>
         </el-form-item>
-        <!-- <el-form-item label="分值图片" prop="number">
-          <img v-for="item in urlPath" :src="item" width="40">
-        </el-form-item> -->
         <el-form-item label="类目图片" prop="urlPath">
         <el-form-item label="类目图片" prop="urlPath">
           <el-upload
           <el-upload
             :action="uploadPath"
             :action="uploadPath"
@@ -250,9 +273,6 @@
         <el-form-item label="编号" prop="number">
         <el-form-item label="编号" prop="number">
           <el-input v-model="form.number" placeholder="请输入编号" />
           <el-input v-model="form.number" placeholder="请输入编号" />
         </el-form-item>
         </el-form-item>
-        <el-form-item label="分值等级" prop="grade">
-          <el-input v-model="form.grade" placeholder="请输入分值等级" />
-        </el-form-item>
         <el-form-item label="时间" prop="collection">
         <el-form-item label="时间" prop="collection">
           <el-date-picker
           <el-date-picker
             v-model="form.collection"
             v-model="form.collection"
@@ -313,8 +333,39 @@
       </div>
       </div>
     </el-dialog>
     </el-dialog>
     <el-dialog :visible.sync="dialogFormVisible1" title="分类">
     <el-dialog :visible.sync="dialogFormVisible1" title="分类">
-      <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick1"/>
-
+      <div>
+        <div style="margin-bottom:20px">一级分类</div>
+        <el-select v-model="value1" filterable placeholder="请选择" @change="type1">
+          <el-option
+            v-for="item in first"
+            :key="item.id"
+            :label="item.typeName"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </div>
+      <div style="margin-top:20px">
+        <div style="margin-bottom:20px">二级分类</div>
+        <el-select v-model="value2" filterable placeholder="请选择" @change="type2">
+          <el-option
+            v-for="item in second"
+            :key="item.id"
+            :label="item.secondName"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </div>
+      <div style="margin-top:20px">
+        <div style="margin-bottom:20px">三级分类</div>
+        <el-select v-model="value3" filterable placeholder="请选择" @change="type3">
+          <el-option
+            v-for="item in tertiary"
+            :key="item.id"
+            :label="item.typeId"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </div>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible1 = false">取 消</el-button>
         <el-button @click="dialogFormVisible1 = false">取 消</el-button>
         <el-button type="primary" @click="typeConfirm1">确 定</el-button>
         <el-button type="primary" @click="typeConfirm1">确 定</el-button>
@@ -326,11 +377,19 @@
 <script>
 <script>
 import { uploadPath } from '@/api/storage'
 import { uploadPath } from '@/api/storage'
 import { getToken } from '@/utils/auth'
 import { getToken } from '@/utils/auth'
+import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, clearCache } from '@/api/gubi/info'
+import { listSecond, getSecond, delSecond, addSecond, updateSecond, exportSecond } from '@/api/gubi/second'
 import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from '@/api/gubi/transaction'
 import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from '@/api/gubi/transaction'
 import { listThree, getThree, delThree, addThree, updateThree, exportThree } from '@/api/gubi/three'
 import { listThree, getThree, delThree, addThree, updateThree, exportThree } from '@/api/gubi/three'
 export default {
 export default {
   data() {
   data() {
     return {
     return {
+      first: [],
+      second:[],
+      tertiary:[],
+      value1: '',
+        value2: '',
+        value3: '',
       dialogFormVisible1: false,
       dialogFormVisible1: false,
       imgsFileList: [],
       imgsFileList: [],
       uploadPath,
       uploadPath,
@@ -454,9 +513,45 @@ export default {
     selectType() {
     selectType() {
       this.dialogFormVisible = true
       this.dialogFormVisible = true
     },
     },
+    type1(e){
+      this.value2=''
+      this.value3=''
+      console.log(e)
+    listSecond({
+            page: 1,
+            limit: 100,
+            typeId: e,
+      },).then(response => {
+        this.second = response.data.data.items
+
+      });
+    },
+    type2(e){
+      console.log(e)
+      this.value3=''
+      listThree({
+            page: 1,
+            limit: 100,
+            secondId: e,
+      },).then(response => {
+          this.tertiary = response.data.data.items
+         
+        });
+    },
+    type3(e){
+      console.log(e)
+      this.queryParams.orderId = e
+    },
+    type33(e){
+      console.log(e)
+      this.form.orderId = e
+    },
     /** 查询交易记录列表 */
     /** 查询交易记录列表 */
     getList() {
     getList() {
       this.loading = true
       this.loading = true
+      listInfo().then(response => {
+          this.first = response.data.data.items
+        });
       listTransaction(this.queryParams).then(response => {
       listTransaction(this.queryParams).then(response => {
         this.transactionList = response.data.data.items
         this.transactionList = response.data.data.items
         for (let i = 0; i < this.transactionList.length; i++) {
         for (let i = 0; i < this.transactionList.length; i++) {
@@ -469,40 +564,7 @@ export default {
         this.total = response.data.data.count
         this.total = response.data.data.count
         this.loading = false
         this.loading = false
       })
       })
-      typeList().then(response => {
-        this.makeData(response.data.data)
 
 
-        // this.threeList = response.data.data.items
-        // for(let i =0;i<this.threeList.length;i++){
-        //   if(this.threeList[i].urlPath){
-        //     this.threeList[i].urlPath = this.threeList[i].urlPath.split(',')
-        // }else{
-        //   this.threeList[i].urlPath=[]
-        // }
-        // }
-        // this.total = response.data.data.count
-        // this.loading = false;
-      })
-    },
-    makeData(val) {
-      for (let i = 0; i < val.length; i++) {
-        if (val[i].children) {
-          for (let j = 0; j < val[i].children.length; j++) {
-            const _obj = val[i].children[j]
-            _obj.typeName = val[i].children[j].secondName
-            val[i].children[j] = _obj
-            if (val[i].children[j].children) {
-              for (let k = 0; k < val[i].children[j].children.length; k++) {
-                const _obj1 = val[i].children[j].children[k]
-                _obj1.typeName = val[i].children[j].children[k].typeId
-                val[i].children[j].children[k] = _obj1
-              }
-            }
-          }
-        }
-      }
-      this.data = val
-      console.log(this.data)
     },
     },
     // 取消按钮
     // 取消按钮
     cancel() {
     cancel() {
@@ -536,6 +598,7 @@ export default {
     },
     },
     /** 重置按钮操作 */
     /** 重置按钮操作 */
     resetQuery() {
     resetQuery() {
+      this.queryParams.orderId = '';
       this.resetForm('queryForm')
       this.resetForm('queryForm')
       this.handleQuery()
       this.handleQuery()
     },
     },