From f466ae4fdc645c66c9f25e2e4598b9809e2b41af Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期六, 13 一月 2024 22:56:49 +0800
Subject: [PATCH] Merge branch 'master' of http://www.beijingsoft.cn:9090/r/mdc-front

---
 src/container/maintenance/index.vue |  278 ++++++++++++++++++++++++++++---------------------------
 1 files changed, 141 insertions(+), 137 deletions(-)

diff --git a/src/container/maintenance/index.vue b/src/container/maintenance/index.vue
index 85b8941..539be65 100644
--- a/src/container/maintenance/index.vue
+++ b/src/container/maintenance/index.vue
@@ -1,67 +1,52 @@
 <!--
  * @Date: 2024-01-06 17:40:19
  * @LastEditors: Sneed
- * @LastEditTime: 2024-01-13 11:33:27
+ * @LastEditTime: 2024-01-13 22:13:21
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/maintenance/index.vue
 -->
 <template>
     <div class="maintenance">
-        <div class="nav">璁惧淇濆吇/鏃ュ父淇濆吇</div>
-        <List ref="list" url="/component/pageQuery">
+        <div class="nav">璁惧淇濆吇/{{navName}}</div>
+        <List ref="list" url="/maintain/pageQuery">
             <template slot="search">
                 <div class="item">
                     <span>缁熶竴缂栧彿</span>
-                    <el-input class="item-value" v-model="query.no"></el-input>
+                    <el-input class="item-value" v-model="queryInfo.uuid"></el-input>
                 </div>
                 <div class="item">
                     <span>璁惧鍚嶇О</span>
-                    <!-- <el-input class="item-value" v-model="query.no"></el-input> -->
-                    <el-select class="item-value" v-model="query.no" placeholder="璇烽�夋嫨">
-                        <el-option
-                        v-for="item in options"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value">
+                    <el-select class="item-value" v-model="queryInfo.machineName" placeholder="璇烽�夋嫨">
+                        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                         </el-option>
                     </el-select>
                 </div>
                 <div class="item">
                     <span>璁惧鍨嬪彿</span>
-                    <el-input class="item-value" v-model="query.no"></el-input>
+                    <el-input class="item-value" v-model="queryInfo.type"></el-input>
                 </div>
                 <div class="item">
                     <span>璁惧瑙勬牸</span>
-                    <el-input class="item-value" v-model="query.no"></el-input>
+                    <el-input class="item-value" v-model="queryInfo.specification"></el-input>
                 </div>
                 <div class="item">
                     <span>浣跨敤閮ㄩ棬</span>
-                    <el-input class="item-value" v-model="query.no"></el-input>
+                    <el-select class="item-value" v-model="queryInfo.department">
+                        <el-option v-for="item in departmentlist" :key="item.value" :label="item.label" :value="item.value">
+                        </el-option>
+                    </el-select>
                 </div>
                 <div class="item">
                     <span>瀹夎浣嶇疆</span>
-                    <el-input class="item-value" v-model="query.no"></el-input>
+                    <el-input class="item-value" v-model="queryInfo.location"></el-input>
                 </div>
                 <div class="item">
                     <span>璁″垝寮�濮嬫棩鏈�</span>
-                    <!-- <el-input class="item-value" v-model="query.no"></el-input> -->
-                    <el-date-picker
-                        class="item-value"
-                        v-model="query.no"
-                        align="right"
-                        type="date"
-                        placeholder="閫夋嫨鏃ユ湡"
-                        >
+                    <el-date-picker class="item-value" v-model="queryInfo.planStartDate" align="right" type="date" placeholder="閫夋嫨鏃ユ湡">
                     </el-date-picker>
                 </div>
                 <div class="item">
                     <span>璁″垝瀹屾垚鏃ユ湡</span>
-                    <el-date-picker
-                        class="item-value"
-                        v-model="query.no"
-                        align="right"
-                        type="date"
-                        placeholder="閫夋嫨鏃ユ湡"
-                        >
+                    <el-date-picker class="item-value" v-model="queryInfo.planFinishDate" align="right" type="date" placeholder="閫夋嫨鏃ユ湡">
                     </el-date-picker>
                 </div>
                 <div class="item">
@@ -72,124 +57,140 @@
                 </div>
             </template>
             <template slot="table-tool">
-                <el-button type="primary" size="mini" @click="add">娣诲姞</el-button>
+                <el-button type="primary" size="mini" @click="addDevice(1)">娣诲姞</el-button>
             </template>
             <template slot="columns">
