|
@@ -1,15 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
|
|
|
- <el-form-item label="" prop="userId">
|
|
|
|
- <el-input
|
|
|
|
- v-model="queryParams.userId"
|
|
|
|
- placeholder="请输入"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
|
|
|
|
+
|
|
<el-form-item label="编号" prop="numberOrder">
|
|
<el-form-item label="编号" prop="numberOrder">
|
|
<el-input
|
|
<el-input
|
|
v-model="queryParams.numberOrder"
|
|
v-model="queryParams.numberOrder"
|
|
@@ -19,40 +11,6 @@
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="昵称" prop="name">
|
|
|
|
- <el-input
|
|
|
|
- v-model="queryParams.name"
|
|
|
|
- placeholder="请输入昵称"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="电话" prop="phone">
|
|
|
|
- <el-input
|
|
|
|
- v-model="queryParams.phone"
|
|
|
|
- placeholder="请输入电话"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="" prop="gmtUpdate">
|
|
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
|
- v-model="queryParams.gmtUpdate"
|
|
|
|
- type="date"
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
- placeholder="选择">
|
|
|
|
- </el-date-picker>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="" prop="gmtCreate">
|
|
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
|
- v-model="queryParams.gmtCreate"
|
|
|
|
- type="date"
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
- placeholder="选择">
|
|
|
|
- </el-date-picker>
|
|
|
|
- </el-form-item>
|
|
|
|
<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>
|
|
@@ -61,42 +19,13 @@
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- icon="el-icon-plus"
|
|
|
|
- size="mini"
|
|
|
|
- @click="handleAdd"
|
|
|
|
- v-permission="['kouzhao:kouzhaoInfo:add']"
|
|
|
|
- >新增</el-button>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
- <el-button
|
|
|
|
- type="success"
|
|
|
|
- icon="el-icon-edit"
|
|
|
|
- size="mini"
|
|
|
|
- :disabled="single"
|
|
|
|
- @click="handleUpdate"
|
|
|
|
- v-permission="['kouzhao:kouzhaoInfo:edit']"
|
|
|
|
- >修改</el-button>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
- <el-button
|
|
|
|
- type="danger"
|
|
|
|
- icon="el-icon-delete"
|
|
|
|
- size="mini"
|
|
|
|
- :disabled="multiple"
|
|
|
|
- @click="handleDelete"
|
|
|
|
- v-permission="['kouzhao:kouzhaoInfo:remove']"
|
|
|
|
- >删除</el-button>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
- <el-button
|
|
|
|
|
|
+ <!-- <el-button
|
|
|
|
+ v-permission="['kouzhao:kouzhaoInfo:export']"
|
|
type="warning"
|
|
type="warning"
|
|
icon="el-icon-download"
|
|
icon="el-icon-download"
|
|
size="mini"
|
|
size="mini"
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
- v-permission="['kouzhao:kouzhaoInfo:export']"
|
|
|
|
- >导出</el-button>
|
|
|
|
|
|
+ >导出</el-button> -->
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
@@ -122,23 +51,23 @@
|
|
<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
|
|
|
|
+ v-permission="['kouzhao:kouzhaoInfo:edit']"
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
@click="handleUpdate(scope.row)"
|
|
- v-permission="['kouzhao:kouzhaoInfo:edit']"
|
|
|
|
>修改</el-button>
|
|
>修改</el-button>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-permission="['kouzhao:kouzhaoInfo:remove']"
|
|
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-permission="['kouzhao:kouzhaoInfo: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"
|
|
@@ -169,20 +98,24 @@
|
|
<el-input v-model="form.lituUrl" type="textarea" placeholder="请输入内容" />
|
|
<el-input v-model="form.lituUrl" type="textarea" placeholder="请输入内容" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="gmtUpdate">
|
|
<el-form-item label="" prop="gmtUpdate">
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
|
|
|
+ <el-date-picker
|
|
v-model="form.gmtUpdate"
|
|
v-model="form.gmtUpdate"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ style="width: 200px"
|
|
type="date"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
- placeholder="选择">
|
|
|
|
- </el-date-picker>
|
|
|
|
|
|
+ placeholder="选择"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="gmtCreate">
|
|
<el-form-item label="" prop="gmtCreate">
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
|
|
|
+ <el-date-picker
|
|
v-model="form.gmtCreate"
|
|
v-model="form.gmtCreate"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ style="width: 200px"
|
|
type="date"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
- placeholder="选择">
|
|
|
|
- </el-date-picker>
|
|
|
|
|
|
+ placeholder="选择"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -194,7 +127,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { listKouzhaoInfo, getKouzhaoInfo, delKouzhaoInfo, addKouzhaoInfo, updateKouzhaoInfo, exportKouzhaoInfo } from "@/api/kouzhao/kouzhaoInfo";
|
|
|
|
|
|
+import { listKouzhaoInfo, getKouzhaoInfo, delKouzhaoInfo, addKouzhaoInfo, updateKouzhaoInfo, exportKouzhaoInfo } from '@/api/kouzhao/kouzhaoInfo'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -212,7 +145,7 @@ export default {
|
|
// 口罩信息表格数据
|
|
// 口罩信息表格数据
|
|
kouzhaoInfoList: [],
|
|
kouzhaoInfoList: [],
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
- title: "",
|
|
|
|
|
|
+ title: '',
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
open: false,
|
|
open: false,
|
|
// 查询参数
|
|
// 查询参数
|
|
@@ -233,31 +166,31 @@ export default {
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {
|
|
rules: {
|
|
userId: [
|
|
userId: [
|
|
- { required: true, message: "不能为空", trigger: "blur" }
|
|
|
|
- ], gmtUpdate: [
|
|
|
|
- { required: true, message: "不能为空", trigger: "blur" }
|
|
|
|
- ], gmtCreate: [
|
|
|
|
- { required: true, message: "不能为空", trigger: "blur" }
|
|
|
|
- ] }
|
|
|
|
- };
|
|
|
|
|
|
+ { required: true, message: '不能为空', trigger: 'blur' }
|
|
|
|
+ ], gmtUpdate: [
|
|
|
|
+ { required: true, message: '不能为空', trigger: 'blur' }
|
|
|
|
+ ], gmtCreate: [
|
|
|
|
+ { required: true, message: '不能为空', trigger: 'blur' }
|
|
|
|
+ ] }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.getList();
|
|
|
|
|
|
+ this.getList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
/** 查询口罩信息列表 */
|
|
/** 查询口罩信息列表 */
|
|
getList() {
|
|
getList() {
|
|
- this.loading = true;
|
|
|
|
|
|
+ this.loading = true
|
|
listKouzhaoInfo(this.queryParams).then(response => {
|
|
listKouzhaoInfo(this.queryParams).then(response => {
|
|
this.kouzhaoInfoList = response.data.data.items
|
|
this.kouzhaoInfoList = response.data.data.items
|
|
this.total = response.data.data.count
|
|
this.total = response.data.data.count
|
|
- this.loading = false;
|
|
|
|
- });
|
|
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 取消按钮
|
|
// 取消按钮
|
|
cancel() {
|
|
cancel() {
|
|
- this.open = false;
|
|
|
|
- this.reset();
|
|
|
|
|
|
+ this.open = false
|
|
|
|
+ this.reset()
|
|
},
|
|
},
|
|
// 表单重置
|
|
// 表单重置
|
|
reset() {
|
|
reset() {
|
|
@@ -271,18 +204,18 @@ export default {
|
|
lituUrl: undefined,
|
|
lituUrl: undefined,
|
|
gmtUpdate: undefined,
|
|
gmtUpdate: undefined,
|
|
gmtCreate: undefined
|
|
gmtCreate: undefined
|
|
- };
|
|
|
|
- this.resetForm("form");
|
|
|
|
|
|
+ }
|
|
|
|
+ this.resetForm('form')
|
|
},
|
|
},
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
handleQuery() {
|
|
- this.queryParams.pageNum = 1;
|
|
|
|
- this.getList();
|
|
|
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
|
+ this.getList()
|
|
},
|
|
},
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
resetQuery() {
|
|
- this.resetForm("queryForm");
|
|
|
|
- this.handleQuery();
|
|
|
|
|
|
+ this.resetForm('queryForm')
|
|
|
|
+ this.handleQuery()
|
|
},
|
|
},
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
@@ -292,75 +225,75 @@ export default {
|
|
},
|
|
},
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
handleAdd() {
|
|
- this.reset();
|
|
|
|
- this.open = true;
|
|
|
|
- this.title = "添加口罩信息";
|
|
|
|
|
|
+ this.reset()
|
|
|
|
+ this.open = true
|
|
|
|
+ this.title = '添加口罩信息'
|
|
},
|
|
},
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
- this.reset();
|
|
|
|
|
|
+ this.reset()
|
|
const id = row.id || this.ids.join(',')
|
|
const id = row.id || this.ids.join(',')
|
|
getKouzhaoInfo(id).then(response => {
|
|
getKouzhaoInfo(id).then(response => {
|
|
this.form = response.data.data
|
|
this.form = response.data.data
|
|
- this.open = true;
|
|
|
|
- this.title = "修改口罩信息";
|
|
|
|
- });
|
|
|
|
|
|
+ this.open = true
|
|
|
|
+ this.title = '修改口罩信息'
|
|
|
|
+ })
|
|
},
|
|
},
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm: function() {
|
|
submitForm: function() {
|
|
- this.$refs["form"].validate(valid => {
|
|
|
|
|
|
+ this.$refs['form'].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (this.form.id != undefined) {
|
|
if (this.form.id != undefined) {
|
|
updateKouzhaoInfo(this.form).then(response => {
|
|
updateKouzhaoInfo(this.form).then(response => {
|
|
if (response.data) {
|
|
if (response.data) {
|
|
- this.msgSuccess("修改成功");
|
|
|
|
- this.open = false;
|
|
|
|
- this.getList();
|
|
|
|
|
|
+ this.msgSuccess('修改成功')
|
|
|
|
+ this.open = false
|
|
|
|
+ this.getList()
|
|
} else {
|
|
} else {
|
|
- this.msgError(response.msg);
|
|
|
|
|
|
+ this.msgError(response.msg)
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
addKouzhaoInfo(this.form).then(response => {
|
|
addKouzhaoInfo(this.form).then(response => {
|
|
if (response.data) {
|
|
if (response.data) {
|
|
- this.msgSuccess("新增成功");
|
|
|
|
- this.open = false;
|
|
|
|
- this.getList();
|
|
|
|
|
|
+ this.msgSuccess('新增成功')
|
|
|
|
+ this.open = false
|
|
|
|
+ this.getList()
|
|
} else {
|
|
} else {
|
|
- this.msgError(response.msg);
|
|
|
|
|
|
+ this.msgError(response.msg)
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ })
|
|
},
|
|
},
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
const ids = row.id || this.ids.join(',')
|
|
const ids = row.id || this.ids.join(',')
|
|
- this.$confirm('是否确认删除口罩信息编号为"' + ids + '"的数据项?', "警告", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
- }).then(function() {
|
|
|
|
- return delKouzhaoInfo(ids);
|
|
|
|
- }).then(() => {
|
|
|
|
- this.getList();
|
|
|
|
- this.msgSuccess("删除成功");
|
|
|
|
- }).catch(function() {});
|
|
|
|
|
|
+ this.$confirm('是否确认删除口罩信息编号为"' + ids + '"的数据项?', '警告', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(function() {
|
|
|
|
+ return delKouzhaoInfo(ids)
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.getList()
|
|
|
|
+ this.msgSuccess('删除成功')
|
|
|
|
+ }).catch(function() {})
|
|
},
|
|
},
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
handleExport() {
|
|
- const queryParams = this.queryParams;
|
|
|
|
- this.$confirm('是否确认导出所有口罩信息数据项?', "警告", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
- }).then(function() {
|
|
|
|
- return exportKouzhaoInfo(queryParams);
|
|
|
|
- }).then(response => {
|
|
|
|
- this.download(response.data.data);
|
|
|
|
- }).catch(function() {});
|
|
|
|
|
|
+ const queryParams = this.queryParams
|
|
|
|
+ this.$confirm('是否确认导出所有口罩信息数据项?', '警告', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(function() {
|
|
|
|
+ return exportKouzhaoInfo(queryParams)
|
|
|
|
+ }).then(response => {
|
|
|
|
+ this.download(response.data.data)
|
|
|
|
+ }).catch(function() {})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-};
|
|
|
|
-</script>
|
|
|
|
|
|
+}
|
|
|
|
+</script>
|