Browse Source

【EDI前端】log页面+任务+其他优化

web
安虹睿 4 weeks ago
parent
commit
75483bceba
  1. BIN
      Web/public/logo_op.png
  2. 9
      Web/src/api/common/index.js
  3. 3
      Web/src/api/system/customlog.js
  4. 2
      Web/src/components/Uploads/importErrorDialog.vue
  5. 2
      Web/src/components/Uploads/multipleImgUpload.vue
  6. 2
      Web/src/components/Uploads/singleImgUpload.vue
  7. 2
      Web/src/components/apiEditPop/index.vue
  8. 12
      Web/src/components/ediTtablePage/index.vue
  9. 2
      Web/src/components/importPop/index.vue
  10. 7
      Web/src/layout/components/Sidebar/Logo.vue
  11. 6
      Web/src/layout/components/SidebarColumn/index.vue
  12. 56
      Web/src/utils/common/apiServeNames.js
  13. 6
      Web/src/utils/common/apiTableColumns.js
  14. 34
      Web/src/utils/common/index.js
  15. 2
      Web/src/views/system/autoJob/components/deferredJobDialog.vue
  16. 2
      Web/src/views/system/components/orgCascader.vue
  17. 2
      Web/src/views/system/components/orgTree.vue
  18. 2
      Web/src/views/system/components/userSelect.vue
  19. 2
      Web/src/views/system/components/userSelectDialog.vue
  20. 2
      Web/src/views/system/dataDict/components/dictDetailDialog.vue
  21. 2
      Web/src/views/system/dataDict/components/editDialog.vue
  22. 2
      Web/src/views/system/dataDict/components/editDictDetailDialog.vue
  23. 2
      Web/src/views/system/login/components/tenantDialog.vue
  24. 2
      Web/src/views/system/menu/components/editDialog.vue
  25. 2
      Web/src/views/system/message/components/editDialog.vue
  26. 2
      Web/src/views/system/message/components/publishDialog.vue
  27. 2
      Web/src/views/system/message/components/viewDialog.vue
  28. 2
      Web/src/views/system/org/components/editDialog.vue
  29. 2
      Web/src/views/system/position/components/editDialog.vue
  30. 2
      Web/src/views/system/role/components/editDataTypeDialog.vue
  31. 2
      Web/src/views/system/role/components/editDialog.vue
  32. 2
      Web/src/views/system/taskConifgure/index.vue
  33. 2
      Web/src/views/system/tenant/components/editDialog.vue
  34. 2
      Web/src/views/system/user/components/editDialog.vue
  35. 135
      Web/src/views/task/logisticsPlanLog/index.vue
  36. 200
      Web/src/views/task/productionQualityLog/index copy.vue
  37. 99
      Web/src/views/task/productionQualityLog/index.vue
  38. 39
      Web/src/views/task/taskSub/index.vue

BIN
Web/public/logo_op.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

9
Web/src/api/common/index.js

