|
@@ -1,19 +1,19 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column v-if="false" label="自增主键id" align="center" prop="stationId" />
|
|
|
- <el-table-column label="油站名称" align="center" prop="stationName" />
|
|
|
- <el-table-column label="油站地址" align="center" prop="stationAddress" />
|
|
|
+ <el-table-column v-if="false" label="自增主键id" align="center" prop="deptId" />
|
|
|
+ <el-table-column label="油站名称" align="center" prop="deptName" />
|
|
|
+ <el-table-column label="油站地址" align="center" prop="deptAddress" />
|
|
|
<el-table-column label="油枪数量" align="center" prop="oilGunNum" />
|
|
|
<el-table-column label="联系人" align="center" prop="contacts" />
|
|
|
<el-table-column label="电话" align="center" prop="phone" />
|
|
|
<el-table-column v-if="false" label="集团id" align="center" prop="stationGroupId" />
|
|
|
- <el-table-column label="集团名称" align="center" prop="stationGroupName" />
|
|
|
+ <el-table-column v-if="false" label="集团名称" align="center" prop="stationGroupName" />
|
|
|
<el-table-column v-if="false" label="油站照片" align="center" prop="stationPic" />
|
|
|
<el-table-column label="油站经度" align="center" prop="stationLongitude" />
|
|
|
<el-table-column label="油站纬度" align="center" prop="stationLatitude" />
|
|
|
<el-table-column label="商户编码" align="center" prop="mno" />
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column label="操作" align="c--enter" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -40,7 +40,7 @@
|
|
|
<el-form-item label="油站形象照" prop="stationPic">
|
|
|
<el-upload
|
|
|
class="avatar-uploader"
|
|
|
- action="http://www.huijy.net:8083/common/upload"
|
|
|
+ action="http://localhost:8080/common/upload"
|
|
|
:show-file-list="false"
|
|
|
:headers=headers
|
|
|
:on-success="handleAvatarSuccess"
|
|
@@ -49,27 +49,27 @@
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="油站名称" prop="stationName">
|
|
|
- <el-input v-model="form.stationName" placeholder="请输入油站名称" />
|
|
|
+ <el-form-item label="油站名称" prop="deptName">
|
|
|
+ <el-input v-model="form.deptName" placeholder="请输入油站名称" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="油站地址" prop="stationAddress">
|
|
|
- <el-input v-model="form.stationAddress" placeholder="请输入油站地址" />
|
|
|
+ <el-form-item label="油站地址" prop="deptAddress">
|
|
|
+ <el-input v-model="form.deptAddress" placeholder="请输入油站地址" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="油枪数量" prop="oilGunNum">
|
|
|
<el-input v-model="form.oilGunNum" placeholder="请输入油枪数量" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="联系人" prop="contacts">
|
|
|
- <el-input v-model="form.contacts" placeholder="请输入联系人" />
|
|
|
+ <el-form-item label="联系人" prop="leader">
|
|
|
+ <el-input v-model="form.leader" placeholder="请输入联系人" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="电话" prop="phone">
|
|
|
<el-input v-model="form.phone" placeholder="请输入电话" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="集团名称" prop="stationGroupId">
|
|
|
- <treeselect v-model="form.stationGroupId" :options="deptOptions" @select="selectDepart" :show-count="true" placeholder="请选择归属集团" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="集团名称" prop="stationGroupName" v-show="false">
|
|
|
- <el-input v-model="form.stationGroupName" placeholder="请输入所属集团名称" />
|
|
|
- </el-form-item>
|
|
|
+ <!-- <el-form-item label="集团名称" prop="parentId">-->
|
|
|
+ <!-- <treeselect v-model="form.parentId" :options="deptOptions" @select="selectDepart" :show-count="true" placeholder="请选择归属集团" />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="集团名称" prop="stationGroupName" v-show="false">-->
|
|
|
+ <!-- <el-input v-model="form.stationGroupName" placeholder="请输入所属集团名称" />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
<el-form-item label="油站经度" prop="stationLongitude">
|
|
|
<el-input v-model="form.stationLongitude" :disabled="true" placeholder="请输入油站经度" />
|
|
|
</el-form-item>
|
|
@@ -79,6 +79,12 @@
|
|
|
<el-form-item label="商户编码" prop="mno">
|
|
|
<el-input v-model="form.mno" :disabled="true" placeholder="请输入商户编码" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="小程序appid" prop="appId">
|
|
|
+ <el-input v-model="form.appId" :disabled="true" placeholder="小程序appid" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="小程序appSecret" prop="appSecret">
|
|
|
+ <el-input v-model="form.appSecret" :disabled="true" placeholder="小程序appSecret" />
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -124,7 +130,7 @@ export default {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
stationName: null,
|
|
|
- stationAddress: null,
|
|
|
+ deptAddress: null,
|
|
|
oilGunNum: null,
|
|
|
contacts: null,
|
|
|
phone: null,
|
|
@@ -177,9 +183,9 @@ export default {
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
this.form = {
|
|
|
- stationId: null,
|
|
|
- stationName: null,
|
|
|
- stationAddress: null,
|
|
|
+ deptId: null,
|
|
|
+ deptName: null,
|
|
|
+ deptAddress: null,
|
|
|
oilGunNum: null,
|
|
|
contacts: null,
|
|
|
phone: null,
|
|
@@ -217,8 +223,8 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
- const stationId = row.stationId || this.ids
|
|
|
- getInfo(stationId).then(response => {
|
|
|
+ const deptId = row.deptId || this.ids
|
|
|
+ getInfo(deptId).then(response => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.title = "修改油站信息";
|
|
@@ -229,48 +235,42 @@ export default {
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- if (this.form.stationId != null) {
|
|
|
+ if (this.form.deptId != null) {
|
|
|
updateInfo(this.form).then(response => {
|
|
|
this.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
- } else {
|
|
|
- addInfo(this.form).then(response => {
|
|
|
- this.msgSuccess("新增成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- });
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const stationIds = row.stationId || this.ids;
|
|
|
+ const stationIds = row.deptId || this.ids;
|
|
|
this.$confirm('是否确认删除油站信息编号为"' + stationIds + '"的数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return delInfo(stationIds);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.msgSuccess("删除成功");
|
|
|
- })
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ return delInfo(stationIds);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|
|
|
this.$confirm('是否确认导出所有油站信息数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return exportInfo(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
- })
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ return exportInfo(queryParams);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ })
|
|
|
},
|
|
|
// 文件提交处理
|
|
|
submitUpload() {
|
|
@@ -280,19 +280,18 @@ export default {
|
|
|
handleFileUploadProgress(event, file, fileList) {
|
|
|
this.upload.isUploading = true;
|
|
|
},
|
|
|
-// 文件上传成功处理
|
|
|
+// 文件上传成功处理++ =
|
|
|
handleFileSuccess(response, file, fileList) {
|
|
|
this.upload.isUploading = false;
|
|
|
this.form.filePath = response.url;
|
|
|
this.msgSuccess(response.msg);
|
|
|
},
|
|
|
handleAvatarSuccess(res, file) {
|
|
|
- console.log("res:",res);
|
|
|
this.form.stationPic = res.url;
|
|
|
},
|
|
|
beforeAvatarUpload(file) {
|
|
|
const isJPG = file.type === 'image/jpeg';
|
|
|
- const isLt2M = file.size / 1024 / 1024 < 5;
|
|
|
+ const isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
if (!isJPG) {
|
|
|
this.$message.error('上传头像图片只能是 JPG 格式!');
|
|
|
}
|