Browse Source

Merge branch 'master' of http://git.cc-lotus.info/Consumables/admin-cms-two

guhongwei 3 years ago
parent
commit
59cc51c0a6

+ 9 - 21
src/views/menu/apply_examine/index.vue

@@ -3,17 +3,7 @@
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight">
         <el-col :span="24" class="one">
-          <data-table
-            @query="search"
-            :fields="fields"
-            :opera="opera"
-            :data="list"
-            :total="total"
-            @view="toView"
-            :select="true"
-            :selected="selected"
-            @handleSelect="handleSelect"
-          >
+          <data-table @query="search" :fields="fields" :opera="opera" :data="list" :total="total" @view="toView">
             <template #selfbtn>
               <el-button type="primary" size="mini" @click="toExport()">导出</el-button>
             </template>
@@ -28,7 +18,7 @@
     </el-row>
     <e-dialog :dialog="dialog" @toClose="toClose">
       <template slot="info">
-        <form-1 :form="form" v-if="dialog.type == '1'" @toSave="toSave" :statusList="statusList"></form-1>
+        <file-1 :form="exportform" v-if="dialog.type == '1'" @toSave="toSave" :statusList="statusList"></file-1>
         <info-1 :form="form" v-else-if="dialog.type == '2'"></info-1>
       </template>
     </e-dialog>
@@ -43,7 +33,7 @@ export default {
   name: 'index',
   props: {},
   components: {
-    form1: () => import('./parts/form-1.vue'),
+    file1: () => import('./parts/file-1.vue'),
     info1: () => import('./parts/info-1.vue'),
   },
   data: function () {
@@ -68,13 +58,13 @@ export default {
       ],
       // 列表数据总数
       total: 0,
-      // 多选值
-      selected: [],
       //弹框
       dialog: { title: '详细信息', show: false, type: '1' },
       form: { order: [] },
       // 状态
       statusList: apply_status,
+      // 导出
+      exportform: {},
     };
   },
   async created() {
@@ -88,21 +78,19 @@ export default {
       this.$set(this, `form`, data);
       this.dialog = { title: '详细信息', show: true, type: '2', widths: '40%' };
     },
-    // 多选
-    handleSelect(data) {
-      this.$set(this, `selected`, data);
-    },
+
     //导出数据
     async toExport() {
-      console.log(this.selected);
+      this.dialog = { title: '导出条件', show: true, type: '1', widths: '40%' };
     },
-    // 提交保存,创建/修改
+    //导出
     async toSave({ data }) {
       console.log(data);
     },
     //关闭
     toClose() {
       this.form = { order: [] };
+      this.exportform = {};
       this.dialog = { title: '详细信息', show: false, type: '1' };
       this.search();
     },

+ 2 - 2
src/views/menu/apply_examine/parts/form-1.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="form-1">
+  <div id="file-1">
     <el-row>
       <el-col :span="24" class="main">
         <data-form :fields="fields" :data="form" :rules="rules" @save="toSave">
@@ -17,7 +17,7 @@
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
-  name: 'form-1',
+  name: 'file-1',
   props: { form: { type: Object }, statusList: { type: Array } },
   components: {},
   data: function () {

+ 7 - 19
src/views/menu/market_buy/index.vue

@@ -3,18 +3,7 @@
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight">
         <el-col :span="24" class="one">
-          <data-table
-            @query="search"
-            :fields="fields"
-            :opera="opera"
-            :data="list"
-            :total="total"
-            @view="toView"
-            @sign="toSign"
-            :select="true"
-            :selected="selected"
-            @handleSelect="handleSelect"
-          >
+          <data-table @query="search" :fields="fields" :opera="opera" :data="list" :total="total" @view="toView" @sign="toSign">
             <template #selfbtn>
               <el-button type="primary" size="mini" @click="toAdd()">添加</el-button>
               <el-button type="primary" size="mini" @click="toExport()">导出</el-button>
@@ -30,7 +19,7 @@
     </el-row>
     <e-dialog :dialog="dialog" @toClose="toClose">
       <template slot="info">
-        <file-1 :form="form" v-if="dialog.type == '1'" @toSave="toSave" :statusList="statusList"></file-1>
+        <file-1 :form="exportform" v-if="dialog.type == '1'" @toSave="toSave" :statusList="statusList"></file-1>
         <info-1 :form="form" v-else-if="dialog.type == '2'"></info-1>
       </template>
     </e-dialog>
@@ -106,6 +95,8 @@ export default {
       form: { order: [] },
       // 状态
       statusList: buy_status,
+      //导出
+      exportform: {},
     };
   },
   async created() {
@@ -121,17 +112,13 @@ export default {
     },
     //导出数据
     async toExport() {
-      console.log(this.selected);
-    },
-    // 多选
-    handleSelect(data) {
-      this.$set(this, `selected`, data);
+      this.dialog = { title: '导出条件', show: true, type: '1', widths: '40%' };
     },
     // 订单签收
     async toSign({ data }) {
       console.log(data);
     },
-    // 提交保存,创建/修改
+    //导出
     async toSave({ data }) {
       console.log(data);
     },
@@ -142,6 +129,7 @@ export default {
     //关闭
     toClose() {
       this.form = { order: [] };
+      this.exportform = {};
       this.dialog = { title: '详细信息', show: false, type: '1' };
       this.search();
     },

+ 27 - 4
src/views/system/password/index.vue

@@ -1,7 +1,11 @@
 <template>
   <div id="index">
     <el-row>
-      <el-col :span="24" class="main animate__animated animate__backInRight"> test </el-col>
+      <el-col :span="24" class="main animate__animated animate__backInRight">
+        <el-col :span="12">
+          <data-form :fields="fields" :data="form" :rules="rules" @save="toSave"> </data-form>
+        </el-col>
+      </el-col>
     </el-row>
   </div>
 </template>
@@ -13,10 +17,23 @@ export default {
   props: {},
   components: {},
   data: function () {
-    return {};
+    return {
+      fields: [{ label: '新密码', model: 'password', type: 'password' }],
+      // 表单验证
+      rules: {
+        password: [{ required: true, message: '请输入新密码' }],
+      },
+      // 表单object
+      form: {},
+    };
   },
   created() {},
-  methods: {},
+  methods: {
+    // 提交按钮
+    async toSave({ data }) {
+      console.log(data);
+    },
+  },
   computed: {
     ...mapState(['user']),
   },
@@ -33,4 +50,10 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.main {
+  .button {
+    text-align: center;
+  }
+}
+</style>