-                <el-table-column
+                <!-- <el-table-column
                 type="selection"
                 align="center"
                 width="55">
-            </el-table-column>
-            <el-table-column
-                align="center"
-                label="缁熶竴缂栧彿"
-                prop="uuid">
-            </el-table-column>
-            <el-table-column
-                align="center"
-                label="璁惧鍚嶇О"
-                width="150"
-                :show-overflow-tooltip="true"
-                prop="machineName">
-            </el-table-column>
-            <el-table-column
-                align="center"
-                label="璁惧鍨嬪彿"
-                prop="type">
-            </el-table-column>
-            <el-table-column
-                align="center"
-                label="璁惧瑙勬牸"
-                prop="specification">
-            </el-table-column>
-            <el-table-column
-                align="center"
-                label="浣跨敤鍗曚綅"
-                prop="department">
-            </el-table-column>
-            <el-table-column
-                align="center"
-                label="淇濆吇鑰�"
-                prop="userName">
-            </el-table-column>
-            <el-table-column
-                align="center"
-                label="淇濆吇鍛ㄦ湡"
-                prop="period">
-            </el-table-column>
-            <el-table-column
-                align="center"
-                label="淇濆吇绫诲瀷"
-                prop="style">
-                <template slot-scope="scope">
-                    <span>{{scope.row.style === "1" ? "鏃ュ父淇濆吇" : scope.row.style === "2" ? "涓�绾т繚鍏�" :
-                      scope.row.style === "3" ? "浜岀骇淇濆吇" : "涓夌骇淇濆吇" }}</span>
-                </template>
-            </el-table-column>
-            <el-table-column
-                align="center"
-                width="110"
-                label="鏄惁鍚堟牸"
-                prop="isQualified">
-                <template slot-scope="scope">
-                    <span>{{scope.row.isQualified === "1"? "鍚堟牸" : "涓嶅悎鏍�"}}</span>
-                </template>
-            </el-table-column>
-            <el-table-column
-                align="center"
-                width="120"
-                :show-overflow-tooltip="true"
-                label="璁″垝寮�濮嬫椂闂�">
-                <template slot-scope="scope">
-                    <span v-if="scope.row.startDateFrom">{{scope.row.startDateFrom+ '~' +scope.row.startDateTo}}</span>
-                    <span v-else></span>
-                </template>
-            </el-table-column>
-            <el-table-column
-                align="center"
-                width="120"
-                :show-overflow-tooltip="true"
-                label="璁″垝瀹屾垚鏃堕棿">
-                <template slot-scope="scope">
-                    <span v-if="scope.row.completeDateFrom">{{scope.row.completeDateFrom+ '~' +scope.row.completeDateTo}}</span>
-                    <span v-else></span>
-                </template>
-            </el-table-column>
-            <el-table-column
-                align="center"
-                width="150"
-                :show-overflow-tooltip="true"
-                label="淇濆吇鍐呭涓庡瓨鍦ㄩ棶棰�"
-                prop="detail">
-            </el-table-column>
-            <el-table-column
-                align="center"
-                label="缂栬緫"
-                prop="editor">
-                <template slot-scope="scope">
-                    <el-button size="mini" type="text" @click="addDevice(2,scope.row,$event)">缂栬緫</el-button>
-                    <el-button size="mini" type="text" @click="deleteHandle(2,scope.row)">鍒犻櫎</el-button>
-                </template>
-            </el-table-column>
+            </el-table-column> -->
+                <el-table-column align="center" label="缁熶竴缂栧彿" prop="uuid">
+                </el-table-column>
+                <el-table-column align="center" label="璁惧鍚嶇О" width="150" :show-overflow-tooltip="true" prop="machineName">
+                </el-table-column>
+                <el-table-column align="center" label="璁惧鍨嬪彿" prop="type">
+                </el-table-column>
+                <el-table-column align="center" label="璁惧瑙勬牸" prop="specification">
+                </el-table-column>
+                <el-table-column align="center" label="浣跨敤鍗曚綅" prop="department">
+                </el-table-column>
+                <el-table-column align="center" label="淇濆吇鑰�" prop="userName">
+                </el-table-column>
+                <el-table-column align="center" label="淇濆吇鍛ㄦ湡" prop="period">
+                </el-table-column>
+                <el-table-column align="center" label="淇濆吇绫诲瀷" prop="style">
+                    <template slot-scope="scope">
+                        <span>{{ scope.row.style === "1" ? "鏃ュ父淇濆吇" : scope.row.style === "2" ? "涓�绾т繚鍏�" :
+                            scope.row.style === "3" ? "浜岀骇淇濆吇" : "涓夌骇淇濆吇" }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column align="center" width="110" label="鏄惁鍚堟牸" prop="isQualified">
+                    <template slot-scope="scope">
+                        <span>{{ scope.row.isQualified === "1" ? "鍚堟牸" : "涓嶅悎鏍�" }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column align="center" width="120" :show-overflow-tooltip="true" label="璁″垝寮�濮嬫椂闂�">
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.startDateFrom">{{ scope.row.startDateFrom + '~' + scope.row.startDateTo }}</span>
+                        <span v-else></span>
+                    </template>
+                </el-table-column>
+                <el-table-column align="center" width="120" :show-overflow-tooltip="true" label="璁″垝瀹屾垚鏃堕棿">
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.completeDateFrom">{{ scope.row.completeDateFrom + '~'
+                            + scope.row.completeDateTo }}</span>
+                        <span v-else></span>
+                    </template>
+                </el-table-column>
+                <el-table-column align="center" width="150" :show-overflow-tooltip="true" label="淇濆吇鍐呭涓庡瓨鍦ㄩ棶棰�" prop="detail">
+                </el-table-column>
+                <el-table-column align="center" label="鎿嶄綔" prop="editor">
+                    <template slot-scope="scope">
+                        <el-button size="mini" type="text" @click="addDevice(2, scope.row, $event)">缂栬緫</el-button>
+                        <el-button size="mini" type="text" @click="deleteHandle(2, scope.row)">鍒犻櫎</el-button>
+                    </template>
+                </el-table-column>
             </template>
         </List>