@ -1,6 +1,15 @@
// 公用API // 公用API
import request from '@/utils/request' import request from '@/utils/request'
// 通用post
export function getCommonPost(url,data) {
return request({
url: url,
method: 'post',
data
})
}
// 获取分页 // 获取分页
export function getCommonPaged(urlName,data) { export function getCommonPaged(urlName,data) {
return request({ return request({

3
Web/src/api/system/customlog.js

@ -5,9 +5,6 @@ export function getLogJsonList(uid) {
return request({ return request({
url: `/api/customlog/getlogrequestjsonlist`, url: `/api/customlog/getlogrequestjsonlist`,
method: 'get', method: 'get',
// headers:{
// 'accept':'*/*'
// },
params:{uId:uid}, params:{uId:uid},
}) })
} }

2
Web/src/components/Uploads/importErrorDialog.vue

@ -44,7 +44,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { reactive } from 'vue' import { reactive,defineExpose } from 'vue'
import * as XLSX from 'xlsx' import * as XLSX from 'xlsx'
const state = reactive({ const state = reactive({

2
Web/src/components/Uploads/multipleImgUpload.vue

@ -18,7 +18,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, reactive, onMounted } from 'vue' import { ref, reactive, onMounted,defineExpose } from 'vue'
import { Plus } from '@element-plus/icons-vue' import { Plus } from '@element-plus/icons-vue'
import { getFileUploadPath, getFiles } from '@/api/system/fileApi' import { getFileUploadPath, getFiles } from '@/api/system/fileApi'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'

2
Web/src/components/Uploads/singleImgUpload.vue

@ -12,7 +12,7 @@
</el-upload> </el-upload>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref,defineExpose } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { getFileUploadPath, getFiles } from '@/api/system/fileApi' import { getFileUploadPath, getFiles } from '@/api/system/fileApi'
import store from '@/stores' import store from '@/stores'

2
Web/src/components/apiEditPop/index.vue

@ -83,7 +83,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
defineOptions({ name: 'apiEditPop' }) defineOptions({ name: 'apiEditPop' })
import { reactive, ref, onMounted,nextTick } from 'vue' import { reactive, ref, onMounted,nextTick,defineExpose } from 'vue'
import { ElDialog,ElMessage } from 'element-plus' import { ElDialog,ElMessage } from 'element-plus'
import { getCommonInfoById } from '@/api/common/index' import { getCommonInfoById } from '@/api/common/index'
import apiTableColumns from '@/utils/common/apiTableColumns' import apiTableColumns from '@/utils/common/apiTableColumns'

12
Web/src/components/ediTtablePage/index.vue

@ -344,8 +344,11 @@
} }
}) })
// // noFilter
function getTableColumns(){ function getTableColumns(noFilter){
if(noFilter){
return props.tableColumns || apiTableColumns[props.apiName]
}else{
state.localTableColumnsName = getLocalTableColumnsName(useRoute().name) state.localTableColumnsName = getLocalTableColumnsName(useRoute().name)
if(props.apiType == 'detailApi'){ if(props.apiType == 'detailApi'){
state.localTableColumnsName = getLocalTableColumnsName(props.apiName+'Detail') state.localTableColumnsName = getLocalTableColumnsName(props.apiName+'Detail')
@ -354,6 +357,7 @@
state.initTableColums = props.tableColumns || apiTableColumns[props.apiName] state.initTableColums = props.tableColumns || apiTableColumns[props.apiName]
let _list = _local && _local != null && _local != undefined ? _local : JSON.parse(JSON.stringify(state.initTableColums)) let _list = _local && _local != null && _local != undefined ? _local : JSON.parse(JSON.stringify(state.initTableColums))
return _list return _list
}
// return props.tableColumns || apiTableColumns[props.apiName] // return props.tableColumns || apiTableColumns[props.apiName]
} }
@ -417,7 +421,7 @@
function rightOperationHadel(btn,scope) { function rightOperationHadel(btn,scope) {
// //
if(btn.name == 'apiUpdate'){ if(btn.name == 'apiUpdate'){
let _tableColums = getTableColumns() let _tableColums = props.tableColumns || apiTableColumns[props.apiName]
let _list = _tableColums.filter(item => !item.noEdit) let _list = _tableColums.filter(item => !item.noEdit)
apiEditPopRef.value.open(_list,scope.row) apiEditPopRef.value.open(_list,scope.row)
} }
@ -594,7 +598,7 @@
// //
else if (btn == 'create'){ else if (btn == 'create'){
beforClearEdit().then(() => { beforClearEdit().then(() => {
let _tableColums = getTableColumns() let _tableColums = props.tableColumns || apiTableColumns[props.apiName]
let _list = _tableColums.filter(item => !item.noEdit) let _list = _tableColums.filter(item => !item.noEdit)
apiEditPopRef.value.open(_list) apiEditPopRef.value.open(_list)
}) })

2
Web/src/components/importPop/index.vue

@ -41,7 +41,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
defineOptions({ name: 'importPop' }) defineOptions({ name: 'importPop' })
import { reactive, ref, onMounted } from 'vue' import { reactive, ref, onMounted,defineExpose } from 'vue'
import { ElDialog,ElMessage } from 'element-plus' import { ElDialog,ElMessage } from 'element-plus'
import { downloadByData } from '@/utils/download' import { downloadByData } from '@/utils/download'
import { getCommonImportTemplate } from '@/api/common/index' import { getCommonImportTemplate } from '@/api/common/index'

7
Web/src/layout/components/Sidebar/Logo.vue

@ -2,12 +2,12 @@
<div class="sidebar-logo-container"> <div class="sidebar-logo-container">
<transition name="sidebarLogoFade"> <transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/"> <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo&&showLogo" src="/logoSmall.png"> <img v-if="showLogo" src="/logo.png">
<h1 v-else class="sidebar-title">{{ title }} </h1> <h1 v-else class="sidebar-title">{{ title }} </h1>
</router-link> </router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/"> <router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo&&showLogo" src="/logo.png" class="sidebar-logo"> <img v-if="showLogo" src="/logo.png" class="sidebar-logo">
<h1 class="sidebar-title">{{ title }} </h1> <h1 v-else class="sidebar-title">{{ title }} </h1>
</router-link> </router-link>
</transition> </transition>
</div> </div>
@ -37,7 +37,6 @@ export default {
data() { data() {
return { return {
title: getPageTitle(), title: getPageTitle(),
logo: 'https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png'
} }
} }
} }

6
Web/src/layout/components/SidebarColumn/index.vue

@ -1,7 +1,7 @@
<template lang=""> <template lang="">
<el-aside width="70px" class="sidebar-column-container"> <el-aside width="70px" class="sidebar-column-container">
<div class="sidebar-logo-container" v-if="settingsStore.sidebarLogo"> <div class="sidebar-logo-container" v-if="settingsStore.sidebarLogo">
<img :src="state.logo" class="sidebar-logo" /> <img src="/logo_op.png" class="sidebar-logo" />
</div> </div>
<div class="menu-container"> <div class="menu-container">
<ul class="menu-list"> <ul class="menu-list">
@ -34,7 +34,6 @@ const emits = defineEmits(['modulesChange'])
const route = useRoute() const route = useRoute()
const state = reactive({ const state = reactive({
logo: 'https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png',
highlightId: 0, highlightId: 0,
modules: [] modules: []
}) })
@ -83,8 +82,7 @@ function columnModulesChange(modules) {
} }
.sidebar-logo { .sidebar-logo {
width: 32px; width: 60px;
height: 32px;
} }
.sidebar-logo-container { .sidebar-logo-container {

56
Web/src/utils/common/apiServeNames.js

@ -125,6 +125,62 @@ const apiServeNames = {
tableName:'SUPPLIER_PRO_OEE_TIME_DETAILS', tableName:'SUPPLIER_PRO_OEE_TIME_DETAILS',
taskName:'OEE时间明细' taskName:'OEE时间明细'
}, },
// 整车月度生产计划2
supplierproplaning:{
taskName:'整车月度生产计划2'
},
// M+6月物料需求计划
cherysuppliermrpmonth:{
taskName:'M+6月物料需求计划'
},
// 日物料需求计划
cherysuppliermrpdata:{
taskName:'日物料需求计划'
},
// 计划协议
cherysuppliersaweek:{
taskName:'计划协议'
},
// 采购订单
cherysupplierpo:{
taskName:'采购订单'
},
// 过焊装未过总装
cherysupplierporhschedul:{
taskName:'过焊装未过总装'
},
// 过涂装未过总装
cherysupplierprotschedul:{
taskName:'过涂装未过总装'
},
// 退货单
cherysupplierreturn:{
taskName:'退货单'
},
// 奇瑞RDC共享库存
supplierinvdata:{
taskName:'奇瑞RDC共享库存'
},
// 日MRP状态监控
cherysuppliermrp:{
taskName:'日MRP状态监控'
},
// 日MRP预警推移
cherysuppliermrpwarning:{
taskName:'日MRP预警推移'
},
} }
export default apiServeNames export default apiServeNames

6
Web/src/utils/common/apiTableColumns.js

@ -20,13 +20,13 @@ const apiTableColumns = {
// 任务列表 // 任务列表
tasksub:[ tasksub:[
{prop:'tableName',title:'表名',align:'left',width:240,disabled:true}, {prop:'tableName',title:'表名',align:'left',width:240,disabled:true},
{prop:'taskName',title:'任务名称',align:'left',width:160,disabled:true}, {prop:'taskName',title:'任务名称',align:'left',width:200,disabled:true},
{prop:'dataCount',title:'同步总数量',type:'number'}, {prop:'dataCount',title:'同步总数量',type:'number'},
{prop:'writeState',title:'是否传出',type:'tagFilter',options:EnumList.whetherBoolean,width:120,noEdit:true}, {prop:'writeState',title:'是否传出',type:'tagFilter',options:EnumList.whetherBoolean,width:120,noEdit:true},
{prop:'readState',title:'是否已确认',type:'tagFilter',options:EnumList.whetherBoolean,width:120,noEdit:true}, {prop:'readState',title:'是否已确认',type:'tagFilter',options:EnumList.whetherBoolean,width:120,noEdit:true},
{prop:'subscriber',title:'客户名'}, {prop:'subscriber',title:'客户名'},
{prop:'failedCount',title:'失败数',type:'number'}, {prop:'failedCount',title:'失败数',type:'number'},
{prop:'failedInfo',title:'失败信息'}, {prop:'failedInfo',title:'失败信息',tooltip:true,width:180},
{prop:'domain',title:'域名'}, {prop:'domain',title:'域名'},
{prop:'site',title:'站点'}, {prop:'site',title:'站点'},
{prop:'syncedPageCount',title:'更新完成次数',type:'number',width:160}, {prop:'syncedPageCount',title:'更新完成次数',type:'number',width:160},

34
Web/src/utils/common/index.js

@ -45,30 +45,48 @@ export async function downLoadJSONByString(stringData,title){
// 法根据tableName获取api // 法根据tableName获取api
export function getApiByServeName(value,prop='tableName'){ export function getApiByServeName(value,prop='tableName'){
let _api = null let _api = null
// taskName 特殊处理
if(prop == 'taskName'){
let _special = {
'整车月度生产计划1':'supplierproplaning',
'M+6月物料需求计划1':'cherysuppliermrpmonth',
'M+6月物料需求计划2':'cherysuppliermrpmonth',
'供应商共享库存-上午':'cherysuppliersinvdata',
'供应商共享库存-下午':'cherysuppliersinvdata',
}
for(let i in _special){
if(i == value){
_api = _special[i]
}
}
}
if(!_api){
for(let i in apiServeNames){ for(let i in apiServeNames){
if(apiServeNames[i][prop] == value){ if(apiServeNames[i][prop] == value){
_api = i _api = i
} }
} }
}
return _api return _api
} }
// 法根据tableName获取api对应的Coloums // 法根据tableName获取api对应的Coloums
export function getColoumsByServeName(value,prop='tableName',noEdit){ export function getColoumsByServeName(value,prop='tableName',noEdit){
let _api = null let _api = getApiByServeName(value,prop)
for(let i in apiServeNames){ let __colums = null
if(apiServeNames[i][prop] == value){ if(_api){
_api = i __colums = JSON.parse(JSON.stringify(apiTableColumns[_api]))
}
}
let __colums = JSON.parse(JSON.stringify(apiTableColumns[_api]))
if(noEdit){ if(noEdit){
__colums.forEach(item => { __colums.forEach(item => {
if(item.type == 'input' || item.type == 'numberInput' || item.type == 'filterSelect' || item.type == 'datetimeInput'){ if(item.type == 'input' || item.type == 'numberInput' || item.type == 'datetimeInput'){
item.type = null item.type = null
} }
if(item.type == 'filterSelect'){
item.type = 'filter'
}
}); });
} }
}
return __colums return __colums
} }

2
Web/src/views/system/autoJob/components/deferredJobDialog.vue

@ -28,7 +28,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { reactive, ref } from 'vue' import { reactive, ref,defineExpose } from 'vue'
import { deferredJob } from '@/api/system/autoJobApi' import { deferredJob } from '@/api/system/autoJobApi'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'

2
Web/src/views/system/components/orgCascader.vue

@ -13,7 +13,7 @@
</template> </template>
<script setup> <script setup>
// //
import { ref, onMounted, nextTick } from 'vue' import { ref, onMounted, nextTick,defineExpose } from 'vue'
import { getTreeList } from '@/api/system/orgApi' import { getTreeList } from '@/api/system/orgApi'
import { waiting } from '@/utils/index' import { waiting } from '@/utils/index'

2
Web/src/views/system/components/orgTree.vue

@ -9,7 +9,7 @@
</template> </template>
<script setup> <script setup>
// //
import { ref, onMounted } from 'vue' import { ref, onMounted,defineExpose } from 'vue'
import { getElTreeList } from '@/api/system/orgApi' import { getElTreeList } from '@/api/system/orgApi'
const orgTreeList = ref([]) const orgTreeList = ref([])

2
Web/src/views/system/components/userSelect.vue

@ -16,7 +16,7 @@
</template> </template>
<script setup> <script setup>
// //
import { ref } from 'vue' import { ref,defineExpose } from 'vue'
import { getSelectList } from '@/api/system/userApi' import { getSelectList } from '@/api/system/userApi'
const model = defineModel() const model = defineModel()

2
Web/src/views/system/components/userSelectDialog.vue

@ -68,7 +68,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { reactive } from 'vue' import { reactive,defineExpose } from 'vue'
import { getPaged } from '@/api/system/userApi' import { getPaged } from '@/api/system/userApi'
import { ElMessageBox, ElMessage } from 'element-plus' import { ElMessageBox, ElMessage } from 'element-plus'
import OrgCascader from '@/views/system/components/orgCascader.vue' import OrgCascader from '@/views/system/components/orgCascader.vue'

2
Web/src/views/system/dataDict/components/dictDetailDialog.vue

@ -71,7 +71,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { reactive, ref } from 'vue' import { reactive, ref,defineExpose } from 'vue'
import { getPaged, deleteDataDictDetail } from '@/api/system/dataDictDetailApi' import { getPaged, deleteDataDictDetail } from '@/api/system/dataDictDetailApi'
import { ElMessageBox, ElMessage } from 'element-plus' import { ElMessageBox, ElMessage } from 'element-plus'
import EditDictDetailDialog from './editDictDetailDialog.vue' import EditDictDetailDialog from './editDictDetailDialog.vue'

2
Web/src/views/system/dataDict/components/editDialog.vue

@ -55,7 +55,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { reactive, ref } from 'vue' import { reactive, ref,defineExpose } from 'vue'
import { getMaxSort, addDataDict, updateDataDict, getDataDict } from '@/api/system/dataDictApi' import { getMaxSort, addDataDict, updateDataDict, getDataDict } from '@/api/system/dataDictApi'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'

2
Web/src/views/system/dataDict/components/editDictDetailDialog.vue

@ -55,7 +55,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { reactive, ref } from 'vue' import { reactive, ref,defineExpose } from 'vue'
import { getMaxSort, addDataDictDetail, updateDataDictDetail, getDataDictDetail } from '@/api/system/dataDictDetailApi' import { getMaxSort, addDataDictDetail, updateDataDictDetail, getDataDictDetail } from '@/api/system/dataDictDetailApi'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'

2
Web/src/views/system/login/components/tenantDialog.vue

@ -33,7 +33,7 @@
</template> </template>
<script setup> <script setup>
import { reactive } from 'vue' import { reactive,defineExpose } from 'vue'
import store from '@/stores' import store from '@/stores'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const router = useRouter() const router = useRouter()

2
Web/src/views/system/menu/components/editDialog.vue

@ -152,7 +152,7 @@
</template> </template>
<script setup > <script setup >
import { reactive, ref, onMounted } from 'vue' import { reactive, ref, onMounted,defineExpose } from 'vue'
import { getTreeList, getMaxSort, addMenu,updateMenu, getMenu } from '@/api/system/menuApi' import { getTreeList, getMaxSort, addMenu,updateMenu, getMenu } from '@/api/system/menuApi'
import ElIconList from './elIconList.vue' import ElIconList from './elIconList.vue'
import FaIconList from './faIconList.vue' import FaIconList from './faIconList.vue'

2
Web/src/views/system/message/components/editDialog.vue

@ -57,7 +57,7 @@
</template> </template>
<script setup> <script setup>
import '@wangeditor/editor/dist/css/style.css' // css import '@wangeditor/editor/dist/css/style.css' // css
import { reactive, ref, shallowRef, onBeforeUnmount } from 'vue' import { reactive, ref, shallowRef, onBeforeUnmount,defineExpose } from 'vue'
import { addMessage, updateMessage, getMessage } from '@/api/system/messageApi' import { addMessage, updateMessage, getMessage } from '@/api/system/messageApi'
import { uploadFile } from '@/api/system/fileApi' import { uploadFile } from '@/api/system/fileApi'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'

2
Web/src/views/system/message/components/publishDialog.vue

@ -101,7 +101,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { reactive, ref } from 'vue' import { reactive, ref,defineExpose } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { publishMessage } from '@/api/system/messageApi' import { publishMessage } from '@/api/system/messageApi'
import EnumSelect from '@/views/system/components/enumSelect.vue' import EnumSelect from '@/views/system/components/enumSelect.vue'

2
Web/src/views/system/message/components/viewDialog.vue

@ -37,7 +37,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { reactive } from 'vue' import { reactive,defineExpose } from 'vue'
import { getMessage, setRead } from '@/api/system/messageApi' import { getMessage, setRead } from '@/api/system/messageApi'
const emits = defineEmits(['refresh']) const emits = defineEmits(['refresh'])

2
Web/src/views/system/org/components/editDialog.vue

@ -90,7 +90,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { reactive, ref } from 'vue' import { reactive, ref,defineExpose } from 'vue'
import { getMaxSort, addOrg, updateOrg, getOrg } from '@/api/system/orgApi' import { getMaxSort, addOrg, updateOrg, getOrg } from '@/api/system/orgApi'
import UserSelect from '@/views/system/components/userSelect.vue' import UserSelect from '@/views/system/components/userSelect.vue'
import OrgCascader from '@/views/system/components/orgCascader.vue' import OrgCascader from '@/views/system/components/orgCascader.vue'

2
Web/src/views/system/position/components/editDialog.vue

@ -48,7 +48,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { reactive, ref, onMounted } from 'vue' import { reactive, ref, onMounted,defineExpose } from 'vue'
import { getMaxSort, addPosition, updatePosition, getPosition } from '@/api/system/positionApi' import { getMaxSort, addPosition, updatePosition, getPosition } from '@/api/system/positionApi'
import { getElTreeList } from '@/api/system/menuApi' import { getElTreeList } from '@/api/system/menuApi'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'

2
Web/src/views/system/role/components/editDataTypeDialog.vue

@ -37,7 +37,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { reactive, ref } from 'vue' import { reactive, ref,defineExpose } from 'vue'
import { getRole, updateRoleDataType } from '@/api/system/roleApi' import { getRole, updateRoleDataType } from '@/api/system/roleApi'
import OrgTree from '@/views/system/components/orgTree.vue' import OrgTree from '@/views/system/components/orgTree.vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'

2
Web/src/views/system/role/components/editDialog.vue

@ -72,7 +72,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { reactive, ref, onMounted } from 'vue' import { reactive, ref, onMounted,defineExpose } from 'vue'
import { getMaxSort, addRole, updateRole, getRole } from '@/api/system/roleApi' import { getMaxSort, addRole, updateRole, getRole } from '@/api/system/roleApi'
import { getElTreeList } from '@/api/system/menuApi' import { getElTreeList } from '@/api/system/menuApi'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'

2
Web/src/views/system/taskConifgure/index.vue

@ -24,10 +24,12 @@ const state = reactive({
apiName:'taskconifgure', apiName:'taskconifgure',
searchFilter: { searchFilter: {
tableName: null, tableName: null,
taskName:null,
creationTime:null, creationTime:null,
}, },
searchOptions:[ searchOptions:[
{type:'input',prop:'tableName',label:'表名'}, {type:'input',prop:'tableName',label:'表名'},
{type:'input',prop:'taskName',label:'任务名'},
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, {type:'datetimerange',prop:'creationTime',label:'创建时间'},
], ],
rightOperation:[], rightOperation:[],

2
Web/src/views/system/tenant/components/editDialog.vue

@ -68,7 +68,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { reactive, ref } from 'vue' import { reactive, ref,defineExpose } from 'vue'
import { getMaxSort, addTenant } from '@/api/system/tenantApi' import { getMaxSort, addTenant } from '@/api/system/tenantApi'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'

2
Web/src/views/system/user/components/editDialog.vue

@ -117,7 +117,7 @@
</template> </template>
<script setup> <script setup>
defineOptions({ name: 'userEditDialog' }) defineOptions({ name: 'userEditDialog' })
import { ref, reactive, onMounted } from 'vue' import { ref, reactive, onMounted,defineExpose } from 'vue'
import { getSelectList } from '@/api/system/roleApi' import { getSelectList } from '@/api/system/roleApi'
import { addUser, updateUser, getUser } from '@/api/system/userApi' import { addUser, updateUser, getUser } from '@/api/system/userApi'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'

135
Web/src/views/task/logisticsPlanLog/index.vue

@ -1,5 +1,5 @@
<template> <template>
<div class="taskSubPage" v-loading="state.loading"> <div class="logisticsPlanLogPage" v-loading="state.loading">
<!-- 主表 --> <!-- 主表 -->
<tablePage <tablePage
:apiName="state.apiName" :apiName="state.apiName"
@ -10,10 +10,12 @@
:leftOperationColumnWidth="180" :leftOperationColumnWidth="180"
:authName="'logisticsPlanLog'" :authName="'logisticsPlanLog'"
:searchFilterOptions="state.searchFilterOptions" :searchFilterOptions="state.searchFilterOptions"
:tableCellClassName="tableCellClassName"
></tablePage> ></tablePage>
<!-- 明细抽屉 --> <!-- 明细抽屉 -->
<el-drawer <el-drawer
class="logisticsPlanLog_infoDrawerPop"
v-if="state.drawerShow" v-if="state.drawerShow"
v-model="state.drawerShow" v-model="state.drawerShow"
:title="`详情 (${state.infoCurrentRow.taskName} - uId:${state.infoCurrentRow.uId})`" :title="`详情 (${state.infoCurrentRow.taskName} - uId:${state.infoCurrentRow.uId})`"
@ -22,9 +24,18 @@
:size="'80%'" :size="'80%'"
@close="resetInfo" @close="resetInfo"
> >
<div style="height: 100%"> <div style="height: 100%;display: flex">
<tablePage
v-if="state.drawerShow"
:specialPageApi='`/api/customlog/getlogreponselist`'
:tableColumns="state.infoTableColumns"
:specialColumnName="state.infoTableColumnsName"
:specialLocalColumnName="state.infoTableColumnsName+'_LPLogDetail'"
:searchFilter="state.infoSearchFilter"
:hideSearch="true"
></tablePage>
<!-- 前端分页 --> <!-- 前端分页 -->
<elTable <!-- <elTable
style="height:calc(100% - 50px)" style="height:calc(100% - 50px)"
:tableData="state.infoTableData" :tableData="state.infoTableData"
:tableColumns="state.infoTableColumns" :tableColumns="state.infoTableColumns"
@ -37,7 +48,7 @@
@pageSizeChange="pageSizeChange" @pageSizeChange="pageSizeChange"
@pageCurrentChange="pageCurrentChange" @pageCurrentChange="pageCurrentChange"
:isHideOnlyOne="true" :isHideOnlyOne="true"
></elPager> ></elPager> -->
</div> </div>
</el-drawer> </el-drawer>
</div> </div>
@ -51,7 +62,7 @@
import elTable from '@/components/elTable/index.vue' import elTable from '@/components/elTable/index.vue'
import elPager from '@/components/elPager/index.vue' import elPager from '@/components/elPager/index.vue'
import { getLogJsonList } from '@/api/system/customlog' import { getLogJsonList } from '@/api/system/customlog'
import { downLoadJSONByString,getColoumsByServeName } from '@/utils/common/index' import { downLoadJSONByString,getColoumsByServeName,getApiByServeName } from '@/utils/common/index'
import EnumList from '@/utils/common/enumList' import EnumList from '@/utils/common/enumList'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
@ -78,6 +89,9 @@
drawerShow:false, drawerShow:false,
infoTableData:null, infoTableData:null,
infoTableColumns:[], infoTableColumns:[],
// colums
infoTableColumnsName:null,
infoSearchFilter: {},
columnWidth:null, columnWidth:null,
infoType:null, infoType:null,
infoAllData:null, infoAllData:null,
@ -90,49 +104,70 @@
}) })
function leftOperationHadel(btn,scope) { function leftOperationHadel(btn,scope) {
//
// if(btn.name == 'showInfo'){
// state.infoCurrentRow = scope.row
// // state.infoType = 1
// let _arr1 = [
// '1','2','M+6','',
// '','','','','','',
// '退','RDC','MRP','MRP'
// ]
// // list state.infoType = 2
// let _arr2 = [
// '','','','','BOM',
// '','','','',
// '','','','','','',
// 'M+6','',''
// ]
// state.loading = true
// getLogJsonList(scope.row.uId)
// .then(res=>{
// if(_arr1.indexOf(scope.row.taskName) >= 0){
// state.columnWidth = null
// state.infoType = 1
// state.infoTableData = [JSON.parse(res.message)]
// state.infoTableColumns = [
// {prop:'date',title:'date'},
// {prop:'pageSize',title:'pageSize'},
// {prop:'pageNum',title:'pageNum'},
// {prop:'isForce',title:'isForce'},
// ]
// }
// if(_arr2.indexOf(scope.row.taskName) >= 0){
// state.columnWidth = 120
// state.infoType = 2
// state.infoAllData = JSON.parse(res.message).list
// state.infoPager.total = state.infoAllData.length
// state.infoTableColumns = getColoumsByServeName(scope.row.taskName,'taskName',true)
// initInfoType2Pagedata()
// }
// nextTick(() => {
// state.drawerShow = true
// })
// })
// .finally(() => (state.loading = false))
// }
// //
if(btn.name == 'showInfo'){ if(btn.name == 'showInfo'){
state.infoCurrentRow = scope.row state.infoCurrentRow = scope.row
// state.infoType = 1
let _arr1 = [
'整车月度生产计划1','整车月度生产计划2','M+6月物料需求计划','日物料需求计划',
'计划协议','采购订单','过焊装未过总装','过涂装未过总装','排序供货','看板配送单',
'退货单','奇瑞RDC共享库存','日MRP状态监控','日MRP预警推移'
]
// list state.infoType = 2
let _arr2 = [
'来料检验数据','排产数据','供应商基础信息','人员资质信息','BOM主数据',
'过程控制项质量数据','生产过程数据','产品一次合格率','工位一次合格率',
'缺陷业务数据','物料主数据','附件类数据','工艺装备','工艺','供应商共享库存',
'M+6月物料需求计划风险确认','日物料需求计划风险确认','采购订单风险确认'
]
state.loading = true
getLogJsonList(scope.row.uId)
.then(res=>{
if(_arr1.indexOf(scope.row.taskName) >= 0){
state.columnWidth = null
state.infoType = 1
state.infoTableData = [JSON.parse(res.message)]
state.infoTableColumns = [
{prop:'date',title:'date'},
{prop:'pageSize',title:'pageSize'},
{prop:'pageNum',title:'pageNum'},
{prop:'isForce',title:'isForce'},
]
}
if(_arr2.indexOf(scope.row.taskName) >= 0){
state.columnWidth = 120
state.infoType = 2
state.infoAllData = JSON.parse(res.message).list
state.infoPager.total = state.infoAllData.length
state.infoTableColumns = getColoumsByServeName(scope.row.taskName,'taskName',true) state.infoTableColumns = getColoumsByServeName(scope.row.taskName,'taskName',true)
initInfoType2Pagedata() state.infoTableColumnsName = getApiByServeName(scope.row.taskName,'taskName')
if(!state.infoTableColumnsName){
ElMessage.error(`不支持的任务名: ${scope.row.taskName}`)
return
} }
state.infoSearchFilter = [
{
logic: "And",
column: 'Uid',
action: '==',
value: scope.row.uId
},
]
nextTick(() => { nextTick(() => {
state.drawerShow = true state.drawerShow = true
}) })
})
.finally(() => (state.loading = false))
} }
// json // json
if(btn.name == 'downloadJSON'){ if(btn.name == 'downloadJSON'){
@ -179,9 +214,16 @@
} }
} }
//
function tableCellClassName(data){
if(data.row.type == '错误' && data.column.property == 'type'){return 'table-danger-row'}
else{return 'normal-tableRow'}
}
</script> </script>
<style scope lang="scss"> <style scope lang="scss">
.taskSubPage{ .logisticsPlanLogPage{
height: 100%; height: 100%;
display: flex; display: flex;
width:100%; width:100%;
@ -190,4 +232,15 @@
margin-bottom:0 !important margin-bottom:0 !important
} }
} }
.logisticsPlanLog_infoDrawerPop {
.search-container{
position: fixed;
right: 71px;
top: 0px;
box-shadow: none;
border: none;
height: 60px;
}
}
</style> </style>

200
Web/src/views/task/productionQualityLog/index copy.vue

@ -0,0 +1,200 @@
<template>
<div class="taskSubPage" v-loading="state.loading">
<!-- 主表 -->
<tablePage
:apiName="state.apiName"
:searchOptions="state.searchOptions"
:searchFilter="state.searchFilter"
@leftOperationHadel="leftOperationHadel"
:leftOperation="state.leftOperation"
:leftOperationColumnWidth="180"
:authName="'productionQualityLog'"
:searchFilterOptions="state.searchFilterOptions"
:tableCellClassName="tableCellClassName"
></tablePage>
<!-- 明细抽屉 -->
<el-drawer
v-if="state.drawerShow"
v-model="state.drawerShow"
:title="`详情 (${state.infoCurrentRow.taskName} - uId:${state.infoCurrentRow.uId})`"
direction="rtl"
destroy-on-close
:size="'80%'"
@close="resetInfo"
>
<div style="height: 100%">
<!-- 前端分页 -->
<elTable
style="height:calc(100% - 50px)"
:tableData="state.infoTableData"
:tableColumns="state.infoTableColumns"
:columnWidth="state.columnWidth"
></elTable>
<elPager
v-if="state.infoType == 2"
style="margin-top: 15px;float:right"
:pager="state.infoPager"
@pageSizeChange="pageSizeChange"
@pageCurrentChange="pageCurrentChange"
:isHideOnlyOne="true"
></elPager>
</div>
</el-drawer>
</div>
</template>
<script setup>
defineOptions({ name: 'productionQualityLog' })
import { ElMessageBox, ElMessage,ElTable, ElTableColumn } from 'element-plus'
import { reactive, ref, onMounted,nextTick } from 'vue'
import tablePage from '@/components/tablePage/index.vue'
import elTable from '@/components/elTable/index.vue'
import elPager from '@/components/elPager/index.vue'
import { getLogJsonList } from '@/api/system/customlog'
import { downLoadJSONByString,getColoumsByServeName } from '@/utils/common/index'
import EnumList from '@/utils/common/enumList'
import { useRoute } from 'vue-router'
const route = useRoute()
const state = reactive({
apiName:'customlog',
loading:false,
searchFilter: {
taskName: null,
creationTime:null,
module:'生产质量'
},
searchOptions:[
{type:'input',prop:'taskName',label:'任务名称'},
{type:'datetimerange',prop:'creationTime',label:'创建时间'},
],
searchFilterOptions:{ module:{action:'=='} },
leftOperation:[
{label:'查看详情',name:'showInfo',link:true,type:'primary'},
{label:'下载JSON',name:'downloadJSON',link:true,type:'warning'},
],
//
drawerShow:false,
infoTableData:null,
infoTableColumns:[],
columnWidth:null,
infoType:null,
infoAllData:null,
infoCurrentRow:null,
infoPager:{
page: 1,
pageSize: 20,
total: null,
},
})
function leftOperationHadel(btn,scope) {
//
if(btn.name == 'showInfo'){
state.infoCurrentRow = scope.row
// state.infoType = 1
let _arr1 = [
'整车月度生产计划1','整车月度生产计划2','M+6月物料需求计划','日物料需求计划',
'计划协议','采购订单','过焊装未过总装','过涂装未过总装','排序供货','看板配送单',
'退货单','奇瑞RDC共享库存','日MRP状态监控','日MRP预警推移'
]
// list state.infoType = 2
let _arr2 = [
'来料检验数据','排产数据','供应商基础信息','人员资质信息','BOM主数据',
'过程控制项质量数据','生产过程数据','产品一次合格率','工位一次合格率',
'缺陷业务数据','物料主数据','附件类数据','工艺装备','工艺','供应商共享库存',
'M+6月物料需求计划风险确认','日物料需求计划风险确认','采购订单风险确认'
]
state.loading = true
getLogJsonList(scope.row.uId)
.then(res=>{
if(_arr1.indexOf(scope.row.taskName) >= 0){
state.columnWidth = null
state.infoType = 1
state.infoTableData = [JSON.parse(res.message)]
state.infoTableColumns = [
{prop:'date',title:'date'},
{prop:'pageSize',title:'pageSize'},
{prop:'pageNum',title:'pageNum'},
{prop:'isForce',title:'isForce'},
]
}
if(_arr2.indexOf(scope.row.taskName) >= 0){
state.columnWidth = 120
state.infoType = 2
state.infoAllData = JSON.parse(res.message).list
state.infoPager.total = state.infoAllData.length
state.infoTableColumns = getColoumsByServeName(scope.row.taskName,'taskName',true)
initInfoType2Pagedata()
}
nextTick(() => {
state.drawerShow = true
})
})
.finally(() => (state.loading = false))
}
// json
if(btn.name == 'downloadJSON'){
state.loading = true
getLogJsonList(scope.row.uId)
.then(res=>{
downLoadJSONByString(res.message,`${route.meta.title}_uid=${scope.row.uId}.json`)
})
.finally(() => (state.loading = false))
}
}
// InfoType=2
function initInfoType2Pagedata() {
state.infoTableData = state.infoAllData.slice((state.infoPager.page-1) * state.infoPager.pageSize,state.infoPager.page * state.infoPager.pageSize)
}
function pageSizeChange(data) {
state.infoPager.pageSize = data
state.infoPager.page = 1
nextTick(() => {
initInfoType2Pagedata()
})
}
function pageCurrentChange(data) {
state.infoPager.page = data
nextTick(() => {
initInfoType2Pagedata()
})
}
function resetInfo(){
state.drawerShow=false
state.infoTableData=null
state.infoTableColumns=[]
state.columnWidth=null
state.infoType=null
state.infoAllData=null
state.infoPager={
page: 1,
pageSize: 20,
total: null,
}
}
//
function tableCellClassName(data){
if(data.row.type == '错误' && data.column.property == 'type'){return 'table-danger-row'}
else{return 'normal-tableRow'}
}
</script>
<style scope lang="scss">
.taskSubPage{
height: 100%;
display: flex;
width:100%;
.el-drawer__header {
margin-bottom:0 !important
}
}
</style>

99
Web/src/views/task/productionQualityLog/index.vue

@ -1,5 +1,5 @@
<template> <template>
<div class="taskSubPage" v-loading="state.loading"> <div class="productionQualityLogPage" v-loading="state.loading">
<!-- 主表 --> <!-- 主表 -->
<tablePage <tablePage
:apiName="state.apiName" :apiName="state.apiName"
@ -10,10 +10,12 @@
:leftOperationColumnWidth="180" :leftOperationColumnWidth="180"
:authName="'productionQualityLog'" :authName="'productionQualityLog'"
:searchFilterOptions="state.searchFilterOptions" :searchFilterOptions="state.searchFilterOptions"
:tableCellClassName="tableCellClassName"
></tablePage> ></tablePage>
<!-- 明细抽屉 --> <!-- 明细抽屉 -->
<el-drawer <el-drawer
class="productionQualityLog_infoDrawerPop"
v-if="state.drawerShow" v-if="state.drawerShow"
v-model="state.drawerShow" v-model="state.drawerShow"
:title="`详情 (${state.infoCurrentRow.taskName} - uId:${state.infoCurrentRow.uId})`" :title="`详情 (${state.infoCurrentRow.taskName} - uId:${state.infoCurrentRow.uId})`"
@ -22,22 +24,16 @@
:size="'80%'" :size="'80%'"
@close="resetInfo" @close="resetInfo"
> >
<div style="height: 100%"> <div style="height: 100%;display: flex">
<!-- 前端分页 --> <tablePage
<elTable v-if="state.drawerShow"
style="height:calc(100% - 50px)" :specialPageApi='`/api/customlog/getlogreponselist`'
:tableData="state.infoTableData"
:tableColumns="state.infoTableColumns" :tableColumns="state.infoTableColumns"
:columnWidth="state.columnWidth" :specialColumnName="state.infoTableColumnsName"
></elTable> :specialLocalColumnName="state.infoTableColumnsName+'_PQLogDetail'"
<elPager :searchFilter="state.infoSearchFilter"
v-if="state.infoType == 2" :hideSearch="true"
style="margin-top: 15px;float:right" ></tablePage>
:pager="state.infoPager"
@pageSizeChange="pageSizeChange"
@pageCurrentChange="pageCurrentChange"
:isHideOnlyOne="true"
></elPager>
</div> </div>
</el-drawer> </el-drawer>
</div> </div>
@ -51,7 +47,7 @@
import elTable from '@/components/elTable/index.vue' import elTable from '@/components/elTable/index.vue'
import elPager from '@/components/elPager/index.vue' import elPager from '@/components/elPager/index.vue'
import { getLogJsonList } from '@/api/system/customlog' import { getLogJsonList } from '@/api/system/customlog'
import { downLoadJSONByString,getColoumsByServeName } from '@/utils/common/index' import { downLoadJSONByString,getColoumsByServeName,getApiByServeName } from '@/utils/common/index'
import EnumList from '@/utils/common/enumList' import EnumList from '@/utils/common/enumList'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
@ -78,6 +74,9 @@
drawerShow:false, drawerShow:false,
infoTableData:null, infoTableData:null,
infoTableColumns:[], infoTableColumns:[],
// colums
infoTableColumnsName:null,
infoSearchFilter: {},
columnWidth:null, columnWidth:null,
infoType:null, infoType:null,
infoAllData:null, infoAllData:null,
@ -93,46 +92,23 @@
// //
if(btn.name == 'showInfo'){ if(btn.name == 'showInfo'){
state.infoCurrentRow = scope.row state.infoCurrentRow = scope.row
// state.infoType = 1
let _arr1 = [
'整车月度生产计划1','整车月度生产计划2','M+6月物料需求计划','日物料需求计划',
'计划协议','采购订单','过焊装未过总装','过涂装未过总装','排序供货','看板配送单',
'退货单','奇瑞RDC共享库存','日MRP状态监控','日MRP预警推移'
]
// list state.infoType = 2
let _arr2 = [
'来料检验数据','排产数据','供应商基础信息','人员资质信息','BOM主数据',
'过程控制项质量数据','生产过程数据','产品一次合格率','工位一次合格率',
'缺陷业务数据','物料主数据','附件类数据','工艺装备','工艺','供应商共享库存',
'M+6月物料需求计划风险确认','日物料需求计划风险确认','采购订单风险确认'
]
state.loading = true
getLogJsonList(scope.row.uId)
.then(res=>{
if(_arr1.indexOf(scope.row.taskName) >= 0){
state.columnWidth = null
state.infoType = 1
state.infoTableData = [JSON.parse(res.message)]
state.infoTableColumns = [
{prop:'date',title:'date'},
{prop:'pageSize',title:'pageSize'},
{prop:'pageNum',title:'pageNum'},
{prop:'isForce',title:'isForce'},
]
}
if(_arr2.indexOf(scope.row.taskName) >= 0){
state.columnWidth = 120
state.infoType = 2
state.infoAllData = JSON.parse(res.message).list
state.infoPager.total = state.infoAllData.length
state.infoTableColumns = getColoumsByServeName(scope.row.taskName,'taskName',true) state.infoTableColumns = getColoumsByServeName(scope.row.taskName,'taskName',true)
initInfoType2Pagedata() state.infoTableColumnsName = getApiByServeName(scope.row.taskName,'taskName')
if(!state.infoTableColumnsName){
ElMessage.error(`不支持的任务名: ${scope.row.taskName}`)
return
} }
state.infoSearchFilter = [
{
logic: "And",
column: 'Uid',
action: '==',
value: scope.row.uId
},
]
nextTick(() => { nextTick(() => {
state.drawerShow = true state.drawerShow = true
}) })
})
.finally(() => (state.loading = false))
} }
// json // json
if(btn.name == 'downloadJSON'){ if(btn.name == 'downloadJSON'){
@ -179,9 +155,15 @@
} }
} }
//
function tableCellClassName(data){
if(data.row.type == '错误' && data.column.property == 'type'){return 'table-danger-row'}
else{return 'normal-tableRow'}
}
</script> </script>
<style scope lang="scss"> <style scope lang="scss">
.taskSubPage{ .productionQualityLogPage{
height: 100%; height: 100%;
display: flex; display: flex;
width:100%; width:100%;
@ -190,4 +172,15 @@
margin-bottom:0 !important margin-bottom:0 !important
} }
} }
.productionQualityLog_infoDrawerPop {
.search-container{
position: fixed;
right: 71px;
top: 0px;
box-shadow: none;
border: none;
height: 60px;
}
}
</style> </style>

