执行时间:{{ timeFormat(item.start_time) }}至{{ timeFormat(item.end_time,'HH:mm') }}
- 预计时长 {{ $moment(item.end_time).diff($moment(item.start_time),'hours', true).toFixed(2) }}小时
@@ -70,14 +71,6 @@ export default {
data() {
return {
status: [
- {
- value: 2,
- label: "已接收"
- },
- {
- value: 3,
- label: "已开启通知"
- },
{
value: 4,
label: "已开启"
@@ -92,16 +85,12 @@ export default {
},
],
statusType: [
- {
- label: "存在执行中",
- color: "linear-gradient(to top left,#527ded, #527ded43)",
- },
{
label: "超时",
color: "linear-gradient(to top left,#d15d52, #d15d5243)"
},
{
- label: "即将执行",
+ label: "即将结束",
color: "linear-gradient(to top left,#ecc069, #ecc06943)"
}
],
@@ -130,6 +119,18 @@ export default {
})
}
},
+
+
+ sortTransfer (index) {
+ const formatter = this.timeStatusFormat.bind(this)
+ if (index === 0) {
+ let filterArr = this.scrollList.filter(i => (formatter(i) === 4))
+ this.scrollList = Array.from(new Set([...filterArr,...this.scrollList].map(i => JSON.stringify(i)))).map(i => JSON.parse(i))
+ } else if (index === 1) {
+ let filterArr = this.scrollList.filter(i => (formatter(i) === 3))
+ this.scrollList = Array.from(new Set([...filterArr,...this.scrollList].map(i => JSON.stringify(i)))).map(i => JSON.parse(i))
+ }
+ }
},
computed: {
time () {
@@ -147,15 +148,20 @@ export default {
timeStatusFormat () {
return function (item) {
- //1 普通 2 进行中 3 倒计时 4 超时
+ //1 普通 2 存在进行中 3 倒计时 4 超时
const diffMins = this.$moment(item.end_time).diff(this.time,"minutes");
if (diffMins <= 5 && diffMins >= 0) {
+ if (!item._isPlay) {
+ item._isPlay = true
+ this.$audioPlay()
+ }
return 3
}
- if (this.doing.filter(i => (i.id === item.id))?.length > 1) {
- return 2
- }
if (diffMins < 0) {
+ if (!item._isPlay) {
+ item._isPlay = true
+ this.$audioPlay()
+ }
return 4
}
return 1
@@ -184,7 +190,10 @@ export default {
watch: {
doing (newVal) {
if (newVal && newVal instanceof Array) {
- this.scrollList = deepCopy(newVal)
+ this.scrollList = deepCopy(newVal).map(i => {
+ i._isPlay = false
+ return i
+ })
this.$nextTick(() => {
const isScroll = this.$refs['listItems']?.$el?.getBoundingClientRect()?.height > this.$refs['elScrollbar']?.$el?.getBoundingClientRect()?.height;
@@ -268,6 +277,7 @@ $list-height: calc(#{$container-height} - 5.33rem);
display: flex;
align-items: center;
border-bottom: 1px #fff solid;
+ cursor: pointer;
padding: 1.2rem 2rem;
@@ -327,11 +337,11 @@ $list-height: calc(#{$container-height} - 5.33rem);
text-align: center;
}
&__last {
- flex-basis: 6%;
+ flex-basis: 9%;
text-align: center;
}
&__operate {
- flex-basis: 30%;
+ flex-basis: 22%;
display: flex;
align-items: center;
justify-content: center;
diff --git a/src/views/bigScreen1/component/done.vue b/src/views/bigScreen1/component/done.vue
index 7e5cbc5..953b1d8 100644
--- a/src/views/bigScreen1/component/done.vue
+++ b/src/views/bigScreen1/component/done.vue
@@ -43,7 +43,7 @@
实际执行时间:{{ timeFormat(item.act_start_time) }}至{{ timeFormat(item.act_end_time,'HH:mm') }}
-
预计时长 {{ $moment(item.end_time).diff($moment(item.start_time),'hours', true) }}时
+
已用时长 {{ $moment(item.act_end_time).diff($moment(item.act_start_time),'hours', true).toFixed(2) }}小时
@@ -303,11 +303,11 @@ $list-height: calc(#{$container-height} - 5.33rem);
text-align: center;
}
&__last {
- flex-basis: 9%;
+ flex-basis: 11%;
text-align: center;
}
&__operate {
- flex-basis: 30%;
+ flex-basis: 24%;
display: flex;
align-items: center;
justify-content: center;
diff --git a/src/views/bigScreen1/component/toDo.vue b/src/views/bigScreen1/component/toDo.vue
index 1bec6b5..67cfea1 100644
--- a/src/views/bigScreen1/component/toDo.vue
+++ b/src/views/bigScreen1/component/toDo.vue
@@ -4,7 +4,7 @@
待执行
-
+
@@ -26,7 +26,7 @@
- 【超时未执行】
+ 【超时】
@@ -43,7 +43,7 @@
执行时间:{{ timeFormat(item.start_time) }}至{{ timeFormat(item.end_time,'HH:mm') }}
- 预计时长 {{ $moment(item.end_time).diff($moment(item.start_time),'hours',true) }}小时
+ 预计时长 {{ $moment(item.end_time).diff($moment(item.start_time),'hours', true).toFixed(2) }}小时
@@ -82,14 +83,6 @@ export default {
value: 4,
label: "开机"
},
- {
- value: 5,
- label: "通知关机"
- },
- {
- value: 6,
- label: "关机"
- },
],
statusType: [
{
@@ -132,6 +125,19 @@ export default {
}
},
+ sortTransfer (index) {
+ const formatter = this.timeStatusFormat.bind(this)
+ if (index === 0) {
+ let filterArr = this.scrollList.filter(i => (formatter(i) === 2))
+ this.scrollList = Array.from(new Set([...filterArr,...this.scrollList].map(i => JSON.stringify(i)))).map(i => JSON.parse(i))
+ } else if (index === 1) {
+ let filterArr = this.scrollList.filter(i => (formatter(i) === 4))
+ this.scrollList = Array.from(new Set([...filterArr,...this.scrollList].map(i => JSON.stringify(i)))).map(i => JSON.parse(i))
+ } else if (index === 2) {
+ let filterArr = this.scrollList.filter(i => (formatter(i) === 3))
+ this.scrollList = Array.from(new Set([...filterArr,...this.scrollList].map(i => JSON.stringify(i)))).map(i => JSON.parse(i))
+ }
+ }
},
computed: {
time () {
@@ -149,15 +155,23 @@ export default {
timeStatusFormat () {
return function (item) {
- //1 普通 2 进行中 3 倒计时 4 超时
+ //1 普通 2 存在进行中 3 倒计时 4 超时
const diffMins = this.$moment(item.start_time).diff(this.time,"minutes");
if (diffMins <= 5 && diffMins >= 0) {
+ if (!item._isPlay) {
+ item._isPlay = true
+ this.$audioPlay()
+ }
return 3
}
if (this.toDo.filter(i => (i.id === item.id))?.length > 1) {
return 2
}
if (diffMins < 0) {
+ if (!item._isPlay) {
+ item._isPlay = true
+ this.$audioPlay()
+ }
return 4
}
return 1
@@ -177,6 +191,8 @@ export default {
}
},
+ },
+ created() {
},
mounted() {
},
@@ -186,7 +202,10 @@ export default {
watch: {
toDo (newVal) {
if (newVal && newVal instanceof Array) {
- this.scrollList = deepCopy(newVal)
+ this.scrollList = deepCopy(newVal).map(i => {
+ i._isPlay = false
+ return i
+ })
this.$nextTick(() => {
const isScroll = this.$refs['listItems']?.$el?.getBoundingClientRect()?.height > this.$refs['elScrollbar']?.$el?.getBoundingClientRect()?.height;
@@ -247,6 +266,7 @@ $list-height: calc(#{$container-height} - 5.33rem);
display: flex;
justify-content: center;
align-items: center;
+ cursor: pointer;
margin-left: 2rem;
&__color {
@@ -329,11 +349,11 @@ $list-height: calc(#{$container-height} - 5.33rem);
text-align: center;
}
&__last {
- flex-basis: 6%;
+ flex-basis: 9%;
text-align: center;
}
&__operate {
- flex-basis: 30%;
+ flex-basis: 22%;
display: flex;
align-items: center;
justify-content: center;
diff --git a/src/views/order/component/createDispatch.vue b/src/views/order/component/createDispatch.vue
index 5d678e5..4fcf167 100644
--- a/src/views/order/component/createDispatch.vue
+++ b/src/views/order/component/createDispatch.vue
@@ -121,7 +121,7 @@
@@ -258,15 +343,21 @@ export default {
padding: 8px 0;
}
+.name {
+ text-indent: 30px;
+ line-height: 1.5;
+
+ padding: 6px 0;
+}
.time {
+ text-indent: 60px;
line-height: 1.5;
- padding: 0 4px;
}
.content {
+ text-indent: 60px;
line-height: 1.5;
- padding: 0 4px;
}
.item + .item {
margin-top: 20px;
diff --git a/vue.config.js b/vue.config.js
index 459de67..726cdd9 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -24,7 +24,7 @@ module.exports = {
* In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath
*/
- publicPath: '/admin_test/',
+ publicPath: process.env.NODE_ENV === 'tests' ? '/admin_test' : '/admin',
outputDir: './dist',
assetsDir: 'static',
css: {
@@ -35,6 +35,10 @@ module.exports = {
sass:{
prependData: '@import "@/styles/index.scss";'
}
+ },
+ extract: { // 打包后css文件名称添加时间戳
+ filename: `static/css/[name].css`,
+ chunkFilename: `static/css/chunk.[id].css`
}
},
lintOnSave: process.env.NODE_ENV === 'development',
@@ -65,7 +69,11 @@ module.exports = {
alias: {
'@': resolve('src')
}
- }
+ },
+ output: {
+ filename: 'static/js/[name].[contenthash].js',
+ chunkFilename: 'static/js/[name].[contenthash].js'
+ },
},
chainWebpack(config) {
// it can improve the speed of the first screen, it is recommended to turn on preload