xy 2 years ago
parent 1cc34fc78f
commit 50c6034ba1

@ -2,6 +2,10 @@
ENV = 'production'
# base api
#VUE_APP_BASE_API=http://192.168.60.99:9005/
#VUE_APP_UPLOAD_API=http://192.168.60.99:9005/api/admin/upload-file
#VUE_APP_OA_URL=http://192.168.60.18:2021
VUE_APP_BASE_API=http://diaoling-test.ali251.langye.net/
VUE_APP_UPLOAD_API=http://diaoling-test.ali251.langye.net/api/admin/upload-file
VUE_APP_OA_URL=http://suzhouhedaooa.langye.net

@ -8,7 +8,7 @@ const scale = {
// * 设计稿尺寸px
const baseWidth = 1920
const baseHeight = 1080
const baseHeight = 1440
// * 需保持的比例默认1.77778
const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5))
@ -30,7 +30,7 @@ export default {
methods: {
calcRate () {
const appRef = this.$refs["appRef"]
if (!appRef) return
if (!appRef) return
// 当前宽高比
const currentRate = parseFloat((window.innerWidth / window.innerHeight).toFixed(5))
if (appRef) {
@ -54,4 +54,4 @@ export default {
}, 200)
}
},
}
}

@ -9,7 +9,7 @@
<tr>
<th colspan="2" style="height: 74px;font-size: 26px;letter-spacing: 4px;font-weight: 600;">
<div style="position: relative;">
<p>{{ data.equipment_id_equipments_id_relation ? data.equipment_id_equipments_id_relation.name : '' }}</p>
<p>{{ (data && data.equipment_id_equipments_id_relation) ? data.equipment_id_equipments_id_relation.name : '' }}</p>
<Button style="position: absolute;top: 50%;right: 20px;transform: translateY(-50%)" type="primary" ghost @click="hide"></Button>
</div>
</th>
@ -95,7 +95,7 @@
<vEsign v-if="!readonly" style="flex: 1;" ref="esign" line-color="#eee" bg-color="" :line-width="5"></vEsign>
<div class="btns" v-else-if="!readonly">
<div class="btns" v-if="!readonly">
<Button type="primary" ghost @click="$refs['esign'].reset()"></Button>
<Button type="primary" @click="esignConfirm(true)"></Button>
</div>

@ -115,7 +115,7 @@ export default {
})
} else {
this.nowRow = deepCopy(item);
this.$emit('showDetail',item)
this.$emit('showDetail',{ item, isShow })
}
},
@ -191,7 +191,7 @@ export default {
let { avgHeight, animationIndex, mergedConfig, animation, updater } = this
const { waitTime, carousel, rowNum } = {
waitTime: 5000,
waitTime: 8000,
carousel: 'single',
rowNum: this.rowNum
}

@ -0,0 +1,17 @@
<template>
<div>
</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
computed: {},
}
</script>
<style scoped lang="scss">
</style>

@ -0,0 +1,59 @@
<template>
<div class="container">
<h1 class="title">苏州河道处调度指令看板</h1>
<div class="bottom">
<div>{{ $moment(time).format('YYYY-MM-DD HH:mm:ss') }}</div>
<div>查看已完成调令 <i class="el-icon-d-arrow-right"></i></div>
</div>
</div>
</template>
<script>
export default {
inject: ['nowTime'],
data() {
return {
}
},
methods: {
},
computed: {
time () {
return this.nowTime()
}
},
mounted() {
},
destroyed() {
}
}
</script>
<style scoped lang="scss">
.container {
position: relative;
.title {
font-size: 2.8rem;
line-height: 2.67rem;
text-align: center;
font-weight: 400;
color: #FFFFFF;
padding: 2.87rem 0 0 1.33rem;
}
.bottom {
display: flex;
justify-content: space-between;
font-weight: 400;
color: #FBFBFF;
line-height: 2.92rem;
font-size: 1.2rem;
padding: 0 5.73rem;
}
}
</style>

