|
|
|
@ -31,11 +31,14 @@
|
|
|
|
|
<div>
|
|
|
|
|
<div v-for="(item, index) in levelTree"
|
|
|
|
|
@click="handleClickTree(item, index)"
|
|
|
|
|
:class="{ active: item.active,redColor:item.key=='CAUTION_NOTICE' }" class="box-item">
|
|
|
|
|
<div class="box-text" >
|
|
|
|
|
<i v-if="item.key != 'CAUTION_NOTICE'" class="icon-touzijilu iconfont"></i>
|
|
|
|
|
<i v-if="item.key == 'CAUTION_NOTICE'" class="icon-jinggao iconfont"></i>
|
|
|
|
|
{{item.name}}
|
|
|
|
|
:class="{ active: item.active, redColor: item.key == 'CAUTION_NOTICE' }"
|
|
|
|
|
class="box-item">
|
|
|
|
|
<div class="box-text">
|
|
|
|
|
<i v-if="item.key != 'CAUTION_NOTICE'"
|
|
|
|
|
class="icon-touzijilu iconfont"></i>
|
|
|
|
|
<i v-if="item.key == 'CAUTION_NOTICE'"
|
|
|
|
|
class="icon-jinggao iconfont"></i>
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="box-number">{{ item.total }}</div>
|
|
|
|
|
</div>
|
|
|
|
@ -244,15 +247,17 @@
|
|
|
|
|
</a-modal>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { ref, onMounted } from 'vue'
|
|
|
|
|
<script lang="ts" setup name="任务管理">
|
|
|
|
|
import { ref, onMounted, watch } from 'vue'
|
|
|
|
|
import { formatParams } from '/@/hooks/web/common'
|
|
|
|
|
import { searchFormSchema } from './columns'
|
|
|
|
|
import { useOptionsStore } from '/@/store/modules/options'
|
|
|
|
|
const optionsStore = useOptionsStore()
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
|
import { useMessage } from '../../hooks/web/useMessage'
|
|
|
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
import {
|
|
|
|
|
GetCurrentTotalStat, GetPageAsync, TaskManageTruckGetInfoByTaskId,
|
|
|
|
|
TaskManageTruckPrintTemplateWithHistoryList,
|
|
|
|
@ -297,7 +302,11 @@ onMounted(() => {
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch(() => route.fullPath, (val) => {
|
|
|
|
|
if (val === '/taskmanage') {
|
|
|
|
|
refshTotalStat()
|
|
|
|
|
}
|
|
|
|
|
}, { deep: true });
|
|
|
|
|
|
|
|
|
|
const levelreLoading = ref(false)
|
|
|
|
|
const levelLoading = ref(false)
|
|
|
|
@ -349,6 +358,26 @@ function getCurrentTotalStat() {
|
|
|
|
|
levelreLoading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function refshTotalStat() {
|
|
|
|
|
levelreLoading.value = true
|
|
|
|
|
levelLoading.value = true
|
|
|
|
|
GetCurrentTotalStat({
|
|
|
|
|
isReCalc: false
|
|
|
|
|
})
|
|
|
|
|
.then(res => {
|
|
|
|
|
levelLoading.value = false
|
|
|
|
|
levelreLoading.value = false
|
|
|
|
|
levelTop.value = res.data.levelTop
|
|
|
|
|
levelNextAll.value = res.data.levelNext
|
|
|
|
|
levelTreeAll.value = res.data.levelTree
|
|
|
|
|
reload()
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
levelLoading.value = false
|
|
|
|
|
levelreLoading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function selectNextLevel(list, key) {
|
|
|
|
|
const arr = [] as any
|
|
|
|
|
list.map((item, index) => {
|
|
|
|
@ -430,7 +459,7 @@ function changeTopLevel() {
|
|
|
|
|
levelTree.value = selectTreeLevel(levelTreeAll.value, activeNextKey.value, activeTopKey.value)
|
|
|
|
|
activeTreeKey.value = []
|
|
|
|
|
taskType.value = ''
|
|
|
|
|
levelTree.value.forEach(item=>{
|
|
|
|
|
levelTree.value.forEach(item => {
|
|
|
|
|
item.active = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -449,7 +478,7 @@ function changeNextLevel() {
|
|
|
|
|
activeTreeKey.value = []
|
|
|
|
|
getForm().setFieldsValue({ status: activeNextKey.value })
|
|
|
|
|
taskType.value = ''
|
|
|
|
|
levelTree.value.forEach(item=>{
|
|
|
|
|
levelTree.value.forEach(item => {
|
|
|
|
|
item.active = false
|
|
|
|
|
})
|
|
|
|
|
reload()
|
|
|
|
@ -501,7 +530,7 @@ const [registerTable, { reload, setLoading, getForm, getSelectRows, setProps }]
|
|
|
|
|
const data = {} as any
|
|
|
|
|
const queryData = JSON.parse(formatParams(p).queryCondition)
|
|
|
|
|
data.pageCondition = formatParams(p).pageCondition
|
|
|
|
|
queryData.forEach(item=>{
|
|
|
|
|
queryData.forEach(item => {
|
|
|
|
|
if (item.FieldName === 'task_TYPE') {
|
|
|
|
|
item.ConditionalType = 0
|
|
|
|
|
}
|
|
|
|
@ -1196,11 +1225,13 @@ function handleClickTree(row, index) {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.iconfont{
|
|
|
|
|
|
|
|
|
|
.iconfont {
|
|
|
|
|
font-size: 14px
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.box-text {
|
|
|
|
|
background: rgba(245, 249, 252, 1);
|
|
|
|
|
color: rgba(37, 122, 250, 1);
|
|
|
|
@ -1226,8 +1257,8 @@ function handleClickTree(row, index) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.redColor{
|
|
|
|
|
|
|
|
|
|
&.redColor {
|
|
|
|
|
|
|
|
|
|
.box-text {
|
|
|
|
|
color: rgba(237, 88, 88, 1);
|
|
|
|
|
}
|
|
|
|
@ -1250,7 +1281,7 @@ function handleClickTree(row, index) {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
line-height: 14px;
|
|
|
|
|
flex:1;
|
|
|
|
|
flex: 1;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|