|
@@ -1,133 +1,28 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<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 type="selection" width="55" align="center" />
|
|
<el-table-column label="主键" align="center" prop="id" />
|
|
<el-table-column label="主键" align="center" prop="id" />
|
|
<el-table-column label="手机柜编号" align="center" prop="number" />
|
|
<el-table-column label="手机柜编号" align="center" prop="number" />
|
|
<el-table-column label="手机柜位置" align="center" prop="address" />
|
|
<el-table-column label="手机柜位置" align="center" prop="address" />
|
|
<el-table-column label="格子数量" align="center" prop="gridNumber" />
|
|
<el-table-column label="格子数量" align="center" prop="gridNumber" />
|
|
<el-table-column label="存放数量" align="center" prop="storageQuantity" />
|
|
<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="所属单位id" align="center" prop="unitId" />
|
|
<el-table-column label="所属单位名称" align="center" prop="unitName" />
|
|
<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">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
@@ -135,27 +30,29 @@
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
@click="handleUpdate(scope.row)"
|
|
v-hasPermi="['phone:cabinet:edit']"
|
|
v-hasPermi="['phone:cabinet:edit']"
|
|
- >修改</el-button>
|
|
|
|
|
|
+ >修改</el-button
|
|
|
|
+ >
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
@click="handleDelete(scope.row)"
|
|
v-hasPermi="['phone:cabinet:remove']"
|
|
v-hasPermi="['phone:cabinet:remove']"
|
|
- >删除</el-button>
|
|
|
|
|
|
+ >删除</el-button
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
-
|
|
|
|
|
|
+
|
|
<pagination
|
|
<pagination
|
|
- v-show="total>0"
|
|
|
|
|
|
+ v-show="total > 0"
|
|
:total="total"
|
|
:total="total"
|
|
:page.sync="queryParams.pageNum"
|
|
:page.sync="queryParams.pageNum"
|
|
:limit.sync="queryParams.pageSize"
|
|
:limit.sync="queryParams.pageSize"
|
|
@pagination="getList"
|
|
@pagination="getList"
|
|
/>
|
|
/>
|
|
|
|
|
|
- <!-- 添加或修改手机柜对话框 -->
|
|
|
|
|
|
+ 添加或修改手机柜对话框
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
<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 ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-form-item label="手机柜编号" prop="number">
|
|
<el-form-item label="手机柜编号" prop="number">
|
|
@@ -168,10 +65,16 @@
|
|
<el-input v-model="form.gridNumber" placeholder="请输入格子数量" />
|
|
<el-input v-model="form.gridNumber" placeholder="请输入格子数量" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="存放数量" prop="storageQuantity">
|
|
<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>
|
|
<el-form-item label="异常数量" prop="exceptionsNumber">
|
|
<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>
|
|
<el-form-item label="所属单位id" prop="unitId">
|
|
<el-form-item label="所属单位id" prop="unitId">
|
|
<el-input v-model="form.unitId" placeholder="请输入所属单位id" />
|
|
<el-input v-model="form.unitId" placeholder="请输入所属单位id" />
|
|
@@ -184,12 +87,52 @@
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
</div>
|
|
</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>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<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 {
|
|
export default {
|
|
name: "Cabinet",
|
|
name: "Cabinet",
|
|
@@ -225,13 +168,12 @@ export default {
|
|
storageQuantity: null,
|
|
storageQuantity: null,
|
|
exceptionsNumber: null,
|
|
exceptionsNumber: null,
|
|
unitId: null,
|
|
unitId: null,
|
|
- unitName: null
|
|
|
|
|
|
+ unitName: null,
|
|
},
|
|
},
|
|
// 表单参数
|
|
// 表单参数
|
|
form: {},
|
|
form: {},
|
|
// 表单校验
|
|
// 表单校验
|
|
- rules: {
|
|
|
|
- }
|
|
|
|
|
|
+ rules: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -241,7 +183,7 @@ export default {
|
|
/** 查询手机柜列表 */
|
|
/** 查询手机柜列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- listCabinet(this.queryParams).then(response => {
|
|
|
|
|
|
+ listCabinet(this.queryParams).then((response) => {
|
|
this.cabinetList = response.rows;
|
|
this.cabinetList = response.rows;
|
|
this.total = response.total;
|
|
this.total = response.total;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
@@ -262,7 +204,7 @@ export default {
|
|
storageQuantity: null,
|
|
storageQuantity: null,
|
|
exceptionsNumber: null,
|
|
exceptionsNumber: null,
|
|
unitId: null,
|
|
unitId: null,
|
|
- unitName: null
|
|
|
|
|
|
+ unitName: null,
|
|
};
|
|
};
|
|
this.resetForm("form");
|
|
this.resetForm("form");
|
|
},
|
|
},
|
|
@@ -278,9 +220,9 @@ export default {
|
|
},
|
|
},
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
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() {
|
|
handleAdd() {
|
|
@@ -291,8 +233,8 @@ export default {
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
this.reset();
|
|
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.form = response.data;
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "修改手机柜";
|
|
this.title = "修改手机柜";
|
|
@@ -300,16 +242,16 @@ export default {
|
|
},
|
|
},
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
submitForm() {
|
|
- this.$refs["form"].validate(valid => {
|
|
|
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (this.form.id != null) {
|
|
if (this.form.id != null) {
|
|
- updateCabinet(this.form).then(response => {
|
|
|
|
|
|
+ updateCabinet(this.form).then((response) => {
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.getList();
|
|
this.getList();
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- addCabinet(this.form).then(response => {
|
|
|
|
|
|
+ addCabinet(this.form).then((response) => {
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.getList();
|
|
this.getList();
|
|
@@ -321,24 +263,54 @@ export default {
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
const ids = row.id || this.ids;
|
|
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() {
|
|
handleExport() {
|
|
const queryParams = this.queryParams;
|
|
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>
|
|
</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>
|