@ -0,0 +1,348 @@
<template>
<div class="container">
<div class="header">
<p>代执行</p>
<div class="type">
<div class="type-item" v-for="item in statusType">
<div class="type-item__color" :style="{ 'background': item.color }"></div>
<p class="type-item__label">{{ item.label }}</p>
</div>
</div>
</div>
<el-scrollbar>
<div class="list">
<div v-for="(item, index) in toDo" :key="item.id" class="list-item" :class="`list-item-${timeStatusFormat(item)}`">
<div class="list-item__status">
<template v-if="timeStatusFormat(item) === 2">
<div class="list-item__status-2"></div>
<p>存在执行中指令</p>
</template>
<template v-else-if="timeStatusFormat(item) === 3">
<div class="list-item__status-3"></div>
<p>倒计时{{ $moment(item.start_time).diff($moment(time),'minutes') }}分钟</p>
</template>
<template v-else-if="timeStatusFormat(item) === 4">
<div class="list-item__status-4"></div>
<p>超时未执行</p>
</template>
<template v-else>
</template>
</div>
<div class="list-item__name">
{{ item.equipment_id_equipments_id_relation ? item.equipment_id_equipments_id_relation.name : '' }}
</div>
<div class="list-item__time">
执行时间{{ timeFormat(item.start_time) }}{{ timeFormat(item.end_time,'HH:mm') }}
</div>
<div class="list-item__last">预计时长 {{ $moment(item.end_time).diff($moment(item.start_time),'hours') }}</div>
<div class="list-item__operate">
<div v-for="(s, si) in status" class="step">
<div class="step-icon">
<div class="step-icon__cir" :class="`step-icon__cir-${stepFormat(item.status,s.value)}`"></div>
<div class="step-icon__line" :class="`step-icon__line-${stepFormat(item.status,s.value)}`" v-if="si < status.length-1"></div>
</div>
<div class="step-label">{{ s.label }}</div>
</div>
</div>
<Button type="primary" size="small" class="list-item__btn">查看</Button>
</div>
</div>
</el-scrollbar>
</div>
</template>
<script>
export default {
inject: ["transfers", "nowTime"],
data() {
return {
status: [
{
value: 2,
label: "已接收"
},
{
value: 3,
label: "已开启通知"
},
{
value: 4,
label: "已开启"
},
{
value: 5,
label: "确认关闭通知"
},
{
value: 6,
label: "确认关闭"
},
],
statusType: [
{
label: "存在执行中",
color: "linear-gradient(to top left,#527ded, #527ded43)",
},
{
label: "超时",
color: "linear-gradient(to top left,#d15d52, #d15d5243)"
},
{
label: "即将执行",
color: "linear-gradient(to top left,#ecc069, #ecc06943)"
}
]
}
},
methods: {},
computed: {
time () {
return this.nowTime()
},
toDo () {
console.log(this.transfers("toDo"))
return this.transfers("toDo")
},
timeFormat () {
return function (time,format='YYYY-MM-DD HH:mm') {
return this.$moment(time).format(format)
}
},
timeStatusFormat () {
return function (item) {
//1 2 3 4
if (item.status === 3) {
return 2
}
const diffMins = this.$moment(item.start_time).diff(this.time,"minutes");
if (diffMins <= 5 && diffMins >= 0) {
return 3
}
if (diffMins < 0) {
return 4
}
return 1
}
},
stepFormat () {
return function (statue,s) {
const doneStatus = Array.from({ length: statue },((_,i) => (i + 1)))
if (statue === s) {
return "doing"
}
if (doneStatus.find(i => i === s)) {
return "done"
}
return false
}
}
},
}
</script>
<style scoped lang="scss">
.container {
background: #FFFFFF;
box-shadow: 5px 0px 20px 0px #234382;
border-radius: 0.67rem;
position: relative;
margin: 1.6rem 3.62rem 0 3.62rem;
}
.header {
font-size: 1.15rem;
height: 5.33rem;
display: flex;
align-items: center;
justify-content: space-between;
background: #F5F5F5;
border-radius: .67rem .67rem 0 0 ;
padding: 0 2rem;
p {
font-weight: 600;
}
.type {
display: flex;
&-item {
display: flex;
justify-content: center;
align-items: center;
margin-left: 2rem;
&__color {
width: 1.6rem;
height: 1.6rem;
border-radius: 3px;
margin-right: .6rem;
}
&__label {
font-weight: normal;
}
}
}
}
.list {
max-height: 56rem;
&-item {
font-size: 1.15rem;
display: flex;
align-items: center;
border-bottom: 1px #fff solid;
padding: 1.2rem 2rem;
&:nth-last-child(1) {
border-radius: 0 0 .67rem .67rem;
border-bottom: none;
}
$bkg-colors: #fff,linear-gradient(to bottom,#527ded18, #527ded28),linear-gradient(to bottom,#ecc06918, #ecc06928),linear-gradient(to bottom,#d15d5218, #d15d5228);
@for $i from 1 through length($bkg-colors) {
&-#{$i} {
background: nth($bkg-colors,$i);
@if $i == 3 {
border: 1px solid #d15d52aa;
border-bottom: 1px solid #d15d52aa !important;
& + & {
border-top: none;
}
}
}
}
&__status {
display: flex;
align-items: center;
font-weight: 600;
flex-basis: 10%;
$font-colors: #333, #527ded, #ecc069,#d15d52;
$colors: #fff,linear-gradient(to top left,#527ded, #527ded43),linear-gradient(to top left,#ecc069, #ecc06943),linear-gradient(to top left,#d15d52, #d15d5243);
@for $i from 1 through length($colors) {
&-#{$i} {
background: nth($colors,$i);
width: 1.28rem;
height: 1.28rem;
border-radius: 3px;
& + p {
color: nth($font-colors,$i);
}
}
}
}
&__name {
font-weight: 600;
font-size: 1.34rem;
flex: 1;
}
&__time {
flex-basis: 19%;
text-align: center;
}
&__last {
flex-basis: 7%;
text-align: center;
}
&__operate {
flex-basis: 31%;
display: flex;
align-items: center;
justify-content: center;
.step {
width: 6.6rem;
&-icon {
display: flex;
align-items: center;
justify-content: center;
position: relative;
&__cir {
width: 2.2rem;
height: 2.2rem;
background: #dcdcdc;
border-radius: 100%;
z-index: 2;
position: relative;
&-doing {
cursor: pointer;
transform: scale(.9, .9);
background: #6fc0af;
position: relative;
&::before {
content: "";
width: 132%;
height: 132%;
border-radius: 100%;
background: #6fc0af65;
transform: translate(-50%,-50%);
animation: scale infinite ease-out 4s;
position: absolute;
left: 50%;
top: 50%;
}
@keyframes scale {
0%,100% {
transform: translate(-50%,-50%);
}
50% {
transform: translate(-50%,-50%) scale(1.1,1.1);
}
}
}
&-done {
background: #7ccac8;
}
}
&__line {
width: 100%;
height: 2px;
background: #dcdcdc;
position: absolute;
left: 50%;
&-done {
background: #7ccac8;
}
}
}
&-label {
text-align: center;
font-size: 1.05rem;
line-height: 1.5;
margin-top: 4px;
}
}
}
&__btn {
font-size: 1.3rem;
height: 2.4rem;
width: 5rem;
background: #a4ddf0;
color: #333;
border-color: #a4ddf0;
}
}
}
</style>

