Переглянути джерело

更改主页顶部单位名称

sunyanqiang 3 роки тому
батько
коміт
9f1e7e2a17
3 змінених файлів з 130 додано та 159 видалено
  1. 129 157
      src/views/phone/cabinet/index.vue
  2. 1 1
      src/views/pt.vue
  3. 0 1
      src/views/thought/thoughtPlan/index.vue

+ 129 - 157
src/views/phone/cabinet/index.vue

@@ -1,133 +1,28 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="手机柜编号" prop="number">
-        <el-input
-          v-model="queryParams.number"
-          placeholder="请输入手机柜编号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="手机柜位置" prop="address">
-        <el-input
-          v-model="queryParams.address"
-          placeholder="请输入手机柜位置"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="格子数量" prop="gridNumber">
-        <el-input
-          v-model="queryParams.gridNumber"
-          placeholder="请输入格子数量"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="存放数量" prop="storageQuantity">
-        <el-input
-          v-model="queryParams.storageQuantity"
-          placeholder="请输入存放数量"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="异常数量" prop="exceptionsNumber">
-        <el-input
-          v-model="queryParams.exceptionsNumber"
-          placeholder="请输入异常数量"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="所属单位id" prop="unitId">
-        <el-input
-          v-model="queryParams.unitId"
-          placeholder="请输入所属单位id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="所属单位名称" prop="unitName">
-        <el-input
-          v-model="queryParams.unitName"
-          placeholder="请输入所属单位名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item>
-        <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-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['phone:cabinet:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['phone:cabinet:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['phone:cabinet:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          :loading="exportLoading"
-          @click="handleExport"
-          v-hasPermi="['phone:cabinet:export']"
-        >导出</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table v-loading="loading" :data="cabinetList" @selection-change="handleSelectionChange">
+    <!-- <el-table
+      v-loading="loading"
+      :data="cabinetList"
+      @selection-change="handleSelectionChange"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="主键" align="center" prop="id" />
       <el-table-column label="手机柜编号" align="center" prop="number" />
       <el-table-column label="手机柜位置" align="center" prop="address" />
       <el-table-column label="格子数量" align="center" prop="gridNumber" />
       <el-table-column label="存放数量" align="center" prop="storageQuantity" />
-      <el-table-column label="异常数量" align="center" prop="exceptionsNumber" />
+      <el-table-column
+        label="异常数量"
+        align="center"
+        prop="exceptionsNumber"
+      />
       <el-table-column label="所属单位id" align="center" prop="unitId" />
       <el-table-column label="所属单位名称" align="center" prop="unitName" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -135,27 +30,29 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['phone:cabinet:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['phone:cabinet:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
 
-    <!-- 添加或修改手机柜对话框 -->
+    添加或修改手机柜对话框
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="手机柜编号" prop="number">
@@ -168,10 +65,16 @@
           <el-input v-model="form.gridNumber" placeholder="请输入格子数量" />
         </el-form-item>
         <el-form-item label="存放数量" prop="storageQuantity">
-          <el-input v-model="form.storageQuantity" placeholder="请输入存放数量" />
+          <el-input
+            v-model="form.storageQuantity"
+            placeholder="请输入存放数量"
+          />
         </el-form-item>
         <el-form-item label="异常数量" prop="exceptionsNumber">
-          <el-input v-model="form.exceptionsNumber" placeholder="请输入异常数量" />
+          <el-input
+            v-model="form.exceptionsNumber"
+            placeholder="请输入异常数量"
+          />
         </el-form-item>
         <el-form-item label="所属单位id" prop="unitId">
           <el-input v-model="form.unitId" placeholder="请输入所属单位id" />
@@ -184,12 +87,52 @@
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
-    </el-dialog>
+    </el-dialog> -->
+    <div class="box">
+      <ul class="oneUl">
+        <li>
+          <div class="title">参谋部</div>
+          <table class="table">
+            <tr>
+              <td style="text-align: right; width: 86px">柜子编号</td>
+              <td style="text-align: right; width: 145px">AE302046</td>
+            </tr>
+            <tr>
+              <td>柜子位置</td>
+              <td>值班室门口</td>
+            </tr>
+            <tr>
+              <td>格子数量</td>
+              <td>18 格</td>
+            </tr>
+            <tr>
+              <td>已存放</td>
+              <td>14 格</td>
+            </tr>
+            <tr>
+              <td>异常格子</td>
+              <td>0 格</td>
+            </tr>
+          </table>
+        </li>
+        <li></li>
+        <li></li>
+        <li></li>
+        <li></li>
+      </ul>
+    </div>
   </div>
 </template>
 
 <script>
-import { listCabinet, getCabinet, delCabinet, addCabinet, updateCabinet, exportCabinet } from "@/api/phone/cabinet";
+import {
+  listCabinet,
+  getCabinet,
+  delCabinet,
+  addCabinet,
+  updateCabinet,
+  exportCabinet,
+} from "@/api/phone/cabinet";
 
 export default {
   name: "Cabinet",
@@ -225,13 +168,12 @@ export default {
         storageQuantity: null,
         exceptionsNumber: null,
         unitId: null,
-        unitName: null
+        unitName: null,
       },
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-      }
+      rules: {},
     };
   },
   created() {
@@ -241,7 +183,7 @@ export default {
     /** 查询手机柜列表 */
     getList() {
       this.loading = true;
-      listCabinet(this.queryParams).then(response => {
+      listCabinet(this.queryParams).then((response) => {
         this.cabinetList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -262,7 +204,7 @@ export default {
         storageQuantity: null,
         exceptionsNumber: null,
         unitId: null,
-        unitName: null
+        unitName: null,
       };
       this.resetForm("form");
     },
@@ -278,9 +220,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -291,8 +233,8 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getCabinet(id).then(response => {
+      const id = row.id || this.ids;
+      getCabinet(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改手机柜";
@@ -300,16 +242,16 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updateCabinet(this.form).then(response => {
+            updateCabinet(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addCabinet(this.form).then(response => {
+            addCabinet(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -321,24 +263,54 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除手机柜编号为"' + ids + '"的数据项?').then(function() {
-        return delCabinet(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm("是否确认删除手机柜的数据项?")
+        .then(function () {
+          return delCabinet(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
-      this.$modal.confirm('是否确认导出所有手机柜数据项?').then(() => {
-        this.exportLoading = true;
-        return exportCabinet(queryParams);
-      }).then(response => {
-        this.$download.name(response.msg);
-        this.exportLoading = false;
-      }).catch(() => {});
-    }
-  }
+      this.$modal
+        .confirm("是否确认导出所有手机柜数据项?")
+        .then(() => {
+          this.exportLoading = true;
+          return exportCabinet(queryParams);
+        })
+        .then((response) => {
+          this.$download.name(response.msg);
+          this.exportLoading = false;
+        })
+        .catch(() => {});
+    },
+  },
 };
 </script>
+<style scoped>
+ul {
+  list-style-type: none;
+}
+.oneUl {
+  display: flex;
+}
+.oneUl li {
+  background: url("../../../assets/images/柜子2.png") no-repeat;
+  width: 306px;
+  height: 285px;
+  padding: 22px;
+}
+.title {
+  text-align: center;
+  color: #fff;
+}
+.table {
+  margin-top: 18px;
+  line-height: 32px;
+}
+</style>

+ 1 - 1
src/views/pt.vue

@@ -5,7 +5,7 @@
       <!-- 头部区域 -->
       <div class="tou">
         <div class="yong_hu">
-          <span style="color: ">单位 :</span>
+          <!-- <span style="color: ">单位 :</span> -->
           <span class="span" style="padding-left: 4px">{{ danWie }}</span>
           <span style="color: #00f6ff">用户名 :</span>
           <span style="padding-left: 4px; color: #00f6ff">{{ yongHu }}</span>

+ 0 - 1
src/views/thought/thoughtPlan/index.vue

@@ -1312,7 +1312,6 @@ export default {
 /* 标题弹框 */
 ::v-deep .el-dialog__title {
   color: white;
-  /* border-bottom: 1px solid white; */
 }
 /* 标题下划线 */
 ::v-deep .el-dialog__header {