|
@@ -2,17 +2,17 @@
|
|
|
<div class="content-box">
|
|
<div class="content-box">
|
|
|
<div class="left">
|
|
<div class="left">
|
|
|
<!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
|
|
<!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
|
|
|
- <span class="cameratxt">车次管理</span>
|
|
|
|
|
|
|
+ <span class="cameratxt">黑名单管理</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="middle">
|
|
<div class="middle">
|
|
|
<div class="filter">
|
|
<div class="filter">
|
|
|
<div class="condition">
|
|
<div class="condition">
|
|
|
- <span>车牌 : </span>
|
|
|
|
|
|
|
+ <span>关键字 : </span>
|
|
|
<el-input
|
|
<el-input
|
|
|
clearable
|
|
clearable
|
|
|
v-model="searchInput.carnumber"
|
|
v-model="searchInput.carnumber"
|
|
|
class="w-50 m-2"
|
|
class="w-50 m-2"
|
|
|
- placeholder="请输入车牌号"
|
|
|
|
|
|
|
+ placeholder="请输入关键字查询"
|
|
|
style="width: 150px"
|
|
style="width: 150px"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
@@ -45,24 +45,6 @@
|
|
|
><el-icon><Refresh /></el-icon><span>重置</span></el-button
|
|
><el-icon><Refresh /></el-icon><span>重置</span></el-button
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- 按钮列表 -->
|
|
|
|
|
- <div class="gongneng">
|
|
|
|
|
- <el-button type="primary" color="rgba(61, 81, 232, 1)" @click="addlist"
|
|
|
|
|
- ><el-icon><CirclePlus /></el-icon><span>新增车次</span></el-button
|
|
|
|
|
- >
|
|
|
|
|
- <!-- <el-button
|
|
|
|
|
- color="rgba(61, 81, 232, 1)"
|
|
|
|
|
- class="import"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- @click="resetInput"
|
|
|
|
|
- ><img
|
|
|
|
|
- src="@/assets/import.png"
|
|
|
|
|
- style="width: 14px; height: 14px; margin-right: 4px"
|
|
|
|
|
- alt=""
|
|
|
|
|
- />
|
|
|
|
|
- <span>导出表单</span></el-button
|
|
|
|
|
- > -->
|
|
|
|
|
- </div>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
<div class="footer">
|
|
<div class="footer">
|
|
|
<el-table
|
|
<el-table
|
|
@@ -78,58 +60,36 @@
|
|
|
>
|
|
>
|
|
|
<!-- <el-table-column align="center" type="selection" width="80" /> -->
|
|
<!-- <el-table-column align="center" type="selection" width="80" /> -->
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
|
|
+ width="150"
|
|
|
align="center"
|
|
align="center"
|
|
|
- prop="car_number"
|
|
|
|
|
- width="180"
|
|
|
|
|
- label="车牌"
|
|
|
|
|
|
|
+ label="序号"
|
|
|
|
|
+ type="index"
|
|
|
|
|
+ index="1"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <el-table-column align="center" prop="user_name" label="姓名" />
|
|
|
|
|
+ <el-table-column align="center" prop="user_phone" label="手机" />
|
|
|
|
|
+ <el-table-column align="center" prop="contain" label="爽约次数" />
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
align="center"
|
|
align="center"
|
|
|
- width="100"
|
|
|
|
|
- prop="contain"
|
|
|
|
|
- label="容量"
|
|
|
|
|
- />
|
|
|
|
|
- <el-table-column align="center " prop="ci_time" label="发车时间" />
|
|
|
|
|
- <el-table-column align="center" prop="route" label="路线" width="200" />
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- align="center"
|
|
|
|
|
- prop="create_time"
|
|
|
|
|
- width="250"
|
|
|
|
|
|
|
+ prop="yy_time"
|
|
|
label="创建时间"
|
|
label="创建时间"
|
|
|
- />
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- align="center"
|
|
|
|
|
- prop="ci_time"
|
|
|
|
|
- label="截止时间"
|
|
|
|
|
- width="120"
|
|
|
|
|
- />
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- align="center"
|
|
|
|
|
width="250"
|
|
width="250"
|
|
|
- prop="work_duration"
|
|
|
|
|
- label="生效日期"
|
|
|
|
|
- />
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- align="center"
|
|
|
|
|
- prop="notice_time"
|
|
|
|
|
- label="提前通知时间"
|
|
|
|
|
- width="100"
|
|
|
|
|
/>
|
|
/>
|
|
|
|
|
+
|
|
|
<el-table-column align="center" label="操作" width="220">
|
|
<el-table-column align="center" label="操作" width="220">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-button link type="primary" @click="edit(scope.row)"
|
|
|
|
|
|
|
+ <!-- <el-button link type="primary" @click="edit(scope.row)"
|
|
|
><div class="look">编辑</div></el-button
|
|
><div class="look">编辑</div></el-button
|
|
|
- >
|
|
|
|
|
|
|
+ > -->
|
|
|
<el-button link type="primary" @click="del(scope.row)"
|
|
<el-button link type="primary" @click="del(scope.row)"
|
|
|
- ><div class="look">删除</div></el-button
|
|
|
|
|
|
|
+ ><div class="look">移出</div></el-button
|
|
|
>
|
|
>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
|
|
<!-- 添加车辆弹窗 -->
|
|
<!-- 添加车辆弹窗 -->
|
|
|
- <el-dialog
|
|
|
|
|
|
|
+ <!-- <el-dialog
|
|
|
class="addStaff"
|
|
class="addStaff"
|
|
|
v-model="addDialogVisible"
|
|
v-model="addDialogVisible"
|
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
@@ -149,90 +109,37 @@
|
|
|
label-position="left"
|
|
label-position="left"
|
|
|
status-icon
|
|
status-icon
|
|
|
>
|
|
>
|
|
|
- <el-form-item label="车牌 :" prop="carnumber">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="ruleForm.carnumber"
|
|
|
|
|
- class="m-2"
|
|
|
|
|
- placeholder="请输入车牌"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option label="赣A11111" value="赣A11111" />
|
|
|
|
|
- <el-option label="赣A22222" value="赣A22222" />
|
|
|
|
|
- <el-option label="赣A33333" value="赣A33333" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="容量 :" prop="contain">
|
|
|
|
|
|
|
+ <el-form-item label="账号 :" prop="account">
|
|
|
<el-input
|
|
<el-input
|
|
|
|
|
+ v-model="ruleForm.account"
|
|
|
|
|
+ placeholder="请输入账号"
|
|
|
clearable
|
|
clearable
|
|
|
- v-model="ruleForm.contain"
|
|
|
|
|
- placeholder="请输入容量"
|
|
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="生效日期 :" prop="workduration">
|
|
|
|
|
- <el-date-picker
|
|
|
|
|
- v-model="ruleForm.workduration"
|
|
|
|
|
- type="daterange"
|
|
|
|
|
- format="YYYY-MM-DD"
|
|
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
|
|
- :prefix-icon="Calendar"
|
|
|
|
|
- start-placeholder="开始时间"
|
|
|
|
|
- end-placeholder="结束时间"
|
|
|
|
|
|
|
+ <el-form-item label="密码 :" prop="pass">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="ruleForm.pass"
|
|
|
|
|
+ placeholder="请输入密码"
|
|
|
|
|
+ clearable
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="发车时间 :" prop="startytime">
|
|
|
|
|
- <!-- <el-time-picker
|
|
|
|
|
- v-model="ruleForm.startytime"
|
|
|
|
|
- format="HH:mm"
|
|
|
|
|
- value-format="HH:mm"
|
|
|
|
|
- placeholder="请选择发车时间"
|
|
|
|
|
- /> -->
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="ruleForm.startytime"
|
|
|
|
|
- class="m-2"
|
|
|
|
|
- placeholder="请选择发车时间"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option label="14:30" value="14:30" />
|
|
|
|
|
- <el-option label="16:30" value="16:30" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="路线 :" prop="route">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="ruleForm.route"
|
|
|
|
|
- class="m-2"
|
|
|
|
|
- placeholder="请选择路线"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option label="墨轩湖-黄家湖" value="墨轩湖-黄家湖" />
|
|
|
|
|
- <el-option label="南昌校区" value="南昌校区" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="截止时间 :" prop="citime">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="ruleForm.citime"
|
|
|
|
|
- class="m-2"
|
|
|
|
|
- placeholder="请选择截止时间"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option label="16:30" value="16:30" />
|
|
|
|
|
- <el-option label="18:30" value="18:30" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
- label="提前通知时间 :"
|
|
|
|
|
- prop="noticetime"
|
|
|
|
|
- type="Number"
|
|
|
|
|
|
|
+ label="昵称 :"
|
|
|
|
|
+ prop="name"
|
|
|
style="
|
|
style="
|
|
|
padding-bottom: 40px;
|
|
padding-bottom: 40px;
|
|
|
border-bottom: 1px solid rgba(230, 230, 230, 1);
|
|
border-bottom: 1px solid rgba(230, 230, 230, 1);
|
|
|
"
|
|
"
|
|
|
>
|
|
>
|
|
|
- <div class="informTime">
|
|
|
|
|
- <el-input v-model="ruleForm.noticetime" clearable />
|
|
|
|
|
- <span> 分钟</span>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="ruleForm.name"
|
|
|
|
|
+ placeholder="请输入昵称"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item class="options">
|
|
<el-form-item class="options">
|
|
|
- <el-button class="congzhi" @click="cancelAdd(ruleFormRef)"
|
|
|
|
|
- >取消</el-button
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button class="congzhi" @click="cancelAdd()">取消</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
color="rgba(61, 81, 232, 1)"
|
|
color="rgba(61, 81, 232, 1)"
|
|
|
class="queding"
|
|
class="queding"
|
|
@@ -243,7 +150,7 @@
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
- </el-dialog>
|
|
|
|
|
|
|
+ </el-dialog> -->
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 分页组件 -->
|
|
<!-- 分页组件 -->
|
|
@@ -263,21 +170,21 @@ import { ref, reactive, nextTick, onBeforeMount, onUnmounted } from "vue";
|
|
|
import { useRouter } from "vue-router";
|
|
import { useRouter } from "vue-router";
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
import { Calendar } from "@element-plus/icons-vue";
|
|
import { Calendar } from "@element-plus/icons-vue";
|
|
|
-import vidiconsApi from "@/api/vidicons.js";
|
|
|
|
|
import { dayjs } from "element-plus";
|
|
import { dayjs } from "element-plus";
|
|
|
import lodash from "lodash";
|
|
import lodash from "lodash";
|
|
|
import axios from "axios";
|
|
import axios from "axios";
|
|
|
|
|
+import { useStore } from "vuex";
|
|
|
|
|
+const store = useStore();
|
|
|
|
|
+const api = ref("");
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
// 表格数据
|
|
// 表格数据
|
|
|
const tableData = reactive({ list: [] });
|
|
const tableData = reactive({ list: [] });
|
|
|
const activeIndex = ref(); // 默认跳转路由
|
|
const activeIndex = ref(); // 默认跳转路由
|
|
|
-const dialongTitle = ref("新增车次"); // 弹窗标题
|
|
|
|
|
|
|
+const dialongTitle = ref("新增账号"); // 弹窗标题
|
|
|
|
|
|
|
|
const searchInput = reactive({
|
|
const searchInput = reactive({
|
|
|
carnumber: "",
|
|
carnumber: "",
|
|
|
createTime: "",
|
|
createTime: "",
|
|
|
- route: "",
|
|
|
|
|
- citime: "",
|
|
|
|
|
}); // 搜索按钮数据
|
|
}); // 搜索按钮数据
|
|
|
5;
|
|
5;
|
|
|
|
|
|
|
@@ -292,91 +199,70 @@ const addDialogVisible = ref(false); // 控制添加员工弹窗
|
|
|
const formSize = ref("default");
|
|
const formSize = ref("default");
|
|
|
const ruleFormRef = ref();
|
|
const ruleFormRef = ref();
|
|
|
const ruleForm = reactive({
|
|
const ruleForm = reactive({
|
|
|
- carnumber: "",
|
|
|
|
|
- contain: "",
|
|
|
|
|
- citime: "",
|
|
|
|
|
- route: "",
|
|
|
|
|
- startytime: "",
|
|
|
|
|
- workduration: "",
|
|
|
|
|
- noticetime: "10",
|
|
|
|
|
|
|
+ name: "",
|
|
|
|
|
+ account: "",
|
|
|
|
|
+ pass: "",
|
|
|
id: "",
|
|
id: "",
|
|
|
});
|
|
});
|
|
|
// 表单验证
|
|
// 表单验证
|
|
|
-const rules = reactive({
|
|
|
|
|
- workduration: [
|
|
|
|
|
- { required: true, message: "生效日期不能为空", trigger: "blur" },
|
|
|
|
|
- // { min: 3, max: 5, message: "Length should be 3 to 5", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
- carnumber: [
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: "车牌号不能为空",
|
|
|
|
|
- trigger: "change",
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- contain: [
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: "容量不能为空",
|
|
|
|
|
- trigger: "blur",
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- startytime: [
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: "发车时间不能为空",
|
|
|
|
|
- trigger: "change",
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- route: [
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: "路线不能为空",
|
|
|
|
|
- trigger: "change",
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- citime: [
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: "截止时间不能为空",
|
|
|
|
|
- trigger: "change",
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- noticetime: [
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: "提前通知时间不能为空",
|
|
|
|
|
- trigger: "blur",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- pattern: /^[1-720]*$/,
|
|
|
|
|
- message: "请填写正确的时间 (整数)",
|
|
|
|
|
- trigger: "blur",
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
-});
|
|
|
|
|
-// 获取车次信息
|
|
|
|
|
-const getList = async () => {
|
|
|
|
|
|
|
+// const rules = reactive({
|
|
|
|
|
+// account: [
|
|
|
|
|
+// { required: true, message: "账号不能为空", trigger: "blur" },
|
|
|
|
|
+// // { min: 3, max: 5, message: "Length should be 3 to 5", trigger: "blur" },
|
|
|
|
|
+// // {
|
|
|
|
|
+// // pattern: /^[a-zA-z]\w{3,15}$/,
|
|
|
|
|
+// // message: "请输入合法账号",
|
|
|
|
|
+// // trigger: "blur",
|
|
|
|
|
+// // },
|
|
|
|
|
+// ],
|
|
|
|
|
+// // /^[a-zA-z]\w{3,15}$/
|
|
|
|
|
+// pass: [
|
|
|
|
|
+// {
|
|
|
|
|
+// required: true,
|
|
|
|
|
+// message: "密码不能为空",
|
|
|
|
|
+// trigger: "blur",
|
|
|
|
|
+// },
|
|
|
|
|
+// ],
|
|
|
|
|
+// name: [
|
|
|
|
|
+// {
|
|
|
|
|
+// required: true,
|
|
|
|
|
+// message: "昵称不能为空",
|
|
|
|
|
+// trigger: "blur",
|
|
|
|
|
+// },
|
|
|
|
|
+// ],
|
|
|
|
|
+
|
|
|
|
|
+// // desc: [{ required: true, message: "Please input activity form", trigger: "blur" }],
|
|
|
|
|
+// });
|
|
|
|
|
+// 获取账户列表
|
|
|
|
|
+const getList = async (message) => {
|
|
|
|
|
+ // let res = await vidiconsApi.queryCamera(data);
|
|
|
let data = new FormData();
|
|
let data = new FormData();
|
|
|
if (searchInput.createTime == null) {
|
|
if (searchInput.createTime == null) {
|
|
|
searchInput.createTime = "";
|
|
searchInput.createTime = "";
|
|
|
}
|
|
}
|
|
|
- data.set("car_number", searchInput.carnumber);
|
|
|
|
|
- data.set("ci_time", searchInput.citime);
|
|
|
|
|
- data.set("route", searchInput.route);
|
|
|
|
|
- data.set("create_time", searchInput.createTime);
|
|
|
|
|
|
|
+ data.set("user_name", searchInput.carnumber);
|
|
|
|
|
+ data.set("yy_date", searchInput.createTime); //前面的key记得对应!
|
|
|
data.set("page", currentPage.value);
|
|
data.set("page", currentPage.value);
|
|
|
- data.set("rows", pageSize.value);
|
|
|
|
|
|
|
+ data.set("rows", pageSize.value); //前面的key记得对应!
|
|
|
|
|
+ // let res = await adminApi.adminLogin(data);
|
|
|
let res = await axios({
|
|
let res = await axios({
|
|
|
method: "post",
|
|
method: "post",
|
|
|
- url: "/api/carBook/cclist.action",
|
|
|
|
|
|
|
+ url: api.value + "/carBook/breclist.action",
|
|
|
headers: {
|
|
headers: {
|
|
|
token: sessionStorage.getItem("token"),
|
|
token: sessionStorage.getItem("token"),
|
|
|
},
|
|
},
|
|
|
data: data,
|
|
data: data,
|
|
|
});
|
|
});
|
|
|
console.log(res);
|
|
console.log(res);
|
|
|
- if (res.data.code == 200) {
|
|
|
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
|
+ if (message) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: message,
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
// ElMessage({
|
|
// ElMessage({
|
|
|
// type: "success",
|
|
// type: "success",
|
|
|
// showClose: true,
|
|
// showClose: true,
|
|
@@ -384,7 +270,7 @@ const getList = async () => {
|
|
|
// center: true,
|
|
// center: true,
|
|
|
// });
|
|
// });
|
|
|
tableData.list = res.data.rows;
|
|
tableData.list = res.data.rows;
|
|
|
- currentPage.value = res.data.currentPage;
|
|
|
|
|
|
|
+ // currentPage.value = res.data.currentPage;
|
|
|
total.value = res.data.total;
|
|
total.value = res.data.total;
|
|
|
} else {
|
|
} else {
|
|
|
tableData.list = res.data.rows;
|
|
tableData.list = res.data.rows;
|
|
@@ -396,71 +282,97 @@ const getList = async () => {
|
|
|
message: "暂无数据",
|
|
message: "暂无数据",
|
|
|
center: true,
|
|
center: true,
|
|
|
});
|
|
});
|
|
|
|
|
+ if (res.data.message == "token错误") {
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ path: `/login`,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 搜索功能
|
|
// 搜索功能
|
|
|
const searchBtn = lodash.debounce(async () => {
|
|
const searchBtn = lodash.debounce(async () => {
|
|
|
|
|
+ getList("查询成功");
|
|
|
|
|
+}, 300);
|
|
|
|
|
+
|
|
|
|
|
+// 重置搜索
|
|
|
|
|
+const searchRefresh = lodash.debounce(async () => {
|
|
|
|
|
+ searchInput.carnumber = "";
|
|
|
|
|
+ searchInput.createTime = "";
|
|
|
|
|
+ currentPage.value = 1;
|
|
|
getList();
|
|
getList();
|
|
|
}, 300);
|
|
}, 300);
|
|
|
|
|
|
|
|
-// 添加车次
|
|
|
|
|
-const addlist = () => {
|
|
|
|
|
- dialongTitle.value = "新增车次";
|
|
|
|
|
- addDialogVisible.value = true;
|
|
|
|
|
- ruleForm.carnumber = "";
|
|
|
|
|
- ruleForm.contain = "";
|
|
|
|
|
- ruleForm.citime = "";
|
|
|
|
|
- ruleForm.route = "";
|
|
|
|
|
- ruleForm.startytime = "";
|
|
|
|
|
- ruleForm.workduration = "";
|
|
|
|
|
- ruleForm.noticetime = "";
|
|
|
|
|
|
|
+//导出功能
|
|
|
|
|
+const importExcel = async () => {
|
|
|
|
|
+ if (searchInput.createTime == null) {
|
|
|
|
|
+ searchInput.createTime = "";
|
|
|
|
|
+ }
|
|
|
|
|
+ let data = new FormData();
|
|
|
|
|
+ data.set("number", searchInput.carnumber);
|
|
|
|
|
+ data.set("create_time", searchInput.createTime);
|
|
|
|
|
+ let res = await axios({
|
|
|
|
|
+ method: "post",
|
|
|
|
|
+ url: api.value + "/carBook/admintoExcel.action",
|
|
|
|
|
+ headers: {
|
|
|
|
|
+ token: sessionStorage.getItem("token"),
|
|
|
|
|
+ },
|
|
|
|
|
+ data: data,
|
|
|
|
|
+ });
|
|
|
|
|
+ // console.log(res, "导出账号");
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
|
+ const elt = document.createElement("a");
|
|
|
|
|
+ elt.setAttribute(
|
|
|
|
|
+ "href",
|
|
|
|
|
+ "https://chtech.ncjti.edu.cn/carstop" + res.data.downurl
|
|
|
|
|
+ );
|
|
|
|
|
+ elt.setAttribute("download", "file.png");
|
|
|
|
|
+ elt.style.display = "none";
|
|
|
|
|
+ document.body.appendChild(elt);
|
|
|
|
|
+ elt.click();
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: res.data.message,
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: res.data.message,
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
-//编辑按钮
|
|
|
|
|
-const edit = (row) => {
|
|
|
|
|
- dialongTitle.value = "编辑车次";
|
|
|
|
|
|
|
+// 添加员工
|
|
|
|
|
+const addlist = () => {
|
|
|
|
|
+ dialongTitle.value = "新增账号";
|
|
|
addDialogVisible.value = true;
|
|
addDialogVisible.value = true;
|
|
|
- ruleForm.carnumber = row.car_number;
|
|
|
|
|
- ruleForm.contain = row.contain;
|
|
|
|
|
- ruleForm.citime = row.ci_time;
|
|
|
|
|
- ruleForm.route = row.route;
|
|
|
|
|
- ruleForm.startytime = row.starty_time;
|
|
|
|
|
- ruleForm.workduration = row.work_duration.split("~");
|
|
|
|
|
- ruleForm.noticetime = row.notice_time;
|
|
|
|
|
- ruleForm.id = row.id;
|
|
|
|
|
|
|
+ ruleForm.name = "";
|
|
|
|
|
+ ruleForm.account = "";
|
|
|
|
|
+ ruleForm.pass = "";
|
|
|
};
|
|
};
|
|
|
-// 取消添加车次
|
|
|
|
|
|
|
+// 取消添加员工
|
|
|
const cancelAdd = () => {
|
|
const cancelAdd = () => {
|
|
|
addDialogVisible.value = false;
|
|
addDialogVisible.value = false;
|
|
|
ruleFormRef.value.resetFields();
|
|
ruleFormRef.value.resetFields();
|
|
|
};
|
|
};
|
|
|
-// 重置搜索
|
|
|
|
|
-const searchRefresh = lodash.debounce(async () => {
|
|
|
|
|
- searchInput.carnumber = "";
|
|
|
|
|
- searchInput.createTime = "";
|
|
|
|
|
- currentPage.value = 1;
|
|
|
|
|
- getList();
|
|
|
|
|
-}, 300);
|
|
|
|
|
-// 确认新增车次
|
|
|
|
|
|
|
+// 确认添加员工
|
|
|
const submitAdd = async (formEl) => {
|
|
const submitAdd = async (formEl) => {
|
|
|
if (!formEl) return;
|
|
if (!formEl) return;
|
|
|
await formEl.validate(async (valid, fields) => {
|
|
await formEl.validate(async (valid, fields) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- if (dialongTitle.value == "新增车次") {
|
|
|
|
|
|
|
+ if (dialongTitle.value == "新增账号") {
|
|
|
let data = {
|
|
let data = {
|
|
|
- car_number: ruleForm.carnumber,
|
|
|
|
|
- contain: ruleForm.contain,
|
|
|
|
|
- ci_time: ruleForm.citime,
|
|
|
|
|
- route: ruleForm.route,
|
|
|
|
|
- starty_time: ruleForm.startytime,
|
|
|
|
|
- work_duration:
|
|
|
|
|
- ruleForm.workduration[0] + "~" + ruleForm.workduration[1],
|
|
|
|
|
- notice_time: ruleForm.noticetime,
|
|
|
|
|
|
|
+ name: ruleForm.name,
|
|
|
|
|
+ number: ruleForm.account,
|
|
|
|
|
+ password: ruleForm.pass,
|
|
|
};
|
|
};
|
|
|
// let res = await admin.adminAdd(data);
|
|
// let res = await admin.adminAdd(data);
|
|
|
let res = await axios({
|
|
let res = await axios({
|
|
|
method: "post",
|
|
method: "post",
|
|
|
- url: "/api/carBook/ccinsert.action",
|
|
|
|
|
|
|
+ url: api.value + "/carBook/admininsert.action",
|
|
|
headers: {
|
|
headers: {
|
|
|
"Content-Type": "application/json;charset=utf-8",
|
|
"Content-Type": "application/json;charset=utf-8",
|
|
|
token: sessionStorage.getItem("token"),
|
|
token: sessionStorage.getItem("token"),
|
|
@@ -470,6 +382,7 @@ const submitAdd = async (formEl) => {
|
|
|
// console.log(res, "添加账号");
|
|
// console.log(res, "添加账号");
|
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
|
getList();
|
|
getList();
|
|
|
|
|
+
|
|
|
ElMessage({
|
|
ElMessage({
|
|
|
type: "success",
|
|
type: "success",
|
|
|
showClose: true,
|
|
showClose: true,
|
|
@@ -488,20 +401,15 @@ const submitAdd = async (formEl) => {
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
let data = {
|
|
let data = {
|
|
|
- car_number: ruleForm.carnumber,
|
|
|
|
|
- contain: ruleForm.contain,
|
|
|
|
|
- ci_time: ruleForm.citime,
|
|
|
|
|
- route: ruleForm.route,
|
|
|
|
|
- starty_time: ruleForm.startytime,
|
|
|
|
|
- work_duration:
|
|
|
|
|
- ruleForm.workduration[0] + "~" + ruleForm.workduration[1],
|
|
|
|
|
- notice_time: ruleForm.noticetime,
|
|
|
|
|
|
|
+ name: ruleForm.name,
|
|
|
|
|
+ number: ruleForm.account,
|
|
|
|
|
+ password: ruleForm.pass,
|
|
|
id: ruleForm.id,
|
|
id: ruleForm.id,
|
|
|
};
|
|
};
|
|
|
// let res = await admin.adminAdd(data);
|
|
// let res = await admin.adminAdd(data);
|
|
|
let res = await axios({
|
|
let res = await axios({
|
|
|
method: "post",
|
|
method: "post",
|
|
|
- url: "/api/carBook/ccupdate.action",
|
|
|
|
|
|
|
+ url: api.value + "/carBook/adminupdate.action",
|
|
|
headers: {
|
|
headers: {
|
|
|
"Content-Type": "application/json;charset=utf-8",
|
|
"Content-Type": "application/json;charset=utf-8",
|
|
|
token: sessionStorage.getItem("token"),
|
|
token: sessionStorage.getItem("token"),
|
|
@@ -534,21 +442,31 @@ const submitAdd = async (formEl) => {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
|
|
+//编辑按钮
|
|
|
|
|
+const edit = (row) => {
|
|
|
|
|
+ dialongTitle.value = "编辑信息";
|
|
|
|
|
+ addDialogVisible.value = true;
|
|
|
|
|
+ console.log(row);
|
|
|
|
|
+ ruleForm.pass = row.password;
|
|
|
|
|
+ ruleForm.name = row.name;
|
|
|
|
|
+ ruleForm.account = row.number;
|
|
|
|
|
+ ruleForm.id = row.id;
|
|
|
|
|
+};
|
|
|
//删除按钮
|
|
//删除按钮
|
|
|
const del = (row) => {
|
|
const del = (row) => {
|
|
|
- ElMessageBox.confirm(`是否删除 ${row.car_number} 车次?`, "提示", {
|
|
|
|
|
|
|
+ console.log(row);
|
|
|
|
|
+ ElMessageBox.confirm(`是否将 ${row.user_name} 移出黑名单?`, "提示", {
|
|
|
confirmButtonText: "确认",
|
|
confirmButtonText: "确认",
|
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
type: "warning",
|
|
|
})
|
|
})
|
|
|
.then(async () => {
|
|
.then(async () => {
|
|
|
let data = new FormData();
|
|
let data = new FormData();
|
|
|
- data.set("id", row.id);
|
|
|
|
|
|
|
+ data.set("card_number", row.card_number);
|
|
|
// let res = await adminApi.adminLogin(data);
|
|
// let res = await adminApi.adminLogin(data);
|
|
|
let res = await axios({
|
|
let res = await axios({
|
|
|
method: "post",
|
|
method: "post",
|
|
|
- url: "/api/carBook/ccdel.action",
|
|
|
|
|
|
|
+ url: api.value + "/carBook/brecremoveBlack.action",
|
|
|
headers: {
|
|
headers: {
|
|
|
token: sessionStorage.getItem("token"),
|
|
token: sessionStorage.getItem("token"),
|
|
|
},
|
|
},
|
|
@@ -584,10 +502,10 @@ const del = (row) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 多选框功能
|
|
// 多选框功能
|
|
|
-const handleSelectionChange = (val) => {
|
|
|
|
|
- console.log(val);
|
|
|
|
|
- selectData.list = val;
|
|
|
|
|
-};
|
|
|
|
|
|
|
+// const handleSelectionChange = (val) => {
|
|
|
|
|
+// console.log(val);
|
|
|
|
|
+// selectData.list = val;
|
|
|
|
|
+// };
|
|
|
|
|
|
|
|
// 表格斑马纹颜色修改
|
|
// 表格斑马纹颜色修改
|
|
|
const tableRowClassName = ({ row, rowIndex }) => {
|
|
const tableRowClassName = ({ row, rowIndex }) => {
|
|
@@ -602,11 +520,12 @@ const tableRowClassName = ({ row, rowIndex }) => {
|
|
|
const handleCurrentChange = (value) => {
|
|
const handleCurrentChange = (value) => {
|
|
|
// console.log(value);
|
|
// console.log(value);
|
|
|
currentPage.value = value;
|
|
currentPage.value = value;
|
|
|
- getList(value);
|
|
|
|
|
|
|
+ getList();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
onBeforeMount(() => {
|
|
onBeforeMount(() => {
|
|
|
- getList(1);
|
|
|
|
|
|
|
+ api.value = store.state.user.api;
|
|
|
|
|
+ getList();
|
|
|
});
|
|
});
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
|
// document.removeEventListener("keyup", Enters);
|
|
// document.removeEventListener("keyup", Enters);
|
|
@@ -648,7 +567,7 @@ onUnmounted(() => {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- margin: 10px 0 0 0;
|
|
|
|
|
|
|
+ margin: 30px 0 20px 0;
|
|
|
.search {
|
|
.search {
|
|
|
margin-left: 0 !important;
|
|
margin-left: 0 !important;
|
|
|
}
|
|
}
|
|
@@ -740,34 +659,13 @@ onUnmounted(() => {
|
|
|
}
|
|
}
|
|
|
.el-dialog__body {
|
|
.el-dialog__body {
|
|
|
padding: 30px 20px 10px 20px;
|
|
padding: 30px 20px 10px 20px;
|
|
|
- .el-form-item {
|
|
|
|
|
- label {
|
|
|
|
|
- width: 120px !important;
|
|
|
|
|
- }
|
|
|
|
|
- .el-form-item__label {
|
|
|
|
|
- width: 120px !important;
|
|
|
|
|
- }
|
|
|
|
|
- .informTime {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- .el-input {
|
|
|
|
|
- width: 120px;
|
|
|
|
|
- margin-right: 10px;
|
|
|
|
|
- .el-input__inner {
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .el-form-item__content {
|
|
|
|
|
- flex: none;
|
|
|
|
|
- .el-input {
|
|
|
|
|
- width: 370px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
.el-input {
|
|
.el-input {
|
|
|
width: 200px;
|
|
width: 200px;
|
|
|
|
|
+ .el-input__suffix-inner {
|
|
|
|
|
+ color: rgba(61, 81, 232, 1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.options {
|
|
.options {
|
|
|
margin-left: 320px;
|
|
margin-left: 320px;
|
|
|
}
|
|
}
|