@ -0,0 +1,85 @@
<template>
<div class="container">
<div class="square1 square-big"></div>
<div class="square2"></div>
<div class="square3 square-big"></div>
<div class="square4"></div>
</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
computed: {},
}
</script>
<style scoped lang="scss">
$r: 300rem;
.container {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
&::after {
content: "";
width: calc(2 * #{$r});
height: calc(2 * #{$r});
border-radius: 100%;
background: linear-gradient(to right,#76cff5, #76cff5 calc(#{$r} * 0.3), #577cd7 calc(#{$r} + #{$r} * 0.2), #577cd7);
transform: translateY(calc(-50% - calc(#{$r} * 0.938)));
z-index: 0;
position: absolute;
top: 0;
left: calc(50% - #{$r});
}
@mixin square {
width: 5.3rem;
height: 5.3rem;
border-radius: 2px;
background: #FFFFFF;
opacity: 0.23;
z-index: 1;
position: absolute;
&-big {
width: 7.03rem;
height: 7.03rem;
}
}
.square1 {
@include square;
left: 44.33rem;
top: 2rem;
}
.square2 {
@include square;
left: 47.2rem;
top: 5.47rem;
}
.square3 {
@include square;
right: 37.07rem;
top: 2rem;
}
.square4 {
@include square;
right: 36rem;
top: 5.47rem;
}
}
</style>

@ -0,0 +1,178 @@
<template>
<div id="big-screen" ref="appRef">
<topBackground></topBackground>
<Title></Title>
<toDo></toDo>
<doing></doing>
</div>
</template>
<script>
import topBackground from "@/views/bigScreen1/component/topBackground.vue";
import Title from "@/views/bigScreen1/component/title.vue";
import toDo from "@/views/bigScreen1/component/toDo.vue";
import doing from "@/views/bigScreen1/component/doing.vue";
import { index } from "@/api/system/baseForm";
import { refreshTransferTime } from "@/settings";
export default {
components: {
topBackground,
Title,
toDo,
doing
},
provide() {
return {
transfers: (status="toDo") => {
switch (status) {
case "toDo":
return this.transfers1;
case "doing":
return this.transfers2;
case "done":
return this.transfers3;
default:
return [];
}
},
nowTime: () => this.time,
}
},
data() {
return {
forwardRefreshTime: '',
transfers1: [],
transfers2: [],
transfers3: [],
time: this.$moment(),
timer: null,
transferTimer: null,
}
},
methods: {
startTime () {
this.timer = setInterval(() => {
this.time = this.$moment()
},1000)
},
setRem () {
const baseSize = 15;
const scale = document.documentElement.clientWidth / 1920;
document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + "px";
window.requestAnimationFrame(this.setRem)
},
async getTransfer(isFirst = false) {
if (isFirst) {
this.forwardRefreshTime = this.$moment();
this.transfers1 = [];
this.transfers2 = [];
this.transfers3 = [];
const res = (
await index({
table_name: "transfers",
page: 1,
page_size: 9999,
filter: [
{
key: 'start_time',
op: 'range',
value: `${this.$moment().startOf('days').format('YYYY-MM-DD HH:mm:ss')},${this.$moment().endOf('days').format('YYYY-MM-DD HH:mm:ss')}`
},
{
key: 'status',
op: 'neq',
value: 1
}
]
},false)
).data;
res.forEach(i => {
if (i.status === 2 || i.status === 3) {
this.transfers1.push(i)
}
if (i.status === 4 || i.status === 5) {
this.transfers2.push(i)
}
if (i.status === 6) {
this.transfers3.push(i)
}
})
} else {
const res = (
(await index({
table_name: "transfers",
page: 1,
page_size: 9999,
filter: [
{
key: "created_at",
op: "range",
value: `${this.forwardRefreshTime.format('YYYY-MM-DD HH:mm:ss')},${this.$moment().format('YYYY-MM-DD HH:mm:ss')}`
},
{
key: "status",
op: "range",
value: "2,3"
}
]
},false)
).data);
if (res.length > 0) {
this.transfers1.push(...res)
}
this.forwardRefreshTime = this.$moment()
}
}
},
computed: {},
created() {
this.setRem();
window.onresize = this.setRem;
this.getTransfer(true);
this.transferTimer = setInterval(() => {
this.getTransfer()
},refreshTransferTime)
},
mounted() {
this.startTime()
},
destroyed() {
window.onscroll = null;
document.documentElement.style.fontSize = "15px";
clearInterval(this.timer);
clearInterval(this.transferTimer);
}
}
</script>
<style scoped lang="scss">
#big-screen {
overflow-y: scroll;
overflow-x: hidden;
width: 100vw;
height: 100vh;
z-index: 2;
position: relative;
}
</style>
<style lang="scss">
#app:has(#big-screen) {
.app-main {
padding: 0;
}
.app-wrapper {
overflow: hidden!important;
}
.main-container {
margin: 0;
}
.sidebar-container,.fixed-header {
display: none;
}
}
</style>

@ -831,6 +831,7 @@ export default {
if (isNeed) {
this.$router.push('/dispatch/handle')
}
this.$store.commit('app/CLOSE_SIDEBAR')
})
.catch((_) => {
loadingInstance.close();

@ -22,10 +22,10 @@
<!-- format="yyyy-MM-dd"-->
<!-- style="width: 130px;"-->
<!-- ></el-date-picker>-->
<Select clearable v-model="select.filter[2].value" placeholder="请选择类别" style="width: 140px;margin-left: 6px;">
<Select clearable v-model="select.filter[1].value" placeholder="请选择类别" style="width: 140px;margin-left: 6px;">
<Option v-for="item in abilities" :value="item.value">{{ item.key }}</Option>
</Select>
<Select clearable v-model="select.filter[1].value" placeholder="请选择范围" style="width: 140px;margin-left: 6px;">
<Select clearable v-model="selectArea" placeholder="请选择范围" style="width: 140px;margin-left: 6px;">
<Option v-for="item in areas" :value="item.value">{{ item.key }}</Option>
</Select>
<Input style="width: 140px;margin-left: 6px;" clearable v-model="select.filter[0].value" placeholder="搜索内容"/>
@ -423,6 +423,7 @@ export default {
},
oaToken: "",
op,
selectArea: "",
select: {
table_name: "",
filter: [
@ -431,11 +432,6 @@ export default {
op: "like",
value: ""
},
{
key: "area",
op: "eq",
value: ""
},
{
key: "leibie",
op: "eq",
@ -457,6 +453,25 @@ export default {
customFormId: "",
tableName: "",
},
resetTable: new Map([
["start_time",{
formatter: (data, cell, val)=>{
return val ? this.$moment(val).format("HH:mm") : ''
}
}],
["end_time",{
formatter: (data, cell, val)=>{
return val ? this.$moment(val).format("HH:mm") : ''
}
}],
["shichang",{
formatter: (data) => {
return this.$moment(data.end_time).diff(this.$moment(data.start_time),"hours") + "时"
}
}]
])
};
},
methods: {
@ -493,7 +508,7 @@ export default {
mergeData(list) {
return mergeTableRow({
data: list,
data: this.selectArea ? list.filter(i => (i.equipment_id_equipments_id_relation?.area === this.selectArea)) : list,
mergeColNames: ["equipment_id_equipments_id_relation.area","equipment_id_equipments_id_relation.name"], //
firstMergeColNames: ["equipment_id_equipments_id_relation.area","equipment_id_equipments_id_relation.name"], // firstMerge
firstMerge: "equipment_id", //
@ -601,7 +616,6 @@ export default {
delete copyRow[key]
}
}
console.log(copyRow)
save({
table_name: 'transfers',
...copyRow
@ -747,7 +761,6 @@ export default {
}
});
this.form = fields;
console.log(111, this.form);
this.form
?.filter((i) => i.list_show)
.forEach((i) => {
@ -833,6 +846,20 @@ export default {
}
let alignLeft = [];
if (this.resetTable.get(i.field)) {
this.table.push(Object.assign(
{
prop: i.field,
label: i.name,
width: i.width,
align: alignLeft.find((m) => m === i.field) ? "left" : "center",
fixed: i.is_fixed,
},
linkOb,
this.resetTable.get(i.field)
))
return
}
this.table.push(
Object.assign(
{

@ -16,7 +16,7 @@
<Button
style="margin-left: 10px"
type="primary"
@click=""
@click="getTransfer"
>查询</Button
>
</div>

@ -24,7 +24,7 @@ module.exports = {
* In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: '/admin/',
publicPath: '/admin_test/',
outputDir: './dist',
assetsDir: 'static',
css: {

Loading…
Cancel
Save