From addcc1a144ff8b548a01571f637fafb19132190a Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期一, 25 三月 2024 15:41:04 +0800
Subject: [PATCH] 工单阈值
---
src/views/system/work-order/distribute/index.vue | 138 +++++++++++++++++++++++++++++++++++----------
1 files changed, 106 insertions(+), 32 deletions(-)
diff --git a/src/views/system/work-order/distribute/index.vue b/src/views/system/work-order/distribute/index.vue
index 0a0f18c..6ae9267 100644
--- a/src/views/system/work-order/distribute/index.vue
+++ b/src/views/system/work-order/distribute/index.vue
@@ -2,38 +2,69 @@
<div class="row">
<el-row type="flex" justify="left">
<el-col :span="24" style="position: relative">
- <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
+ <el-menu :default-active="activeIndex" class="el-menu" mode="horizontal" @select="handleSelect">
<el-menu-item index="0" @click="changeUnit(null, '鍏ㄩ儴')">
- 鍏ㄩ儴鍗曚綅
+ 鍏ㄩ儴鍗曚綅(430)
</el-menu-item>
<el-menu-item index="1">
- 鑷祦浜曡繍缁村崟浣�(70/70)
+ 鑷祦浜曡繍缁村崟浣�(70)
</el-menu-item>
<el-menu-item index="2">
- 澶у畨杩愮淮(50/50)
+ 澶у畨杩愮淮(50)
</el-menu-item>
- <el-menu-item index="3">瀵岄『杩愮淮鍗曚綅(20/70)</el-menu-item>
- <el-menu-item index="4">楂樻柊杩愮淮鍗曚綅(15/40)</el-menu-item>
- <el-menu-item index="5">鑽e幙杩愮淮鍗曚綅(90/90)</el-menu-item>
- <el-menu-item index="6">璐′簳杩愮淮鍗曚綅(45/45)</el-menu-item>
- <el-menu-item index="7">娌挎哗杩愮淮鍗曚綅(70/70)</el-menu-item>
+ <el-menu-item index="3">瀵岄『杩愮淮鍗曚綅(70)</el-menu-item>
+ <el-menu-item index="4">楂樻柊杩愮淮鍗曚綅(15)</el-menu-item>
+ <el-menu-item index="5">鑽e幙杩愮淮鍗曚綅(90)</el-menu-item>
+ <el-menu-item index="6">璐′簳杩愮淮鍗曚綅(45)</el-menu-item>
+ <el-menu-item index="7">娌挎哗杩愮淮鍗曚綅(70)</el-menu-item>
</el-menu>
- <el-tooltip class="item" effect="dark" content="鑷姩涓嬪彂璁剧疆" placement="left">
- <el-button class="setting" style="" type="success" icon="el-icon-s-tools" circle></el-button>
- </el-tooltip>
+ <el-popover
+ placement="right"
+ width="400"
+ trigger="click">
+ <el-form :model="settingForm" :rules="settingRules" ref="settingForm" label-width="120px">
+ <el-form-item label="褰曞儚璐ㄩ噺" prop="videoQuality">
+ <el-select style="width: 100%" v-model="settingForm.videoQuality" placeholder="鏈�浣庡綍鍍忚川閲�">
+ <el-option label="鍏ㄥ綍鍍�" value="鍏ㄥ綍鍍�"/>
+ <el-option label="閮ㄥ垎褰曞儚" value="閮ㄥ垎褰曞儚"/>
+ <el-option label="鏃犲綍鍍�" value="鏃犲綍鍍�"/>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鐐逛綅绂荤嚎鏃堕暱" prop="outLine">
+ <el-input type="number" v-model="settingForm.outLine" placeholder="涓嶈兘瓒呰繃澶氫箙">
+ <template slot="append">鍒嗛挓</template>
+ </el-input>
+ </el-form-item>
+ <el-form-item label="瑙嗛鏍囨敞鍑嗙‘鐜�" prop="videoLabel">
+ <el-input type="number" v-model="settingForm.videoLabel" placeholder="鏈�浣庡噯纭巼">
+ <template slot="append">%</template>
+ </el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="submitSetting">淇濆瓨</el-button>
+ </el-form-item>
+ </el-form>
+ <el-button title="鑷姩鐢熸垚宸ュ崟璁剧疆" slot="reference" class="setting" style="" type="success" icon="el-icon-s-tools" circle></el-button>
+ </el-popover>
</el-col>
</el-row>
<el-row class="op-warp" type="flex" justify="left" >
<el-col :span="24">
<el-button size="small" type="info" @click="selectedDistribute" class="op">涓嬪彂閫変腑宸ュ崟</el-button>
- <el-button size="small" type="danger" @click="allDistribute" class="op">鍏ㄩ儴涓嬪彂</el-button>
+ <el-popconfirm
+ @confirm="allDistribute"
+ title="纭畾瑕佷笅鍙戞墍鏈夊伐鍗曞悧锛�"
+ >
+ <el-button size="small" type="danger" class="op" slot="reference">鍏ㄩ儴涓嬪彂</el-button>
+ </el-popconfirm>
+
<el-popover
class="op"
placement="right"
width="300px"
trigger="click">
- <span style="font-weight: bold;font-size: 16px">蹇�熶笅鍙�</span>
+ <span style="font-weight: bold;font-size: 16px">蹇嵎涓嬪彂</span>
<el-form ref="fastDistributeForm" :model="fastDistributeForm" :rules="fastDistributeRules" label-width="80px">
<el-form-item label="蹇嵎鏂瑰紡" prop="fastWay">
<el-radio v-model="fastDistributeForm.fastWay" label="0">鏈�杩�30鍒嗛挓</el-radio>
@@ -61,6 +92,7 @@
</el-form>
<el-button slot="reference" type="primary" size="small">蹇嵎涓嬪彂</el-button>
</el-popover>
+ <el-button size="small" type="primary" @click="page" class="op">鍒锋柊</el-button>
</el-col>
</el-row>
@@ -89,10 +121,19 @@
</template>
<script>
+import {distributeWorkOrder, fastDistribute} from '@/api/platform/work-order'
export default {
name: 'index',
data() {
return {
+ settingForm: {
+ // 绂荤嚎
+ outLine: null,
+ // 瑙嗛鍙敤
+ videoQuality: "",
+ // 瑙嗛鏍囨敞
+ videoLabel: ""
+ },
// 褰撳墠杩愮淮鍗曚綅
unitId: null,
unitName: "",
@@ -102,11 +143,23 @@
fastTimeRange: [],
// 涓嬪彂
fastDistributeForm: {
- fastWay: '',
+ fastWay: null,
fastNumLimit: null,
start: null,
end: null,
unitId: null
+ },
+ // 鑷姩鐢熸垚宸ュ崟瑙勫垯
+ settingRules: {
+ outLine: [
+ { required: true, message: "璇峰~鍐欑偣浣嶇绾挎椂闀�", trigger: "blur" }
+ ],
+ videoQuality: [
+ { required: true, message: "璇峰~鍐欒棰戝彲鐢ㄧ▼搴�", trigger: "change" }
+ ],
+ videoLabel: [
+ { required: true, message: "璇峰~鍐欑偣瑙嗛鏍囨敞鍑嗙‘鐜�", trigger: "blur" }
+ ],
},
// 涓嬪彂琛ㄥ崟楠岃瘉
fastDistributeRules: {
@@ -118,8 +171,9 @@
],
},
queryParams: {
+ unitId: null,
pageNum: 1,
- pageSize: 10,
+ pageSize: 20,
},
// 鎬绘潯鏁�
total: 0,
@@ -130,11 +184,33 @@
workOrderList: [],
}
},
+ mounted() {
+ this.page();
+ },
methods: {
+ submitSetting() {
+ this.$refs['settingForm'].validate((valid) => {
+ if (valid) {
+ this.$modal.msgSuccess("淇濆瓨鎴愬姛")
+ } else {
+ console.log('error submit!!');
+ return false;
+ }
+ });
+ },
+ page() {
+ this.loading = true;
+ distributeWorkOrder(this.queryParams).then(res => {
+ this.workOrderList = res.data;
+ this.total = res.total;
+ this.loading = false;
+ })
+ },
changeUnit(unitId, unitName) {
this.unitId = unitId;
+ this.queryParams.unitId = unitId;
this.unitName = unitName;
- // todo 瑙﹀彂鏁版嵁鏌ヨ
+ this.page()
},
clearFastDistributeForm() {
this.fastDistributeForm.fastWay = ''
@@ -143,20 +219,14 @@
this.fastDistributeForm.fastNumLimit = null
this.fastTimeRange = []
},
- allDis() {},
// 鍏ㄩ儴涓嬪彂
allDistribute() {
- this.$modal.confirm("纭畾瑕佷笅鍙�" + (this.unitId ? this.unitName + "涓嬬殑" : "鎵�鏈夊伐鍗�") + "鍚楋紵").then(function() {
- return this.allDis();
- }).then(() => {
- // this.getList();
- // this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ this.fastDistribute();
},
// 蹇�熶笅鍙�
fastDistribute() {
- this.$refs['fastDistributeForm'].validate((valid) => {
- if (valid) {
+ // this.$refs['fastDistributeForm'].validate((valid) => {
+ // if (valid) {
// 濡傛灉鏄嚜瀹氫箟鏂瑰紡锛岄偅涔堟椂闂存蹇呭~
if (this.fastDistributeForm.fastWay === '101' && !this.fastTimeRange.length > 0) {
this.$message.warning("璇烽�夋嫨鏃堕棿鑼冨洿")
@@ -167,11 +237,14 @@
this.fastDistributeForm.end = this.fastTimeRange[1]
}
this.fastDistributeForm.unitId = this.unitId
- // todo 鎻愪氦蹇�熷彂甯冭姹�
- } else {
- return false
- }
- })
+ fastDistribute(this.fastDistributeForm).then(res => {
+ // this.clearFastDistributeForm();
+ this.page();
+ })
+ // } else {
+ // return false
+ // }
+ // })
},
// 閫変腑宸ュ崟涓嬪彂
selectedDistribute() {
@@ -179,7 +252,7 @@
this.$message.warning("璇峰厛閫夋嫨瑕佷笅鍙戠殑宸ュ崟")
return
}
- // todo 涓嬪彂宸ュ崟
+ this.fastDistribute();
},
handleSelect(key, keyPath) {
console.log(key, keyPath);
@@ -213,4 +286,5 @@
top: 10px;
right:5px
}
+
</style>
--
Gitblit v1.8.0