+        <DailyMAddD ref="dailyMAddD" @reflash="submitForm" :departmentlist="departmentlist"></DailyMAddD>
     </div>
 </template>
 <script>
-    import List from '../list/index.vue'
-    export default {
-        components: {
-            List
-        },
-        data () {
-            return {
-                query: {
-                    no: ''
-                },
-                options: [{}]
-            }
+import List from '../list/index.vue'
+import { getUseDpts,getRequest } from '@/api/Api'
+import DailyMAddD from './dailyMAdd.vue'
+export default {
+    components: {
+        List,
+        DailyMAddD
+    },
+    computed: {
+        navName () {
+            let names = ['鏃ュ父淇濆吇','涓�绾�','浜岀骇','涓夌骇']
+            return names[this.$route.params.style-1]
         }
-    }
+    },
+    data() {
+        return {
+            departmentlist: [],
+            options: [],
+            queryInfo: {
+                uuid: '',
+                machineName: '',
+                type: '',
+                specification: '',
+                department: '',
+                location: '',
+                planStartDate: '',
+                planFinishDate: '',
+            },
+            
+        }
+    },
+    mounted() {
+        this.init()
+        this.query()
+    },
+    methods: {
+        init () {
+            // 鏌ヨ浣跨敤閮ㄩ棬
+            getUseDpts().then(res => {
+                this.departmentlist = res.data.map(item => {
+                    return {
+                        value: item.id,
+                        label: item.name
+                    }
+                })
+            })
+        },
+        query() {
+            this.$refs.list.pageQuery(this.queryInfo)
+        },
+        reset() {
+            Object.keys(this.queryInfo).forEach(key => {
+                this.queryInfo[key] = ''
+            })
+        },
+        addDevice(n, row, event) {
+            if (n === 1) {
+                this.$nextTick(() => {
+                    this.$refs.dailyMAddD.init(n)
+                })
+            } else {
+                this.$nextTick(() => {
+                    this.$refs.dailyMAddD.init(n, row)
+                })
+            }
+        },
+        deleteHandle() {
+
+        },
+        submitForm() {
+
+        }
+    },
+}
 </script>
 <style lang="scss">
 .maintenance {
@@ -200,9 +201,11 @@
             border: 1px solid #435F9E;
         }
     }
+
     .el-button--mini {
         background: transparent;
     }
+
     .el-button--primary {
         background-color: transparent;
     }
@@ -219,6 +222,7 @@
 
     .nav {
         padding: 10px 30px;
+        font-size: 14px;
     }
 
     .item {

--
Gitblit v1.9.3