调整
This commit is contained in:
parent
67bd7644f4
commit
fdb865692e
|
@ -1,7 +1,11 @@
|
|||
<template>
|
||||
<div class="container">
|
||||
<div id="container"></div>
|
||||
<div class="input-card">
|
||||
<div class="input-card-left">
|
||||
<div style="color: red;">tips:双击区域可重新编辑</div>
|
||||
<div style="color: red;">点击新建--左键开始建立停车区--右键完成建立--点击结束编辑才会最终生效</div>
|
||||
</div>
|
||||
<div class="input-card-right">
|
||||
<el-button @click="createPolygon()">新建</el-button>
|
||||
<!-- <el-button @click="polyEditor.open()">开始编辑</el-button> -->
|
||||
<el-button @click="editClose">结束编辑</el-button>
|
||||
|
@ -77,7 +81,7 @@ export default {
|
|||
// 如果需要,也可以清空与多边形相关的其他状态或数据
|
||||
this.coordList = '';
|
||||
this.$emit("mapList", '');
|
||||
|
||||
|
||||
this.$emit("center", '');
|
||||
},
|
||||
changeMapStyle() {
|
||||
|
@ -186,9 +190,9 @@ export default {
|
|||
let center = calculateCenter(mapList);
|
||||
console.log(mapList,'mapListmapList');
|
||||
that.$emit("mapList", mapList);
|
||||
|
||||
|
||||
that.$emit("center", center);
|
||||
|
||||
|
||||
});
|
||||
polyEditor.close();
|
||||
},
|
||||
|
@ -209,10 +213,17 @@ export default {
|
|||
position: relative;
|
||||
border: 1px solid rgb(204, 204, 204);
|
||||
|
||||
.input-card {
|
||||
.input-card-right {
|
||||
position: absolute;
|
||||
bottom: 15px;
|
||||
right: 15px;
|
||||
}
|
||||
.input-card-left {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -83,7 +83,7 @@ Element.Dialog.props.closeOnClickModal.default = false;
|
|||
*/
|
||||
|
||||
Vue.use(Element, {
|
||||
size: Cookies.get('size') || 'medium' // set element-ui default size
|
||||
size: Cookies.get('size') || 'mini' // set element-ui default size
|
||||
})
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
|
|
@ -310,11 +310,11 @@
|
|||
<el-input-number v-model="form.error" placeholder="还车误差"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="超出电子围栏多少时长断电(s)" label-width="150">
|
||||
<el-input-number style="width: 50%" v-model="form.outage" placeholder="超出电子围栏多少时长断电(s)"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="超出电子围栏多少时长断电(s)" label-width="150">-->
|
||||
<!-- <el-input-number style="width: 50%" v-model="form.outage" placeholder="超出电子围栏多少时长断电(s)"></el-input-number>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
@ -323,10 +323,10 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="电子围栏" prop="boundaryStr">
|
||||
<area-map :key="key" v-model="form.boundaryStr" :dataId="form.areaId" :pathList="form.boundaryStr"
|
||||
@center="center" @mapList="mapList" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="电子围栏" prop="boundaryStr">-->
|
||||
<!-- <area-map :key="key" v-model="form.boundaryStr" :dataId="form.areaId" :pathList="form.boundaryStr"-->
|
||||
<!-- @center="center" @mapList="mapList" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="经度" prop="longitude">
|
||||
|
@ -542,6 +542,7 @@ export default {
|
|||
longitude: null,
|
||||
latitude: null,
|
||||
// parkingPoint: null,
|
||||
agreement: undefined,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
status: '1',
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-show="form.type =='1' ">
|
||||
<el-form-item label="图片" prop="picture" >
|
||||
<el-form-item label="周边环境图片" prop="picture" >
|
||||
<image-upload v-model="form.picture"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -159,7 +159,6 @@
|
|||
<el-form-item label="边界" prop="boundaryStr">
|
||||
<area-map :key="key" v-model="form.boundaryStr" :dataId="form.areaId" :pathList="form.boundaryStr" @mapList="mapList" @center="center" />
|
||||
</el-form-item>
|
||||
<!-- <span style="color: red">双击区域可重新编辑</span>-->
|
||||
</el-col>
|
||||
<el-col >
|
||||
<el-col :span="12">
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="上级组织" prop="parentId" >
|
||||
<treeselect v-model="form.parentId" :options="deptOptions" disabled="true" :normalizer="normalizer" placeholder="选择上级运营商" />
|
||||
<treeselect v-model="form.parentId" :options="deptOptions" :disabled="true" :normalizer="normalizer" placeholder="选择上级运营商" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="Mac号" prop="mac">
|
||||
<el-form-item label="SN号" prop="mac">
|
||||
<el-input
|
||||
v-model="queryParams.mac"
|
||||
placeholder="请输入设备Mac号"
|
||||
placeholder="请输入设备SN号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
@ -177,7 +177,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="SN" prop="mac">
|
||||
<el-form-item label="SN" prop="sn">
|
||||
<el-input v-model="form.sn" placeholder="请输入设备SN" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -198,32 +198,22 @@
|
|||
<el-input v-model="form.vehicleNum" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="二维码" prop="picture">
|
||||
<image-upload v-model="form.picture"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="定位" prop="location">-->
|
||||
<!-- <el-input v-model="form.location" placeholder="请输入定位" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="title=='修改设备'">
|
||||
<el-form-item label="剩余电量" prop="remainingPower">
|
||||
<el-input v-model="form.remainingPower" placeholder="请输入剩余电量" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="title=='修改设备'">
|
||||
<el-form-item label="电压" prop="voltage">
|
||||
<el-input v-model="form.voltage" placeholder="请输入剩余电量" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="title=='修改设备'">
|
||||
<el-form-item label="经度" prop="longitude">
|
||||
<el-input v-model="form.longitude" placeholder="请输入经度" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="title=='修改设备'">
|
||||
<el-form-item label="纬度" prop="latitude">
|
||||
<el-input v-model="form.latitude" placeholder="请输入纬度" disabled/>
|
||||
</el-form-item>
|
||||
|
@ -372,6 +362,12 @@ export default {
|
|||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
modelId: [
|
||||
{ required: true, message: "型号不能为空", trigger: "blur" }
|
||||
],
|
||||
sn: [
|
||||
{ required: true, message: "SN不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="id" align="center" prop="ruleId" />
|
||||
<el-table-column label="套餐名称" align="center" prop="name" />
|
||||
<el-table-column label="说明" align="center" prop="instructions" />
|
||||
<el-table-column label="说明" :show-overflow-tooltip="true" align="center" prop="instructions" />
|
||||
<!-- <el-table-column label="时间(小时)" align="center" prop="time" />
|
||||
<el-table-column label="费用(元)" align="center" prop="fee" /> -->
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
|
@ -450,7 +450,7 @@ export default {
|
|||
cappedAmount: '',
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
this.enablelnterval = false,
|
||||
this.more = { start: '', end: '9999', eachUnit: '', fee: '' }
|
||||
|
@ -610,4 +610,4 @@ export default {
|
|||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -9,14 +9,6 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌商" prop="brand">
|
||||
<el-input
|
||||
v-model="queryParams.brand"
|
||||
placeholder="请输入品牌商"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="运营商" prop="operator">
|
||||
<el-input
|
||||
v-model="queryParams.operator"
|
||||
|
@ -79,14 +71,12 @@
|
|||
|
||||
<el-table v-loading="loading" :data="modelList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="id" align="center" prop="modelId" />-->
|
||||
<el-table-column label="车型" align="center" prop="model" />
|
||||
<el-table-column label="品牌商" align="center" prop="brand" />
|
||||
<el-table-column label="运营商" align="center" prop="operator" />
|
||||
<el-table-column label="满电电压" align="center" prop="fullVoltage" />
|
||||
<el-table-column label="亏电电压" align="center" prop="lowVoltage" />
|
||||
<el-table-column label="满电续航" align="center" prop="fullEndurance" />
|
||||
<el-table-column label="骑行低电量提醒" align="center" prop="lowBatteryReminder" />
|
||||
<el-table-column label="运营商" align="center" prop="operatorName" />
|
||||
<el-table-column label="满电电压(V)" align="center" prop="fullVoltage" />
|
||||
<el-table-column label="亏电电压(V)" align="center" prop="lowVoltage" />
|
||||
<el-table-column label="满电续航(km)" align="center" prop="fullEndurance" />
|
||||
<el-table-column label="骑行低电量提醒(%)" align="center" prop="lowBatteryReminder" />
|
||||
<el-table-column label="已投放车辆" align="center" prop="deviceNum" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
|
@ -123,28 +113,25 @@
|
|||
/>
|
||||
|
||||
<!-- 添加或修改车辆型号对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="车型" prop="model">
|
||||
<el-input v-model="form.model" placeholder="请输入车型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌商" prop="brand">
|
||||
<el-input v-model="form.brand" placeholder="请输入品牌商" />
|
||||
<el-form-item v-if="userName == 'admin'" label="运营商" prop="operator">
|
||||
<treeselect v-model="form.operator" :options="deptOptions" :show-count="true" placeholder="选择上级运营商" />
|
||||
</el-form-item>
|
||||
<el-form-item label="运营商" prop="operator">
|
||||
<el-input v-model="form.operator" placeholder="请输入运营商" />
|
||||
<el-form-item label="满电电压(V)" label-width="90" prop="fullVoltage">
|
||||
<el-input style="width: 85%" v-model="form.fullVoltage" placeholder="请输入满电电压" />
|
||||
</el-form-item>
|
||||
<el-form-item label="满电电压" prop="fullVoltage">
|
||||
<el-input v-model="form.fullVoltage" placeholder="请输入满电电压" />
|
||||
<el-form-item label="亏电电压(V)" label-width="90" prop="lowVoltage">
|
||||
<el-input style="width: 85%" v-model="form.lowVoltage" placeholder="请输入亏电电压" />
|
||||
</el-form-item>
|
||||
<el-form-item label="亏电电压" prop="lowVoltage">
|
||||
<el-input v-model="form.lowVoltage" placeholder="请输入亏电电压" />
|
||||
<el-form-item label="满电续航(KM)" label-width="90" prop="fullEndurance">
|
||||
<el-input style="width: 80%" v-model="form.fullEndurance" placeholder="请输入满电续航" />
|
||||
</el-form-item>
|
||||
<el-form-item label="满电续航" prop="fullEndurance">
|
||||
<el-input v-model="form.fullEndurance" placeholder="请输入满电续航" />
|
||||
</el-form-item>
|
||||
<el-form-item label="骑行低电量提醒" prop="lowBatteryReminder">
|
||||
<el-input v-model="form.lowBatteryReminder" placeholder="请输入骑行低电量提醒" />
|
||||
<el-form-item label="骑行低电量提醒(%)" label-width="120" prop="lowBatteryReminder">
|
||||
<el-input style="width: 78%" v-model="form.lowBatteryReminder" placeholder="请输入骑行低电量提醒" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -157,15 +144,22 @@
|
|||
|
||||
<script>
|
||||
import { listModel, getModel, delModel, addModel, updateModel } from "@/api/system/model";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import { deptTreeSelect } from '@/api/system/user'
|
||||
|
||||
export default {
|
||||
name: "Model",
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 运营商树选项
|
||||
deptOptions: [],
|
||||
userName: undefined,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
|
@ -192,11 +186,36 @@ export default {
|
|||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
model: [
|
||||
{ required: true, message: "车型不能为空", trigger: "blur" }
|
||||
],
|
||||
operator: [
|
||||
{ required: true, message: "运营商不能为空", trigger: "blur" }
|
||||
],
|
||||
fullVoltage: [
|
||||
{ required: true, message: "满电电压不能为空", trigger: "blur" },
|
||||
{ pattern: /^\d+$/, message: '满电电压必须为正整数', trigger: 'blur' }
|
||||
],
|
||||
lowVoltage: [
|
||||
{ required: true, message: "亏电电压不能为空", trigger: "blur" },
|
||||
{ pattern: /^\d+$/, message: '亏电电压必须为正整数', trigger: 'blur' }
|
||||
],
|
||||
fullEndurance: [
|
||||
{ required: true, message: "满电续航不能为空", trigger: "blur" },
|
||||
{ pattern: /^\d+$/, message: '满电续航必须为正整数', trigger: 'blur' }
|
||||
],
|
||||
lowBatteryReminder: [
|
||||
{ required: true, message: "骑行低电量提醒不能为空", trigger: "blur" },
|
||||
{ pattern: /^\d+$/, message: '骑行低电量提醒必须为正整数', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDeptTree();
|
||||
console.log("当前用户信息:",this.$store.state.user.name)
|
||||
this.userName = this.$store.state.user.name;
|
||||
},
|
||||
methods: {
|
||||
/** 查询车辆型号列表 */
|
||||
|
@ -221,6 +240,7 @@ export default {
|
|||
brand: null,
|
||||
operator: null,
|
||||
fullVoltage: null,
|
||||
parentId: undefined,
|
||||
lowVoltage: null,
|
||||
fullEndurance: null,
|
||||
lowBatteryReminder: null,
|
||||
|
@ -248,6 +268,12 @@ export default {
|
|||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 查询运营商下拉树结构 */
|
||||
getDeptTree() {
|
||||
deptTreeSelect().then(response => {
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编码" prop="deviceMac">
|
||||
<el-form-item label="设备SN" prop="sn">
|
||||
<el-input
|
||||
v-model="queryParams.deviceMac"
|
||||
placeholder="请输入设备编码"
|
||||
placeholder="请输入设备SN"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
@ -40,38 +40,6 @@
|
|||
</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="['system:order: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="['system:order: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="['system:order:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
|
@ -87,14 +55,34 @@
|
|||
|
||||
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="订单id" align="center" prop="orderId" />
|
||||
<!-- <el-table-column label="订单id" align="center" prop="orderId" />-->
|
||||
<el-table-column label="区域" align="center" prop="area" />
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" />
|
||||
<el-table-column label="订单号" :show-overflow-tooltip="true" align="center" prop="orderNo" />
|
||||
<el-table-column label="用户" align="center" prop="userName" />
|
||||
<el-table-column label="设备编码" align="center" prop="deviceMac" />
|
||||
<el-table-column label="支付时间" align="center" prop="payTime" width="180">
|
||||
<el-table-column label="设备SN" align="center" prop="sn" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d}') }}</span>
|
||||
<dict-tag :options="dict.type.et_order_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付时间" align="center" prop="payTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始骑行时间" align="center" prop="unlockTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.unlockTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束骑行时间" align="center" prop="returnTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.returnTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付方式" align="center" prop="payType">
|
||||
|
@ -107,15 +95,10 @@
|
|||
<dict-tag :options="dict.type.et_order_type" :value="scope.row.type"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="center" prop="totalFee" />
|
||||
<el-table-column label="金额(元)" align="center" prop="totalFee" />
|
||||
<el-table-column label="备注" align="center" prop="mark" />
|
||||
<el-table-column label="订单时" align="center" prop="duration" />
|
||||
<el-table-column label="订单时长" align="center" prop="duration" :formatter="formatDuration"/>
|
||||
<el-table-column label="距离" align="center" prop="distance" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_order_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
@ -125,13 +108,6 @@
|
|||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:order:edit']"
|
||||
>详情</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- v-hasPermi="['system:order:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -214,6 +190,21 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
formatDuration(row) {
|
||||
const createTime = new Date(row.createTime);
|
||||
const endTime = new Date(row.returnTime);
|
||||
if (!row.returnTime) {
|
||||
return "未结束";
|
||||
}
|
||||
const durationMilliseconds = endTime - createTime;
|
||||
// 计算小时、分钟和秒
|
||||
const hours = Math.floor(durationMilliseconds / (1000 * 60 * 60));
|
||||
const minutes = Math.floor((durationMilliseconds % (1000 * 60 * 60)) / (1000 * 60));
|
||||
const seconds = Math.floor((durationMilliseconds % (1000 * 60)) / 1000); // 取整秒数
|
||||
// 格式化输出
|
||||
const formattedTime = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
|
||||
return formattedTime;
|
||||
},
|
||||
/** 查询订单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
|
|
@ -156,11 +156,8 @@
|
|||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.userId == undefined" label="用户名" prop="userName">
|
||||
<el-form-item label="用户名">
|
||||
<el-input v-model="form.userName" placeholder="请输入用户名" maxlength="30" />
|
||||
<span class="el-form-item__tip" style="width: 100%;">
|
||||
<div>tips:用户名长度在 2 到 20 个字符,用于登录系统,新增后不可修改</div>
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
@ -171,8 +168,11 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机号码" prop="phonenumber">
|
||||
<el-form-item v-if="form.userId == undefined" label="手机号码" prop="phonenumber">
|
||||
<el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />
|
||||
<span class="el-form-item__tip" style="width: 100%;">
|
||||
<div>tips:非常重要!手机号用于分润和登录系统,保存后不可修改</div>
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
@ -326,10 +326,10 @@ export default {
|
|||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
userName: [
|
||||
{ required: true, message: "用户名称不能为空", trigger: "blur" },
|
||||
{ min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
|
||||
],
|
||||
// userName: [
|
||||
// { required: true, message: "用户名称不能为空", trigger: "blur" },
|
||||
// { min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
|
||||
// ],
|
||||
areaId: [
|
||||
{ required: true, message: "请选择运营区", trigger: "blur" }
|
||||
],
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--运营商数据-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<el-col :span="4" :xs="24" v-if="userName == 'admin'">
|
||||
<div class="head-container">
|
||||
<el-input
|
||||
v-model="deptName"
|
||||
|
@ -28,7 +28,7 @@
|
|||
</div>
|
||||
</el-col>
|
||||
<!--用户数据-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-col :span="colSpan" :xs="24">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="用户名称" prop="userName">
|
||||
<el-input
|
||||
|
@ -230,56 +230,6 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.userId == undefined" label="用户名称" prop="userName">
|
||||
<el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
|
||||
<el-input v-model="form.password" placeholder="请输入用户密码" type="password" maxlength="20" show-password/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="用户性别">
|
||||
<el-select v-model="form.sex" placeholder="请选择性别">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_sex"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="岗位">
|
||||
<el-select v-model="form.postIds" multiple placeholder="请选择岗位">
|
||||
<el-option
|
||||
v-for="item in postOptions"
|
||||
:key="item.postId"
|
||||
:label="item.postName"
|
||||
:value="item.postId"
|
||||
:disabled="item.status == 1"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="角色">
|
||||
<el-select v-model="form.roleIds" multiple placeholder="请选择角色">
|
||||
|
@ -293,6 +243,24 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
|
||||
<el-input v-model="form.password" placeholder="请输入用户密码" type="password" maxlength="20" show-password/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
@ -350,8 +318,14 @@ export default {
|
|||
name: "User",
|
||||
dicts: ['sys_normal_disable', 'sys_user_sex'],
|
||||
components: { Treeselect },
|
||||
computed: {
|
||||
colSpan() {
|
||||
return this.userName === 'admin' ? 20 : 24;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userName: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
|
@ -425,13 +399,6 @@ export default {
|
|||
],
|
||||
// 表单校验
|
||||
rules: {
|
||||
userName: [
|
||||
{ required: true, message: "用户名称不能为空", trigger: "blur" },
|
||||
{ min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
|
||||
],
|
||||
nickName: [
|
||||
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: "用户密码不能为空", trigger: "blur" },
|
||||
{ min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' },
|
||||
|
@ -445,6 +412,7 @@ export default {
|
|||
}
|
||||
],
|
||||
phonenumber: [
|
||||
{ required: true, message: "用户昵称不能为空", trigger: "blur" },
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: "请输入正确的手机号码",
|
||||
|
@ -461,6 +429,8 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
console.log("当前用户信息:",this.$store.state.user.name)
|
||||
this.userName = this.$store.state.user.name;
|
||||
this.getList();
|
||||
this.getDeptTree();
|
||||
this.getConfigKey("sys.user.initPassword").then(response => {
|
||||
|
@ -612,6 +582,8 @@ export default {
|
|||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.form.userName = this.form.phonenumber;
|
||||
this.form.userType = '00';
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.userId != undefined) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user