39
Web/src/views/task/taskSub/index.vue

@ -10,23 +10,28 @@
:leftOperation="state.leftOperation" :leftOperation="state.leftOperation"
:rightOperation="state.rightOperation" :rightOperation="state.rightOperation"
@rightOperationHadel="rightOperationHadel" @rightOperationHadel="rightOperationHadel"
:tableCellClassName="tableCellClassName"
></tablePage> ></tablePage>
<!-- 明细抽屉 --> <!-- 明细抽屉 -->
<el-drawer <el-drawer
class="taskSub_infoDrawerPop"
v-model="state.drawerShow" v-model="state.drawerShow"
title="详情" :title="`详情(${state.taskName})`"
direction="rtl" direction="rtl"
destroy-on-close destroy-on-close
:size="'80%'" :size="'80%'"
> >
<div style="height: 100%;display: flex"> <div style="height: 100%;display: flex">
<tablePage <tablePage
v-if="state.drawerShow"
:apiName="state.apiName" :apiName="state.apiName"
:tableColumns="state.infoTableColumns" :tableColumns="state.infoTableColumns"
:specialColumnName="state.infoTableColumnsName"
:specialLocalColumnName="state.infoTableColumnsName+'_taskDetail'"
:searchFilter="state.infoSearchFilter" :searchFilter="state.infoSearchFilter"
:hideSearch="true"
:apiType="'detailApi'" :apiType="'detailApi'"
:hideSearch="true"
></tablePage> ></tablePage>
</div> </div>
</el-drawer> </el-drawer>
@ -38,7 +43,7 @@
import { ElMessageBox, ElMessage,ElTable, ElTableColumn } from 'element-plus' import { ElMessageBox, ElMessage,ElTable, ElTableColumn } from 'element-plus'
import { reactive, ref, onMounted,nextTick } from 'vue' import { reactive, ref, onMounted,nextTick } from 'vue'
import tablePage from '@/components/tablePage/index.vue' import tablePage from '@/components/tablePage/index.vue'
import { getColoumsByServeName } from '@/utils/common/index' import { getApiByServeName,getColoumsByServeName } from '@/utils/common/index'
import { getCanceltaskByUid } from '@/api/system/taskSubApi' import { getCanceltaskByUid } from '@/api/system/taskSubApi'
const state = reactive({ const state = reactive({
@ -55,10 +60,12 @@
{label:'查看详情',name:'showInfo',link:true,type:'primary'} {label:'查看详情',name:'showInfo',link:true,type:'primary'}
], ],
drawerShow:false, drawerShow:false,
// table taskName:null,
// colums
infoTableColumns:null, infoTableColumns:null,
// table // colums
infoSearchFilter: [], infoTableColumnsName:null,
infoSearchFilter: {},
rightOperation:[], rightOperation:[],
}) })
@ -76,15 +83,17 @@
// / // /
function hideCanceltaskBtn(row){ function hideCanceltaskBtn(row){
let _arr = ['M+6月物料需求计划风险确认','日物料需求计划风险确认','采购订单风险确认'] let _arr = ['M+6月物料需求计划风险确认','日物料需求计划风险确认','采购订单风险确认']
// >0 // >0
return !(_arr.indexOf(row.taskName) >= 0 && row.failedCount > 0) return !(_arr.indexOf(row.taskName) >= 0 && row.failedCount > 0)
} }
function leftOperationHadel(btn,scope) { function leftOperationHadel(btn,scope) {
// //
if(btn.name == 'showInfo'){ if(btn.name == 'showInfo'){
state.taskName = scope.row.taskName
state.infoTableColumns = getColoumsByServeName(scope.row.tableName,'tableName',true) state.infoTableColumns = getColoumsByServeName(scope.row.tableName,'tableName',true)
if(!state.infoTableColumns){ state.infoTableColumnsName = getApiByServeName(scope.row.tableName,'tableName')
if(!state.infoTableColumnsName){
ElMessage.error(`不支持的表名: ${scope.row.tableName}`) ElMessage.error(`不支持的表名: ${scope.row.tableName}`)
return return
} }
@ -129,6 +138,12 @@
} }
} }
//
function tableCellClassName(data){
if(Number(data.row.failedCount) > 0 && data.column.property == 'failedCount'){return 'table-danger-row'}
else{return 'normal-tableRow'}
}
</script> </script>
<style scope lang="scss"> <style scope lang="scss">
@ -141,4 +156,12 @@
margin-bottom:0 !important margin-bottom:0 !important
} }
} }
.taskSub_infoDrawerPop .search-container{
position: fixed;
right: 71px;
top: 0px;
box-shadow: none;
border: none;
height: 60px;
}
</style> </style>
Loading…
Cancel
Save