Compare commits
12 Commits
Author | SHA1 | Date |
---|---|---|
|
3a265eb2ef | 1 day ago |
|
42520a2811 | 2 days ago |
|
b82827bf71 | 3 days ago |
|
5f53b4be6e | 4 days ago |
|
a330fee7d7 | 5 days ago |
|
ab46d560ac | 1 week ago |
|
5e6ae267df | 1 week ago |
|
36d57e116d | 1 week ago |
|
341097ef6f | 2 weeks ago |
|
2f59b9a618 | 2 weeks ago |
|
f6b37e4cb5 | 2 weeks ago |
|
b190182cc4 | 2 weeks ago |
68 changed files with 5284 additions and 26 deletions
@ -0,0 +1,5 @@ |
|||
let systemConfig = { |
|||
title:'EQI接口', |
|||
// 请求路径
|
|||
baseUrl: 'http://192.168.1.228:7629', |
|||
} |
@ -0,0 +1,114 @@ |
|||
// 公用API
|
|||
import request from '@/utils/request' |
|||
|
|||
// 获取分页
|
|||
export function getCommonPaged(urlName,data) { |
|||
return request({ |
|||
url: `/api/${urlName}/getdatapaged`, |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
// 通过id获取实体
|
|||
export function getCommonInfoById(urlName,id) { |
|||
return request({ |
|||
url: `/api/${urlName}/getbyid`, |
|||
method: 'get', |
|||
params:{id:id} |
|||
}) |
|||
} |
|||
|
|||
// 新增提交
|
|||
export function postCommonCreate(urlName,data) { |
|||
return request({ |
|||
url: `/api/${urlName}/create`, |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
// 修改提交
|
|||
export function putCommonUpdate(urlName,data) { |
|||
return request({ |
|||
url: `/api/${urlName}/update`, |
|||
method: 'put', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
// 删除提交
|
|||
export function deleteCommonApi(urlName,id) { |
|||
return request({ |
|||
url: `/api/${urlName}/delete`, |
|||
method: 'DELETE', |
|||
headers:{ |
|||
'content-type':'application/json-patch+json' |
|||
}, |
|||
data:id |
|||
}) |
|||
} |
|||
|
|||
// 导出
|
|||
export function postCommonExport(urlName,data) { |
|||
return request({ |
|||
url: `/api/${urlName}/exportdata`, |
|||
method: 'post', |
|||
responseType:'blob', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
// 获取导入模板
|
|||
export function getCommonImportTemplate(urlName) { |
|||
return request({ |
|||
url: `/api/${urlName}/getimporttemplate`, |
|||
method: 'get', |
|||
responseType:'blob', |
|||
}) |
|||
} |
|||
|
|||
// 手动开关
|
|||
export function getCommonCustominvoke(urlName,params) { |
|||
return request({ |
|||
url: `/api/${urlName}/custominvoke`, |
|||
method: 'get', |
|||
params:params |
|||
}) |
|||
} |
|||
|
|||
// 获取明细列表-如:任务列表-查看详情
|
|||
export function getCommonDeatailPaged(urlName,data) { |
|||
return request({ |
|||
url: `/api/${urlName}/getdetail`, |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
// 通过id获取详情实体
|
|||
export function getCommonDetailById(urlName,id) { |
|||
return request({ |
|||
url: `/api/${urlName}/getdetialbyid`, |
|||
method: 'get', |
|||
params:{id:id} |
|||
}) |
|||
} |
|||
|
|||
// 手动传出(批量)
|
|||
export function postCommonConfirmMany(urlName,data) { |
|||
return request({ |
|||
url: `/api/${urlName}/confirm`, |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
// 保存页面(批量)
|
|||
export function postCommonUpdateMany(urlName,data) { |
|||
return request({ |
|||
url: `/api/${urlName}/batchupdate`, |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
@ -0,0 +1,10 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 是否自动执行
|
|||
export function getSetisautoByUid(params) { |
|||
return request({ |
|||
url: `/api/taskconifgure/setisauto`, |
|||
method: 'get', |
|||
params:params |
|||
}) |
|||
} |
@ -0,0 +1,218 @@ |
|||
<template> |
|||
<el-dialog |
|||
v-model="dialogVisible" |
|||
:title="handleType=='create' ? '新增' : '编辑'" |
|||
width="70%" |
|||
:close-on-click-modal="false" |
|||
top="10vh" |
|||
> |
|||
<div v-loading="formLoading" style="height:calc(70vh - 50px);overflow:auto"> |
|||
<el-form |
|||
ref="editFormRef" |
|||
v-if="!formLoading" |
|||
:model="formData" |
|||
:size="'large'" |
|||
:rules="formRulesData"> |
|||
<el-row :gutter="40"> |
|||
<el-col |
|||
v-for="(item, index) in formConfig" |
|||
:span="getItemConfig(item,'colSpan') || 12" |
|||
:key="index" |
|||
> |
|||
<el-form-item |
|||
:prop="getItemConfig(item,'prop')" |
|||
:label="getItemConfig(item,'title')" |
|||
:label-width="getItemConfig(item,'labelWidth') || 180" |
|||
> |
|||
<!-- 文本 --> |
|||
<el-input |
|||
v-if="!getItemConfig(item) || getItemConfig(item) == 'input'" |
|||
v-model="formData[getItemConfig(item,'prop')]" |
|||
:placeholder="'请输入'" |
|||
:clearable="!getItemConfig(item,'noClear')" |
|||
:disabled="getItemConfig(item,'disabled')" |
|||
/> |
|||
<!-- 数字 --> |
|||
<el-input-number |
|||
v-if="getItemConfig(item) == 'number'" |
|||
v-model="formData[getItemConfig(item,'prop')]" |
|||
:min="getItemConfig(item,'min')" |
|||
:max="getItemConfig(item,'max')" |
|||
:clearable="!getItemConfig(item,'noClear')" |
|||
:disabled="getItemConfig(item,'disabled')" |
|||
/> |
|||
<!-- 时间 --> |
|||
<el-date-picker |
|||
v-if="getItemConfig(item) == 'datetime'" |
|||
v-model="formData[getItemConfig(item,'prop')]" |
|||
style="width:100%" |
|||
type="datetime" |
|||
format="YYYY-MM-DD HH:mm:ss" |
|||
value-format="YYYY-MM-DD HH:mm:ss" |
|||
:clearable="!getItemConfig(item,'noClear')" |
|||
:disabled="getItemConfig(item,'disabled')" |
|||
/> |
|||
<!-- 选择框 --> |
|||
<el-select |
|||
v-if="getItemConfig(item) == 'select' || getItemConfig(item) == 'tagFilter' || getItemConfig(item) == 'filter'" |
|||
v-model="formData[getItemConfig(item,'prop')]" |
|||
:filterable="!getItemConfig(item,'noSearch')" |
|||
placeholder="请选择" |
|||
:clearable="!getItemConfig(item,'noClear')" |
|||
:disabled="getItemConfig(item,'disabled')" |
|||
> |
|||
<el-option |
|||
v-for="(op,op_index) in getItemConfig(item,'options')" |
|||
:key="op_index" |
|||
:label="op.label" |
|||
:value="op.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
<template #footer> |
|||
<div style="padding:10px"> |
|||
<el-button el-button @click="close">取消</el-button> |
|||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确定</el-button> |
|||
</div> |
|||
</template> |
|||
</el-dialog> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
defineOptions({ name: 'apiEditPop' }) |
|||
import { reactive, ref, onMounted,nextTick } from 'vue' |
|||
import { ElDialog,ElMessage } from 'element-plus' |
|||
import { getCommonInfoById } from '@/api/common/index' |
|||
import apiTableColumns from '@/utils/common/apiTableColumns' |
|||
|
|||
import { useRoute } from 'vue-router' |
|||
const route = useRoute() |
|||
|
|||
const dialogVisible = ref(false) // 弹窗的是否展示 |
|||
const formLoading = ref(false) // 表单的加载中 |
|||
const formData = ref(null)//表单数据 |
|||
const formConfig = ref(null)//表单配置 |
|||
const handleType = ref(null)//操作方式 |
|||
const formRulesData = ref(null) |
|||
|
|||
const props = defineProps({ |
|||
// api名称 |
|||
apiName: { |
|||
type: String, |
|||
default: null |
|||
}, |
|||
// 表单规则 |
|||
formRules:{ |
|||
type: Object, |
|||
default: null |
|||
} |
|||
}) |
|||
|
|||
/** 重置表单 */ |
|||
const resetForm = () => { |
|||
// 重置上传状态和文件 |
|||
formLoading.value = false |
|||
formData.value = null |
|||
formConfig.value = null |
|||
} |
|||
|
|||
/** 打开弹窗 */ |
|||
const open = (configs,row) => { |
|||
resetForm() |
|||
getFormRules() |
|||
nextTick(() => { |
|||
dialogVisible.value = true |
|||
formConfig.value = configs |
|||
// 编辑数据处理 |
|||
if(row){ |
|||
handleType.value='edit' |
|||
getFormData(row.uId) |
|||
}else{ |
|||
handleType.value='create' |
|||
// 新增数据处理 |
|||
formData.value = {} |
|||
configs.forEach(item=>{ |
|||
if(item.type && item.type == 'number'){ |
|||
formData.value[item.prop] = 0 |
|||
}else{ |
|||
formData.value[item.prop] = "" |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
|
|||
/** 关闭弹窗 */ |
|||
const close = () => { |
|||
// 重置上传状态和文件 |
|||
resetForm() |
|||
dialogVisible.value = false |
|||
} |
|||
|
|||
// 更改加载 |
|||
const changeLoading = (data) => { |
|||
formLoading.value = data |
|||
} |
|||
|
|||
const editFormRef = ref(null)//表单配置 |
|||
// 获取验证是否通过 |
|||
const validate = (data) => { |
|||
return editFormRef.value.validate(data) |
|||
} |
|||
|
|||
defineExpose({ open,close,changeLoading,validate }) |
|||
|
|||
// 获取规则 |
|||
const getFormRules = () => { |
|||
if(props.formRules) { |
|||
formRulesData.value = props.formRules |
|||
}else{ |
|||
formRulesData.value = {} |
|||
apiTableColumns[props.apiName].forEach(item=>{ |
|||
if(item.required || (item.searchFilter && item.searchFilter.required)){ |
|||
formRulesData.value[item.prop] = [{ required: true, message: '必填项', trigger: 'blur' }] |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
|
|||
/** 获取表单 */ |
|||
const getFormData = async (uId) => { |
|||
formLoading.value = true |
|||
getCommonInfoById(props.apiName,uId) |
|||
.then(res=>{ |
|||
formData.value = res.data |
|||
formLoading.value = false |
|||
}) |
|||
.catch(err=>{ |
|||
dialogVisible.value = false |
|||
ElMessage.error('获取失败,请重试') |
|||
}) |
|||
.finally(()=>{formLoading.value = false}) |
|||
} |
|||
|
|||
// 获取类型 |
|||
const getItemConfig = (item,type='type') => { |
|||
if(item.formConfig && item.formConfig[type]){ |
|||
return item.formConfig[type] |
|||
}else{ |
|||
return item[type] |
|||
} |
|||
} |
|||
|
|||
const emits = defineEmits(['submitEditForm']) |
|||
/** 提交表单 */ |
|||
const submitForm = async () => { |
|||
emits('submitEditForm',handleType.value,formData.value,formConfig.value) |
|||
} |
|||
|
|||
|
|||
</script> |
|||
<style lang="scss" scoped> |
|||
::v-deep .el-row{ |
|||
margin:0 !important |
|||
} |
|||
</style> |
@ -0,0 +1,895 @@ |
|||
<template> |
|||
<div class="app-container" v-loading="state.loading"> |
|||
<!-- 查询头部 --> |
|||
<el-card class="search-container" v-if="!props.hideSearch"> |
|||
<el-form :inline="true"> |
|||
<el-form-item |
|||
v-auth="props.apiName + state.searchBtnOptions['search'].auth" |
|||
v-for="(item,index) in props.searchOptions" |
|||
:key="index" |
|||
:label="item.label"> |
|||
<!-- 文本 --> |
|||
<el-input |
|||
v-if="item.type == 'input'" |
|||
v-model="props.searchFilter[item.prop]" |
|||
:placeholder="item.label" |
|||
:clearable="!item.noClear" |
|||
/> |
|||
<!-- 数字 --> |
|||
<el-input-number |
|||
v-if="item.type == 'number'" |
|||
v-model="props.searchFilter[item.prop]" |
|||
:min="item.min" |
|||
:max="item.max" |
|||
/> |
|||
<!-- 时间区域 --> |
|||
<el-date-picker |
|||
v-if="item.type == 'datetimerange'" |
|||
v-model="props.searchFilter[item.prop]" |
|||
type="datetimerange" |
|||
start-placeholder="起始时间" |
|||
end-placeholder="结束时间" |
|||
format="YYYY-MM-DD HH:mm:ss" |
|||
value-format="YYYY-MM-DD HH:mm:ss" |
|||
/> |
|||
<!-- 选择框 --> |
|||
<el-select |
|||
v-if="item.type == 'select'" |
|||
v-model="props.searchFilter[item.prop]" |
|||
:filterable="!item.noSearch" |
|||
placeholder="请选择" |
|||
style="width: 240px" |
|||
:clearable="!item.noClear" |
|||
> |
|||
<el-option |
|||
v-for="(op,op_index) in item.options" |
|||
:key="op_index" |
|||
:label="op.label" |
|||
:value="op.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button |
|||
v-for="(btn,btn_key) in props.searchButtons" |
|||
:key="btn_key" |
|||
:icon="state.searchBtnOptions[btn].icon" |
|||
v-auth="state.searchBtnOptions[btn].sAuth || props.apiName + state.searchBtnOptions[btn].auth" |
|||
:type="state.searchBtnOptions[btn].type" |
|||
@click="searchBtnHandle(btn)" |
|||
>{{state.searchBtnOptions[btn].label}}</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
<!-- 右侧按钮(如:保存页面) --> |
|||
<div> |
|||
<el-button |
|||
v-for="(btn,btn_key) in state.searchRightBtn" |
|||
:key="btn_key" |
|||
:icon="btn.icon" |
|||
v-auth="btn.sAuth || props.apiName + btn.auth" |
|||
:type="btn.type" |
|||
@click="searchRightBtnHandle(btn)" |
|||
>{{btn.label}}</el-button> |
|||
</div> |
|||
</el-card> |
|||
<!-- 头部详情 --> |
|||
<el-card v-loading="state.detailLoading" class="headerInfo-container" v-if="!props.hideHeaderInfo"> |
|||
<el-descriptions :title="`当前页【第${getIndexById()}行】数据信息`" :border="true" :column="6" v-if="state.headerInfoData && state.headerInfoData.length > 0"> |
|||
<el-descriptions-item |
|||
v-for="(item,index) in state.headerInfoData" |
|||
:key="index" |
|||
:label="item.label"> |
|||
{{item.value}} |
|||
</el-descriptions-item> |
|||
</el-descriptions> |
|||
<el-empty v-else description="暂无数据" class="headerInfoEmpty"/> |
|||
</el-card> |
|||
<!-- 列表 --> |
|||
<el-card class="paged-table-container"> |
|||
<elTable |
|||
ref="table_Ref" |
|||
:columnWidth="props.columnWidth" |
|||
:columnHeaderAlign="props.columnHeaderAlign" |
|||
:columnAlign="props.columnAlign" |
|||
:tableData="state.tableData" |
|||
:tableColumns="getTableColumns()" |
|||
@sortChange="sortChange" |
|||
:leftOperation="props.leftOperation" |
|||
@leftOperationHadel="leftOperationHadel" |
|||
:rightOperation="getRightOperation()" |
|||
@rightOperationHadel="rightOperationHadel" |
|||
:multipleTable="props.multipleTable" |
|||
@tableSelectionHandle="tableSelectionHandle" |
|||
@editItemFocusHandle="(item,scope,event)=>{getItemDetail(item.type,scope.row,'focus')}" |
|||
@editItemChangeHandle="editItemChangeHandle" |
|||
@cell-click="(row,column,cell,event)=>{getItemDetail('cell',row,'cellClick')}" |
|||
@editItemClearHandle="(item,scope)=>{getItemDetail(item.type,scope.row,'clear')}" |
|||
:getEditItemDisabled="getEditItemDisabled" |
|||
:selectableDisabled="selectableDisabled" |
|||
:tableRowClassName="tableRowClassName" |
|||
:showTableIndex="props.showTableIndex" |
|||
></elTable> |
|||
|
|||
<!-- :tableFormRules="state.tableFormRulesData" --> |
|||
|
|||
<elPager |
|||
v-loading="state.pageLoading" |
|||
style="margin-top: 15px;float:right" |
|||
:pager="state.pager" |
|||
@size-change="pageSizeChange" |
|||
@current-change="pageCurrentChange" |
|||
></elPager> |
|||
</el-card> |
|||
|
|||
<!-- 导入弹窗 --> |
|||
<importPop |
|||
ref="importPopRef" |
|||
:apiName="props.apiName" |
|||
@success="importSuccess" |
|||
/> |
|||
|
|||
<!-- 编辑弹窗 --> |
|||
<apiEditPop |
|||
ref="apiEditPopRef" |
|||
:apiName="props.apiName" |
|||
@submitEditForm="submitEditForm" |
|||
:formRules="props.apiEditFormRules" |
|||
/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script setup> |
|||
defineOptions({ name: 'ediTtablePage' }) |
|||
import store from '@/stores' |
|||
import apiTableColumns from '@/utils/common/apiTableColumns' |
|||
import { reactive, ref, onMounted,computed } from 'vue' |
|||
import { |
|||
getCommonPaged, |
|||
getCommonDeatailPaged, |
|||
postCommonExport, |
|||
postCommonCreate, |
|||
putCommonUpdate, |
|||
deleteCommonApi, |
|||
getCommonCustominvoke, |
|||
getCommonDetailById, |
|||
postCommonConfirmMany, |
|||
postCommonUpdateMany |
|||
} from '@/api/common/index' |
|||
import { ElMessageBox, ElMessage,ElTable, ElTableColumn } from 'element-plus' |
|||
import elTable from '@/components/elTable/index.vue' |
|||
import elPager from '@/components/elPager/index.vue' |
|||
import { getPageParamsForFilter } from '@/utils/common/index' |
|||
import { downloadByData } from '@/utils/download' |
|||
import importPop from '@/components/importPop/index.vue' |
|||
import apiEditPop from '@/components/apiEditPop/index.vue' |
|||
import { formatDate } from '@/utils/formatTime' |
|||
import apiServeNames from '@/utils/common/apiServeNames' |
|||
|
|||
import { useRoute } from 'vue-router' |
|||
|
|||
const route = useRoute() |
|||
const userStore = store.userStore() |
|||
const userInfo = userStore.state |
|||
const auths = store.permissionStore() |
|||
|
|||
const state = reactive({ |
|||
loading:false, |
|||
detailLoading:false, |
|||
pageLoading:false, |
|||
searchBtnOptions:{ |
|||
search:{icon:'Search',auth:':page',label:'查询',type:null}, |
|||
create:{icon:'Plus',auth:':create',label:'新增',type:'primary'}, |
|||
import:{icon:'BottomRight',auth:':import',label:'导入',type:'warning'}, |
|||
export:{icon:'TopRight',auth:':export',label:'导出',type:'success'}, |
|||
custominvoke:{icon:'Position',auth:':custominvoke',label:'手动开关',type:'primary'}, |
|||
outputMany:{icon:'Position',auth:':outputMany',label:'手动传出',type:'primary'}, |
|||
}, |
|||
searchRightBtn:[{name:'pageSave',icon:'Check',auth:':pageSave',label:'保存页面',type:'warning'}], |
|||
tableData:[], |
|||
// table排序处理 |
|||
sortFilter:{ |
|||
sortBy:undefined, |
|||
isAscending:undefined |
|||
}, |
|||
pager:{ |
|||
page: 1, |
|||
pageSize: 10, |
|||
total: 1, |
|||
}, |
|||
tableSelectList:[], |
|||
leaveSaveTip:'此操作将重新渲染页面,检测有数据【未保存】,操作后将【清空未保存数据】,是否确定继续?', |
|||
// 头部明细数据 |
|||
headerInfoData:[], |
|||
currentDetailId:null,//当前详情id暂存,避免重复获取 |
|||
// 暂存原始数据(用于校验是否更改) |
|||
stage_tableData:[], |
|||
// 暂存更改的行数(用于保留校验更改行数) |
|||
stage_indexs:[], |
|||
//tabel内部表单验证 |
|||
tableFormRulesData:null, |
|||
}) |
|||
|
|||
const props = defineProps({ |
|||
// api名称 |
|||
apiName: { |
|||
type: String, |
|||
default: null |
|||
}, |
|||
// 查看明细colum名称 |
|||
detailColumName:{ |
|||
type: String, |
|||
default: null |
|||
}, |
|||
// api类型 detailApi:走getdetail接口,不传或者pageApi:走getdatapaged接口 |
|||
apiType: { |
|||
type: String, |
|||
default: null |
|||
}, |
|||
// 隐藏表头搜索 |
|||
hideSearch:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
// 多选 |
|||
multipleTable:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
// 序号 |
|||
showTableIndex:{ |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
// 左侧操作列 |
|||
leftOperation:{ |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 右侧操作列 |
|||
rightOperation:{ |
|||
type: [Object,String], |
|||
default: null |
|||
}, |
|||
// 右侧操作列,特殊自定义格式下,包含api操作 |
|||
showApiRightOperation:{ |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 右侧通用按钮特殊字段判断隐藏规则,默认为编辑删除,readState=true不可操作, |
|||
// 如有特殊规则,则使用该方法特殊处理,当前判断方式为“=”,如后期有其他需求再进行封装 |
|||
apiRightHideConfig:{ |
|||
type: Object, |
|||
default: { |
|||
apiUpdate:{prop:'readState',ruleValue:true}, |
|||
apiDelete:{prop:'readState',ruleValue:true}, |
|||
} |
|||
}, |
|||
// table表头 |
|||
tableColumns: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 查询配置 |
|||
searchOptions: { |
|||
type: Object, |
|||
default: [] |
|||
}, |
|||
// 查询按钮 |
|||
searchButtons: { |
|||
type: Object, |
|||
default: ['search','export'] |
|||
}, |
|||
// table查询数据filter |
|||
searchFilter: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
// 表头宽度 |
|||
columnWidth:{ |
|||
type: Number, |
|||
default: 120 |
|||
}, |
|||
// 表头对齐 |
|||
columnHeaderAlign:{ |
|||
type: String, |
|||
default: 'center' |
|||
}, |
|||
// 表内容对齐 |
|||
columnAlign:{ |
|||
type: String, |
|||
default: 'center' |
|||
}, |
|||
// 表单规则 |
|||
apiEditFormRules:{ |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// table内表单规则 |
|||
tableFormRules:{ |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 隐藏头部明细 |
|||
hideHeaderInfo:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
// 可编辑单元格判断禁用规则,默认为readState=true为禁用, |
|||
// 如有特殊规则,则使用该方法特殊处理,当前判断方式为“=”,如后期有其他需求再进行封装 |
|||
editDisabledConfig:{ |
|||
type: Object, |
|||
default: [ |
|||
{prop:'readState',ruleValue:true}, |
|||
// {prop:'releaseEdition',ruleValue:'2024121901'}, |
|||
] |
|||
}, |
|||
}) |
|||
|
|||
// 获取表头 |
|||
function getTableColumns(){ |
|||
return props.tableColumns || apiTableColumns[props.apiName] |
|||
} |
|||
|
|||
const emits = defineEmits([ |
|||
'leftOperationHadel', |
|||
'rightOperationHadel', |
|||
'tableSelectionHandle' |
|||
]) |
|||
|
|||
// table多选 |
|||
function tableSelectionHandle (val){ |
|||
state.tableSelectList = val |
|||
emits('tableSelectionHandle',val) |
|||
} |
|||
|
|||
// 左侧操作列 |
|||
function leftOperationHadel(btn,scope) { |
|||
emits('leftOperationHadel',btn,scope) |
|||
} |
|||
|
|||
// 获取右侧操作列 |
|||
function getRightOperation() { |
|||
// 自定义右侧列,且不需要默认api通用操作 |
|||
if(typeof props.rightOperation == 'object' && !props.showApiRightOperation){ |
|||
return props.rightOperation |
|||
} |
|||
// 无自定义操作,或者有自定义且需要默认api操作 |
|||
else if( |
|||
(typeof props.rightOperation == 'object' && props.showApiRightOperation) |
|||
|| typeof props.rightOperation == 'string' |
|||
){ |
|||
// 格式化默认api按钮合集 |
|||
let _apiArr = props.showApiRightOperation || props.rightOperation.split(',') |
|||
let _config = { |
|||
apiUpdate:{label:'编辑',type:'warning'}, |
|||
apiDelete:{label:'删除',type:'danger'}, |
|||
} |
|||
let _btns = [] |
|||
if(_apiArr && _apiArr.length > 0){ |
|||
_apiArr.forEach(item => { |
|||
_btns.push({ |
|||
label:_config[item].label, |
|||
name:item, |
|||
link:true, |
|||
type:_config[item].type, |
|||
auth:props.apiName+':'+item, |
|||
hide:(row,scope) => {return row[props.apiRightHideConfig[item].prop] == props.apiRightHideConfig[item].ruleValue} |
|||
}) |
|||
}); |
|||
} |
|||
// 如果有自定义按钮,合并默认api按钮 |
|||
if(typeof props.rightOperation == 'object'){ |
|||
_btns = [..._btns,...props.rightOperation] |
|||
} |
|||
return _btns |
|||
} |
|||
} |
|||
|
|||
// 右侧操作列操作 |
|||
const apiEditPopRef = ref() |
|||
function rightOperationHadel(btn,scope) { |
|||
// 通用编辑 |
|||
if(btn.name == 'apiUpdate'){ |
|||
let _tableColums = getTableColumns() |
|||
let _list = _tableColums.filter(item => !item.noEdit) |
|||
apiEditPopRef.value.open(_list,scope.row) |
|||
} |
|||
// 通用删除 |
|||
if(btn.name == 'apiDelete'){ |
|||
ElMessageBox.confirm(`是否确定删除?`, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
state.loading = true |
|||
deleteCommonApi(props.apiName,scope.row.uId) |
|||
.then(res=>{ |
|||
ElMessage.success('操作成功!') |
|||
getTableData(1); |
|||
}) |
|||
.catch(err=>{ElMessage.error('操作失败!')}) |
|||
.finally(()=>{state.loading = false}) |
|||
}) |
|||
} |
|||
emits('rightOperationHadel',btn,scope) |
|||
} |
|||
|
|||
// 编辑表单提交 |
|||
const submitEditForm = async (type,formData,formConfig) => { |
|||
apiEditPopRef.value.validate((valid) => { |
|||
if(valid){ |
|||
// 新增 |
|||
if(type == 'create'){ |
|||
if(formData.hasOwnProperty('createUser')){formData.createUser = userInfo.realName} |
|||
if(formData.hasOwnProperty('createByUser')){formData.createByUser = userInfo.realName} |
|||
if(formData.hasOwnProperty('createTime')){formData.createTime = formatDate(new Date(), "YYYY-mm-dd HH:MM:SS")} |
|||
apiEditPopRef.value.changeLoading(true) |
|||
postCommonCreate(props.apiName,formData) |
|||
.then(res=>{ |
|||
apiEditPopRef.value.close() |
|||
ElMessage.success('操作成功!') |
|||
getTableData(1); |
|||
}) |
|||
.catch(err=>{ElMessage.error('操作失败!')}) |
|||
.finally(()=>{apiEditPopRef.value.changeLoading(false)}) |
|||
}else{ |
|||
// 修改人信息处理 |
|||
if( |
|||
(formData.hasOwnProperty('updateByUser') && formData.hasOwnProperty('updateTime')) |
|||
|| (formData.hasOwnProperty('updateUser') && formData.hasOwnProperty('updateTime')) |
|||
){ |
|||
if(formData.hasOwnProperty('updateByUser')){formData.updateByUser = userInfo.realName} |
|||
if(formData.hasOwnProperty('updateUser')){formData.updateUser = userInfo.realName} |
|||
if(formData.hasOwnProperty('updateTime')){formData.updateTime = formatDate(new Date(), "YYYY-mm-dd HH:MM:SS")} |
|||
}else{ |
|||
// 特殊不处理页面 |
|||
let _notChange=['taskconifgure'] |
|||
if(_notChange.indexOf(props.apiName) < 0){ |
|||
formData.remark= `修改信息:${userInfo.realName} ${formatDate(new Date(), "YYYY-mm-dd HH:MM:SS")}` |
|||
} |
|||
} |
|||
apiEditPopRef.value.changeLoading(true) |
|||
putCommonUpdate(props.apiName,formData) |
|||
.then(res=>{ |
|||
apiEditPopRef.value.close() |
|||
ElMessage.success('操作成功!') |
|||
getTableData(1); |
|||
}) |
|||
.catch(err=>{ElMessage.error('操作失败!')}) |
|||
.finally(()=>{apiEditPopRef.value.changeLoading(false)}) |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 格式化页面传参 |
|||
function getPageParams(){ |
|||
let _filters = [] |
|||
if(props.hideSearch){ |
|||
_filters = props.searchFilter |
|||
}else{ |
|||
for(let i in props.searchFilter){ |
|||
let _item = props.searchOptions.filter(item=>item.prop == i) |
|||
let _type = (_item && _item.length > 0) ? _item[0].type : null |
|||
if(props.searchFilter[i] || props.searchFilter[i] == 0){ |
|||
// 时间区域格式 |
|||
if(_type == 'datetimerange'){ |
|||
_filters.push( |
|||
{ |
|||
logic: "And", |
|||
column: i, |
|||
action: '>=', |
|||
value: props.searchFilter[i][0] |
|||
} |
|||
) |
|||
_filters.push( |
|||
{ |
|||
logic: "And", |
|||
column: i, |
|||
action: '<=', |
|||
value: props.searchFilter[i][1] |
|||
} |
|||
) |
|||
}else{ |
|||
let _action = 'like' |
|||
let _EqualTypes = ['tagFilter','filter','number','select']//等于情况的类型 |
|||
if(_EqualTypes.indexOf(_type) >= 0){ |
|||
_action = '==' |
|||
} |
|||
_filters.push( |
|||
{ |
|||
logic: "And", |
|||
column: i, |
|||
action: _action, |
|||
value: props.searchFilter[i] |
|||
} |
|||
) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
let _pageParams = getPageParamsForFilter({ |
|||
pageNumber:state.pager.page, |
|||
pageSize:state.pager.pageSize, |
|||
sortBy:state.sortFilter.sortBy, |
|||
isAscending:state.sortFilter.isAscending, |
|||
condition:{ |
|||
filters:_filters |
|||
} |
|||
}) |
|||
return _pageParams |
|||
} |
|||
|
|||
// 获取页面数据 |
|||
function getTableData(page) { |
|||
state.stage_indexs = [] |
|||
state.currentDetailId = null |
|||
state.headerInfoData = [] |
|||
state.tableSelectList = [] |
|||
if(props.apiType == 'detailApi'){ |
|||
state.loading = true |
|||
if(!page)page = state.pager.page |
|||
if(page)state.pager.page = page |
|||
getCommonDeatailPaged(props.apiName,getPageParams()) |
|||
.then((resp) => { |
|||
state.headerInfoData = [] |
|||
state.tableData = resp.data.data |
|||
state.stage_tableData = JSON.parse(JSON.stringify(resp.data.data)) |
|||
state.pager.total = resp.data.totalCount |
|||
}) |
|||
.catch(err=>{ElMessage.error('数据获取失败!')}) |
|||
.finally(() => (state.loading = false)) |
|||
}else{ |
|||
state.loading = true |
|||
if(!page)page = state.pager.page |
|||
if(page)state.pager.page = page |
|||
getCommonPaged(props.apiName,getPageParams()) |
|||
.then((resp) => { |
|||
state.headerInfoData = [] |
|||
state.tableData = resp.data.data |
|||
state.stage_tableData = JSON.parse(JSON.stringify(resp.data.data)) |
|||
state.pager.total = resp.data.totalCount |
|||
}) |
|||
.catch(err=>{ElMessage.error('数据获取失败!')}) |
|||
.finally(() => (state.loading = false)) |
|||
} |
|||
} |
|||
|
|||
const importPopRef = ref() |
|||
// 头部查询按钮功能 |
|||
function searchBtnHandle(btn){ |
|||
// 查询 |
|||
if(btn == 'search'){ |
|||
beforClearEdit().then(() => { |
|||
getTableData() |
|||
}) |
|||
} |
|||
// 新增 |
|||
else if (btn == 'create'){ |
|||
beforClearEdit().then(() => { |
|||
let _tableColums = getTableColumns() |
|||
let _list = _tableColums.filter(item => !item.noEdit) |
|||
apiEditPopRef.value.open(_list) |
|||
}) |
|||
} |
|||
// 导入 |
|||
else if (btn == 'import'){ |
|||
beforClearEdit().then(() => { |
|||
importPopRef.value.open() |
|||
}) |
|||
} |
|||
// 导出 |
|||
else if (btn == 'export'){ |
|||
beforClearEdit().then(() => { |
|||
state.loading = true |
|||
getTableData()//同步数据查询 |
|||
postCommonExport(props.apiName,getPageParams()) |
|||
.then((res) => { |
|||
downloadByData(res.data,route.meta.title+'.xlsx') |
|||
}) |
|||
.catch(err=>{ElMessage.error('操作失败!')}) |
|||
.finally(() => (state.loading = false)) |
|||
}) |
|||
} |
|||
// 手动开关 |
|||
else if (btn == 'custominvoke'){ |
|||
beforClearEdit().then(() => { |
|||
state.loading = true |
|||
let _data = { |
|||
taskName:apiServeNames[props.apiName].taskName, |
|||
client:'Chery' |
|||
} |
|||
getCommonCustominvoke(props.apiName,_data) |
|||
.then((res) => { |
|||
ElMessage.success('操作成功!') |
|||
getTableData(1)//同步数据查询 |
|||
}) |
|||
.finally(() => (state.loading = false)) |
|||
}) |
|||
} |
|||
// 手动传出(多选) |
|||
else if (btn == 'outputMany'){ |
|||
let _idEditData = checkPageEditList() |
|||
if(_idEditData && _idEditData.length > 0){ |
|||
return ElMessage.warning('当前有未保存修改项,请先保存页面') |
|||
} |
|||
if(!state.tableSelectList || state.tableSelectList.length <= 0 ){ |
|||
return ElMessage.warning('未选中任何数据') |
|||
} |
|||
ElMessageBox.confirm('是否确定手动传出?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
state.loading = true |
|||
postCommonConfirmMany(props.apiName,state.tableSelectList) |
|||
.then(res=>{ |
|||
ElMessage.success('操作成功!') |
|||
getTableData(1) |
|||
}) |
|||
.finally(()=>{state.loading = false}) |
|||
}) |
|||
} |
|||
} |
|||
const table_Ref = ref(null) |
|||
// 头部右侧按钮功能 |
|||
function searchRightBtnHandle(btn){ |
|||
// 保存页面 |
|||
if(btn.name == 'pageSave'){ |
|||
table_Ref.value.tableForm_Ref.validate((valid)=>{ |
|||
if(valid){ |
|||
let _idEditData = checkPageEditList() |
|||
if(!_idEditData || _idEditData.length <= 0)return ElMessage.warning('暂无数据修改') |
|||
// 判断规则 目前风险页面通用,暂时写在通用方式中,如果后期有区别,可拿到页面外处理 |
|||
// 规则:反馈结果[feedbackResults]=1时,风险类型[ventureType],具体风险[ventureSpecific]必填 |
|||
let _indexs = [] |
|||
_idEditData.forEach(item=>{ |
|||
if(item.feedbackResults == '1' && (!item.ventureType || !item.ventureSpecific || item.ventureSpecifi == '')){ |
|||
_indexs.push(getIndexById(item.id)) |
|||
} |
|||
}) |
|||
if(_indexs && _indexs.length > 0){ |
|||
return ElMessage.error(`修改数据中【第${_indexs}行】数据中,【反馈结果】为异常,但【风险类型】或【具体风险】为空,请修改后重新提交!`) |
|||
} |
|||
ElMessageBox.confirm('是否确定提交更改?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
state.loading = true |
|||
postCommonUpdateMany(props.apiName,_idEditData) |
|||
.then(res=>{ |
|||
ElMessage.success('操作成功!') |
|||
getTableData(1) |
|||
}) |
|||
.finally(()=>{state.loading = false}) |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
|||
|
|||
// 排序 |
|||
function sortChange(data) { |
|||
beforClearEdit().then(() => { |
|||
const { prop, order } = data; |
|||
if (!prop || !order) { |
|||
state.sortFilter.sortBy = undefined; |
|||
state.sortFilter.isAscending = undefined; |
|||
getTableData(1); |
|||
return; |
|||
} |
|||
state.sortFilter.sortBy = prop; |
|||
state.sortFilter.isAscending = (order == "ascending"); |
|||
getTableData(1); |
|||
}) |
|||
} |
|||
|
|||
// 导入成功之后 |
|||
function importSuccess(response,importDate){ |
|||
getTableData() |
|||
} |
|||
|
|||
// size-change |
|||
function pageSizeChange(pageSize,returnSize){ |
|||
state.pageLoading=true |
|||
let _oldSize = state.pager.pageSize |
|||
state.pager.pageSize = pageSize |
|||
beforClearEdit() |
|||
.then(res => { |
|||
getTableData(1) |
|||
state.pageLoading=false |
|||
}) |
|||
.catch(res=>{ |
|||
state.pager.pageSize = _oldSize |
|||
state.pageLoading=false |
|||
}) |
|||
} |
|||
|
|||
// current-change |
|||
function pageCurrentChange(page){ |
|||
beforClearEdit().then(res => { |
|||
getTableData(page) |
|||
}) |
|||
} |
|||
|
|||
// 获取头部详情字段名 |
|||
function getDeatilLableByProp(prop){ |
|||
let _colums = apiTableColumns[props.detailColumName] |
|||
let _item = _colums.filter(item=>item.prop == prop) |
|||
let _name = null |
|||
if(_item && _item.length > 0){ |
|||
_name = _item[0].title |
|||
} |
|||
return _name |
|||
} |
|||
|
|||
// 获取当前第几行数据的明细 |
|||
function getIndexById(id){ |
|||
let _id = id || state.currentDetailId |
|||
for(let i=0;i<state.stage_tableData.length;i++){ |
|||
if(state.stage_tableData[i].id == _id){ |
|||
return i + 1 |
|||
} |
|||
} |
|||
} |
|||
|
|||
// 检查行数据是否符合禁用规则 |
|||
function checkDisableByRowRule(row){ |
|||
let hasDisable = false |
|||
for(let i = 0;i<props.editDisabledConfig.length;i++){ |
|||
if(row[props.editDisabledConfig[i].prop] == props.editDisabledConfig[i].ruleValue){ |
|||
hasDisable = true |
|||
break |
|||
} |
|||
} |
|||
return hasDisable |
|||
} |
|||
|
|||
// 判断可编辑元素是否禁用 |
|||
function getEditItemDisabled(item,row,index){ |
|||
// 无权限禁用 |
|||
let _auth = auths.hasPermission(props.apiName+':pageSave') |
|||
if(item.disabled || !_auth){ |
|||
return true |
|||
} |
|||
// 已勾选禁用 |
|||
if(state.tableSelectList && state.tableSelectList.length > 0){ |
|||
return true |
|||
} |
|||
// 行条件禁用 |
|||
return checkDisableByRowRule(row) |
|||
} |
|||
|
|||
// table的复选框是否禁用判断 |
|||
function selectableDisabled(row,index){ |
|||
// 无权限禁用 |
|||
let _auth = auths.hasPermission(props.apiName+':outputMany') |
|||
// 已修改禁用 |
|||
let _idEditData = checkPageEditList() |
|||
// 行条件禁用(暂时与编辑页面用一个条件,如有区别再进行封装) |
|||
let checkRow = checkDisableByRowRule(row) |
|||
return _auth && (!_idEditData || _idEditData.length <= 0) && !checkRow |
|||
} |
|||
|
|||
// 可编辑元素Focus事件 todo:如果加上表单验证后,需要处理表单点击 |
|||
function getItemDetail(type,row,eventType) { |
|||
// 如果是相同id,避免重复:阻止接口 |
|||
if(row.id == state.currentDetailId){return} |
|||
let _focuseExt = ['input','numberInput'] |
|||
// 如果是focus事件,避免重复:阻止_focuseExt以内的触发事件,走cell事件 |
|||
if(eventType == 'focus' && _focuseExt.indexOf(type) >= 0){return} |
|||
console.log(type,row,eventType) |
|||
console.log('------------') |
|||
state.currentDetailId = row.id |
|||
state.detailLoading = true |
|||
getCommonDetailById(props.apiName,row.id) |
|||
.then((res) => { |
|||
state.headerInfoData = [] |
|||
for(let item in res.data){ |
|||
let _label = getDeatilLableByProp(item) |
|||
if(_label){ |
|||
state.headerInfoData.push({ |
|||
label:_label, |
|||
value:res.data[item] |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
.finally(() => (state.detailLoading = false)) |
|||
|
|||
} |
|||
|
|||
// 可编辑元素change事件 |
|||
function editItemChangeHandle(item,scope,data) { |
|||
if(state.stage_indexs.indexOf(scope.$index) < 0){ |
|||
state.stage_indexs.push(scope.$index) |
|||
} |
|||
} |
|||
|
|||
// 其他操作清空保存前提示 |
|||
function beforClearEdit(){ |
|||
return new Promise((resolve, reject) => { |
|||
let _idEditData = checkPageEditList() |
|||
if(!_idEditData || _idEditData.length <= 0){ |
|||
resolve() |
|||
}else{ |
|||
ElMessageBox.confirm(state.leaveSaveTip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
resolve() |
|||
}).catch(()=>{ |
|||
reject() |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 处理页面更改数据 |
|||
function checkPageEditList(){ |
|||
if(!state.stage_indexs || state.stage_indexs.length<=0){ |
|||
return false |
|||
} |
|||
else{ |
|||
let _changeArr = [] |
|||
state.stage_indexs.forEach(item=>{ |
|||
if(JSON.stringify(state.stage_tableData[item]) != JSON.stringify(state.tableData[item])){ |
|||
_changeArr.push(state.tableData[item]) |
|||
} |
|||
}) |
|||
return _changeArr |
|||
} |
|||
} |
|||
|
|||
// 行变色 |
|||
function tableRowClassName(data){ |
|||
if(data.row.id == state.currentDetailId){return 'current-select-tableRow'} |
|||
else{return 'normal-tableRow'} |
|||
} |
|||
|
|||
// 根据apiTableColumns转义table内表单默认规则 |
|||
// todo:feedbackResults相应的特殊规则处理,measures也需要处理 |
|||
function getTableFormRules(){ |
|||
if(props.tableFormRules) { |
|||
state.tableFormRulesData = props.tableFormRules |
|||
}else{ |
|||
state.tableFormRulesData = {} |
|||
apiTableColumns[props.apiName].forEach(item=>{ |
|||
if(item.required){ |
|||
state.tableFormRulesData[item.prop] = [{ required: true, message: '必填项', trigger: 'change' }] |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
|
|||
onMounted(() => { |
|||
// getTableFormRules() |
|||
getTableData() |
|||
}) |
|||
|
|||
</script> |
|||
<style scoped lang="scss"> |
|||
::v-deep .search-container{ |
|||
.el-card__body{ |
|||
width: 100%; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
} |
|||
} |
|||
::v-deep .headerInfo-container{ |
|||
margin-top:10px; |
|||
.el-card__body{ |
|||
padding-bottom: 10px !important; |
|||
min-height:66px |
|||
} |
|||
} |
|||
::v-deep .headerInfoEmpty{ |
|||
height:145px; |
|||
.el-empty__image{ |
|||
width:90px !important |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,65 @@ |
|||
<template> |
|||
<el-pagination |
|||
:currentPage="props.pager.page" |
|||
:page-size="props.pager.pageSize" |
|||
:total="props.pager.total" |
|||
:background="props.pageBackGround" |
|||
:layout="props.pageLayout" |
|||
:hide-on-single-page="props.isHideOnlyOne" |
|||
:page-sizes="props.pageSizeList" |
|||
@size-change="pageSizeChange" |
|||
@current-change="pageCurrentChange" |
|||
/> |
|||
</template> |
|||
|
|||
<script setup> |
|||
defineOptions({ name: 'elPager' }) |
|||
import { reactive, ref, onMounted,watch } from 'vue' |
|||
import { ElMessageBox, ElMessage,ElPagination } from 'element-plus' |
|||
|
|||
const props = defineProps({ |
|||
// table分页 |
|||
pager: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
// 分页显示内容 |
|||
pageLayout: { |
|||
type: String, |
|||
default: 'total, sizes,prev, pager, next' |
|||
}, |
|||
// 只有一页是否隐藏 |
|||
isHideOnlyOne:{ |
|||
type:Boolean, |
|||
default: false |
|||
}, |
|||
// 是否有底色 |
|||
pageBackGround:{ |
|||
type:Boolean, |
|||
default: true |
|||
}, |
|||
// 页数下拉 |
|||
pageSizeList:{ |
|||
type: Object, |
|||
default: [10, 20, 50, 100] |
|||
}, |
|||
}) |
|||
|
|||
const emits = defineEmits(['pageSizeChange', 'pageCurrentChange']) |
|||
|
|||
// size-change |
|||
function pageSizeChange(pageSize){ |
|||
emits('pageSizeChange',pageSize) |
|||
} |
|||
|
|||
// current-change |
|||
function pageCurrentChange(page){ |
|||
emits('pageCurrentChange',page) |
|||
} |
|||
|
|||
onMounted(() => {}) |
|||
|
|||
</script> |
|||
|
|||
<style></style> |
|||
|
@ -0,0 +1,336 @@ |
|||
<template> |
|||
<el-table |
|||
ref="tableRef" |
|||
row-key="id" |
|||
:data="props.tableData" |
|||
:border="true" |
|||
@sort-change="sortChange" |
|||
@selection-change="tableSelectionHandle" |
|||
:row-class-name="props.tableRowClassName" |
|||
:cell-class-name="props.tableCellClassName" |
|||
> |
|||
<!-- 多选框 --> |
|||
<el-table-column |
|||
v-if="props.multipleTable" |
|||
type="selection" |
|||
:fixed="'left'" |
|||
width="55" |
|||
:selectable="selectableDisabled" |
|||
/> |
|||
<!-- 序号 --> |
|||
<el-table-column v-if="props.showTableIndex" :fixed="'left'" type="index" width="50" /> |
|||
<!-- 左侧操作列 --> |
|||
<el-table-column |
|||
v-if="props.leftOperation && props.leftOperation.length > 0" |
|||
:fixed="'left'" |
|||
:width="props.leftOperationColumnWidth" |
|||
label="操作" |
|||
:align="'center'"> |
|||
<template #default="scope"> |
|||
<el-button |
|||
v-for="(btn,index) in props.leftOperation" |
|||
:key="index" |
|||
:type="btn.type" |
|||
:link="btn.link" |
|||
@click="leftOperationHadel(btn,scope)" |
|||
>{{btn.label}}</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<!-- 数据列 --> |
|||
<el-table-column |
|||
v-for="(item, index) in props.tableColumns" |
|||
:key="index" |
|||
:label="item.title" |
|||
:prop="item.prop" |
|||
:sortable="item.sortable || 'custom'" |
|||
:fixed="item.fixed" |
|||
:width="item.width || props.columnWidth" |
|||
:align="item.align || props.columnAlign" |
|||
:header-align="item.headerAlign || props.columnHeaderAlign"> |
|||
<template #default="scope"> |
|||
<!-- 时间格式 --> |
|||
<span v-if="item.type == 'datetime'"> {{ formatTableDate(scope.row[item.prop]) }} </span> |
|||
<!-- 标签格式 --> |
|||
<el-tag |
|||
v-else-if="item.type == 'tagFilter'" |
|||
:type="formatTableTagFilter('type',scope.row,item)" |
|||
> |
|||
{{ formatTableTagFilter('label',scope.row,item) }} |
|||
</el-tag> |
|||
<!-- 字典 --> |
|||
<span v-else-if="item.type == 'filter'">{{ formatTableTagFilter('label',scope.row,item) }}</span> |
|||
<!-- 【可编辑】文本 --> |
|||
<el-input |
|||
v-else-if="item.type == 'input'" |
|||
v-model="scope.row[item.prop]" |
|||
:placeholder="item.label" |
|||
:disabled="getEditItemDisabled(item,scope.row,scope)" |
|||
:clearable="!item.noClear" |
|||
@focus="(event)=>{editItemFocusHandle(item,scope,event)}" |
|||
@change="editItemChangeHandle(item,scope,arguments)" |
|||
@clear="editItemClearHandle(item,scope)" |
|||
/> |
|||
<!-- 【可编辑】字典选择 --> |
|||
<el-select |
|||
v-else-if="item.type == 'filterSelect'" |
|||
v-model="scope.row[item.prop]" |
|||
:filterable="!item.noSearch" |
|||
placeholder="请选择" |
|||
:disabled="getEditItemDisabled(item,scope.row,scope)" |
|||
:clearable="!item.noClear" |
|||
@focus="(event)=>{editItemFocusHandle(item,scope,event)}" |
|||
@change="editItemChangeHandle(item,scope,arguments)" |
|||
@clear="editItemClearHandle(item,scope)"> |
|||
<el-option |
|||
v-for="(op,op_index) in item.options" |
|||
:key="op_index" |
|||
:label="op.label" |
|||
:value="op.value" |
|||
/> |
|||
</el-select> |
|||
<!-- 【可编辑】时间 --> |
|||
<el-date-picker |
|||
v-else-if="item.type == 'datetimeInput'" |
|||
v-model="scope.row[item.prop]" |
|||
style="width:100%" |
|||
:type="item.inputType || 'datetime'" |
|||
:format="item.format || 'YYYY-MM-DD HH:mm:ss'" |
|||
:value-format="item.valueFormat || 'YYYY-MM-DD HH:mm:ss'" |
|||
:clearable="!item.noClear" |
|||
:disabled="getEditItemDisabled(item,scope.row,scope)" |
|||
@focus="(event)=>{editItemFocusHandle(item,scope,event)}" |
|||
@change="editItemChangeHandle(item,scope,arguments)" |
|||
@clear="editItemClearHandle(item,scope)" |
|||
/> |
|||
<!-- 【可编辑】数字 --> |
|||
<el-input-number |
|||
v-else-if="item.type == 'numberInput'" |
|||
v-model="scope.row[item.prop]" |
|||
:min="item.min" |
|||
:max="item.max" |
|||
:disabled="getEditItemDisabled(item,scope.row,scope)" |
|||
@focus="(event)=>{editItemFocusHandle(item,scope,event)}" |
|||
@change="editItemChangeHandle(item,scope,arguments)" |
|||
/> |
|||
<!-- 正常直接显示 --> |
|||
<span v-else> {{ scope.row[item.prop] }} </span> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<!-- 右侧操作列 --> |
|||
<el-table-column |
|||
v-if="props.rightOperation && props.rightOperation.length > 0" |
|||
v-auth-any="getShowRightOpera()" |
|||
:fixed="'right'" |
|||
:width="props.rightOperationColumnWidth" |
|||
:align="'center'" |
|||
label="操作"> |
|||
<template #default="scope"> |
|||
<el-button |
|||
v-for="(btn,index) in props.rightOperation" |
|||
v-show="typeof btn.hide == 'function' ? !btn.hide(scope.row,scope) : !btn.hide" |
|||
:key="index" |
|||
:type="btn.type" |
|||
:link="btn.link" |
|||
@click="rightOperationHadel(btn,scope)" |
|||
v-auth="btn.auth" |
|||
>{{btn.label}}</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
|
|||
<script setup> |
|||
defineOptions({ name: 'elTable' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import { ElMessageBox, ElMessage,ElTable, ElTableColumn } from 'element-plus' |
|||
import { formatTimeStrToStr } from "@/utils/formatTime"; |
|||
|
|||
const state = reactive({}) |
|||
|
|||
const props = defineProps({ |
|||
// 多选 |
|||
multipleTable:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
// 序号 |
|||
showTableIndex:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
// 左侧操作列 |
|||
leftOperation:{ |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 左侧操作列宽度 |
|||
leftOperationColumnWidth:{ |
|||
type: Number, |
|||
default: 120 |
|||
}, |
|||
// 右侧操作列 |
|||
rightOperation:{ |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 右侧操作列宽度 |
|||
rightOperationColumnWidth:{ |
|||
type: Number, |
|||
default: 150 |
|||
}, |
|||
// table数据 |
|||
tableData: { |
|||
type: Object, |
|||
default: [] |
|||
}, |
|||
// table表头 |
|||
tableColumns: { |
|||
type: Object, |
|||
default: [] |
|||
}, |
|||
// 表头宽度 |
|||
columnWidth:{ |
|||
type: Number, |
|||
default: null |
|||
}, |
|||
// 表头对齐 |
|||
columnHeaderAlign:{ |
|||
type: String, |
|||
default: 'center' |
|||
}, |
|||
// 表内容对齐 |
|||
columnAlign:{ |
|||
type: String, |
|||
default: 'center' |
|||
}, |
|||
// 可编辑单元格判断禁用 |
|||
getEditItemDisabled:{ |
|||
type: [Function,Boolean], |
|||
default: false |
|||
}, |
|||
// table的复选框是否禁用判断 |
|||
selectableDisabled:{ |
|||
type: [Function,Boolean], |
|||
default: true |
|||
}, |
|||
// 行class |
|||
tableRowClassName:{ |
|||
type: Function, |
|||
default: null |
|||
}, |
|||
// 单元格class |
|||
tableCellClassName:{ |
|||
type: Function, |
|||
default: null |
|||
}, |
|||
}) |
|||
|
|||
const emits = defineEmits([ |
|||
'sortChange', |
|||
'leftOperationHadel', |
|||
'rightOperationHadel', |
|||
'tableSelectionHandle', |
|||
'editItemFocusHandle', |
|||
'editItemChangeHandle', |
|||
'editItemClearHandle', |
|||
]) |
|||
|
|||
// 多选 |
|||
function tableSelectionHandle (val){ |
|||
emits('tableSelectionHandle',val) |
|||
} |
|||
|
|||
// 格式化时间 |
|||
function formatTableDate(time) { |
|||
let _time = '-' |
|||
if (time) { _time = formatTimeStrToStr(time) } |
|||
return _time |
|||
} |
|||
|
|||
// 格式化TagFilter |
|||
function formatTableTagFilter(type,row,item){ |
|||
let _op = item.options.filter(op=>op.value == row[item.prop]) |
|||
if(!_op || _op.length <=0 || !_op[0][type]){ |
|||
if(type=='type'){return 'info'} |
|||
else{return '--'} |
|||
}else{ |
|||
return _op[0][type] |
|||
} |
|||
} |
|||
|
|||
|
|||
//排序 |
|||
function sortChange(data) { |
|||
emits('sortChange',data) |
|||
} |
|||
|
|||
// 左侧操作列 |
|||
function leftOperationHadel(btn,scope) { |
|||
emits('leftOperationHadel',btn,scope) |
|||
} |
|||
|
|||
// 判断是否显示右侧操作权限 |
|||
function getShowRightOpera(){ |
|||
let _arr = [] |
|||
props.rightOperation.forEach(item=>{_arr.push(item.auth)}) |
|||
return _arr |
|||
} |
|||
|
|||
// 判断可编辑元素是否禁用 |
|||
function getEditItemDisabled(item,row,scope){ |
|||
if(typeof props.getEditItemDisabled == 'boolean'){ |
|||
return props.getEditItemDisabled |
|||
}else{ |
|||
return props.getEditItemDisabled(item,row,scope.$index) |
|||
} |
|||
} |
|||
|
|||
// table的复选框是否禁用判断 |
|||
function selectableDisabled(row,index){ |
|||
if(typeof props.selectableDisabled == 'function'){ |
|||
return props.selectableDisabled(row,index) |
|||
}else{ |
|||
return props.selectableDisabled |
|||
} |
|||
} |
|||
|
|||
// 可编辑元素Focus事件 |
|||
function editItemFocusHandle(item,scope,event) { |
|||
emits('editItemFocusHandle',item,scope,event) |
|||
} |
|||
|
|||
// 可编辑元素change事件 |
|||
function editItemChangeHandle(item,scope,data) { |
|||
emits('editItemChangeHandle',item,scope,data) |
|||
} |
|||
|
|||
// 可编辑元素clear事件 |
|||
function editItemClearHandle(item,scope) { |
|||
emits('editItemClearHandle',item,scope) |
|||
} |
|||
|
|||
// 右侧操作列 |
|||
function rightOperationHadel(btn,scope) { |
|||
emits('rightOperationHadel',btn,scope) |
|||
} |
|||
|
|||
onMounted(() => {}) |
|||
|
|||
</script> |
|||
|
|||
<style scope lang="scss"> |
|||
.current-select-tableRow{ |
|||
background:#e1f3d8 !important; |
|||
td{ |
|||
background:#e1f3d8 !important; |
|||
} |
|||
} |
|||
.normal-tableRow{ |
|||
td{ |
|||
background:#fff; |
|||
} |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,336 @@ |
|||
<template> |
|||
<el-table |
|||
ref="tableRef" |
|||
row-key="id" |
|||
:data="props.tableData" |
|||
:border="true" |
|||
@sort-change="sortChange" |
|||
@selection-change="tableSelectionHandle" |
|||
:row-class-name="props.tableRowClassName" |
|||
:cell-class-name="props.tableCellClassName" |
|||
> |
|||
<!-- 多选框 --> |
|||
<el-table-column |
|||
v-if="props.multipleTable" |
|||
type="selection" |
|||
:fixed="'left'" |
|||
width="55" |
|||
:selectable="selectableDisabled" |
|||
/> |
|||
<!-- 序号 --> |
|||
<el-table-column v-if="props.showTableIndex" :fixed="'left'" type="index" width="50" /> |
|||
<!-- 左侧操作列 --> |
|||
<el-table-column |
|||
v-if="props.leftOperation && props.leftOperation.length > 0" |
|||
:fixed="'left'" |
|||
:width="props.leftOperationColumnWidth" |
|||
label="操作" |
|||
:align="'center'"> |
|||
<template #default="scope"> |
|||
<el-button |
|||
v-for="(btn,index) in props.leftOperation" |
|||
:key="index" |
|||
:type="btn.type" |
|||
:link="btn.link" |
|||
@click="leftOperationHadel(btn,scope)" |
|||
>{{btn.label}}</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<!-- 数据列 --> |
|||
<el-table-column |
|||
v-for="(item, index) in props.tableColumns" |
|||
:key="index" |
|||
:label="item.title" |
|||
:prop="item.prop" |
|||
:sortable="item.sortable || 'custom'" |
|||
:fixed="item.fixed" |
|||
:width="item.width || props.columnWidth" |
|||
:align="item.align || props.columnAlign" |
|||
:header-align="item.headerAlign || props.columnHeaderAlign"> |
|||
<template #default="scope"> |
|||
<!-- 时间格式 --> |
|||
<span v-if="item.type == 'datetime'"> {{ formatTableDate(scope.row[item.prop]) }} </span> |
|||
<!-- 标签格式 --> |
|||
<el-tag |
|||
v-else-if="item.type == 'tagFilter'" |
|||
:type="formatTableTagFilter('type',scope.row,item)" |
|||
> |
|||
{{ formatTableTagFilter('label',scope.row,item) }} |
|||
</el-tag> |
|||
<!-- 字典 --> |
|||
<span v-else-if="item.type == 'filter'">{{ formatTableTagFilter('label',scope.row,item) }}</span> |
|||
<!-- 【可编辑】文本 --> |
|||
<el-input |
|||
v-else-if="item.type == 'input'" |
|||
v-model="scope.row[item.prop]" |
|||
:placeholder="item.label" |
|||
:disabled="getEditItemDisabled(item,scope.row,scope)" |
|||
:clearable="!item.noClear" |
|||
@focus="(event)=>{editItemFocusHandle(item,scope,event)}" |
|||
@change="editItemChangeHandle(item,scope,arguments)" |
|||
@clear="editItemClearHandle(item,scope)" |
|||
/> |
|||
<!-- 【可编辑】字典选择 --> |
|||
<el-select |
|||
v-else-if="item.type == 'filterSelect'" |
|||
v-model="scope.row[item.prop]" |
|||
:filterable="!item.noSearch" |
|||
placeholder="请选择" |
|||
:disabled="getEditItemDisabled(item,scope.row,scope)" |
|||
:clearable="!item.noClear" |
|||
@focus="(event)=>{editItemFocusHandle(item,scope,event)}" |
|||
@change="editItemChangeHandle(item,scope,arguments)" |
|||
@clear="editItemClearHandle(item,scope)"> |
|||
<el-option |
|||
v-for="(op,op_index) in item.options" |
|||
:key="op_index" |
|||
:label="op.label" |
|||
:value="op.value" |
|||
/> |
|||
</el-select> |
|||
<!-- 【可编辑】时间 --> |
|||
<el-date-picker |
|||
v-else-if="item.type == 'datetimeInput'" |
|||
v-model="scope.row[item.prop]" |
|||
style="width:100%" |
|||
:type="item.inputType || 'datetime'" |
|||
:format="item.format || 'YYYY-MM-DD HH:mm:ss'" |
|||
:value-format="item.valueFormat || 'YYYY-MM-DD HH:mm:ss'" |
|||
:clearable="!item.noClear" |
|||
:disabled="getEditItemDisabled(item,scope.row,scope)" |
|||
@focus="(event)=>{editItemFocusHandle(item,scope,event)}" |
|||
@change="editItemChangeHandle(item,scope,arguments)" |
|||
@clear="editItemClearHandle(item,scope)" |
|||
/> |
|||
<!-- 【可编辑】数字 --> |
|||
<el-input-number |
|||
v-else-if="item.type == 'numberInput'" |
|||
v-model="scope.row[item.prop]" |
|||
:min="item.min" |
|||
:max="item.max" |
|||
:disabled="getEditItemDisabled(item,scope.row,scope)" |
|||
@focus="(event)=>{editItemFocusHandle(item,scope,event)}" |
|||
@change="editItemChangeHandle(item,scope,arguments)" |
|||
/> |
|||
<!-- 正常直接显示 --> |
|||
<span v-else> {{ scope.row[item.prop] }} </span> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<!-- 右侧操作列 --> |
|||
<el-table-column |
|||
v-if="props.rightOperation && props.rightOperation.length > 0" |
|||
v-auth-any="getShowRightOpera()" |
|||
:fixed="'right'" |
|||
:width="props.rightOperationColumnWidth" |
|||
:align="'center'" |
|||
label="操作"> |
|||
<template #default="scope"> |
|||
<el-button |
|||
v-for="(btn,index) in props.rightOperation" |
|||
v-show="typeof btn.hide == 'function' ? !btn.hide(scope.row,scope) : !btn.hide" |
|||
:key="index" |
|||
:type="btn.type" |
|||
:link="btn.link" |
|||
@click="rightOperationHadel(btn,scope)" |
|||
v-auth="btn.auth" |
|||
>{{btn.label}}</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
|
|||
<script setup> |
|||
defineOptions({ name: 'elTable' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import { ElMessageBox, ElMessage,ElTable, ElTableColumn } from 'element-plus' |
|||
import { formatTimeStrToStr } from "@/utils/formatTime"; |
|||
|
|||
const state = reactive({}) |
|||
|
|||
const props = defineProps({ |
|||
// 多选 |
|||
multipleTable:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
// 序号 |
|||
showTableIndex:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
// 左侧操作列 |
|||
leftOperation:{ |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 左侧操作列宽度 |
|||
leftOperationColumnWidth:{ |
|||
type: Number, |
|||
default: 120 |
|||
}, |
|||
// 右侧操作列 |
|||
rightOperation:{ |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 右侧操作列宽度 |
|||
rightOperationColumnWidth:{ |
|||
type: Number, |
|||
default: 150 |
|||
}, |
|||
// table数据 |
|||
tableData: { |
|||
type: Object, |
|||
default: [] |
|||
}, |
|||
// table表头 |
|||
tableColumns: { |
|||
type: Object, |
|||
default: [] |
|||
}, |
|||
// 表头宽度 |
|||
columnWidth:{ |
|||
type: Number, |
|||
default: null |
|||
}, |
|||
// 表头对齐 |
|||
columnHeaderAlign:{ |
|||
type: String, |
|||
default: 'center' |
|||
}, |
|||
// 表内容对齐 |
|||
columnAlign:{ |
|||
type: String, |
|||
default: 'center' |
|||
}, |
|||
// 可编辑单元格判断禁用 |
|||
getEditItemDisabled:{ |
|||
type: [Function,Boolean], |
|||
default: false |
|||
}, |
|||
// table的复选框是否禁用判断 |
|||
selectableDisabled:{ |
|||
type: [Function,Boolean], |
|||
default: true |
|||
}, |
|||
// 行class |
|||
tableRowClassName:{ |
|||
type: Function, |
|||
default: null |
|||
}, |
|||
// 单元格class |
|||
tableCellClassName:{ |
|||
type: Function, |
|||
default: null |
|||
}, |
|||
}) |
|||
|
|||
const emits = defineEmits([ |
|||
'sortChange', |
|||
'leftOperationHadel', |
|||
'rightOperationHadel', |
|||
'tableSelectionHandle', |
|||
'editItemFocusHandle', |
|||
'editItemChangeHandle', |
|||
'editItemClearHandle', |
|||
]) |
|||
|
|||
// 多选 |
|||
function tableSelectionHandle (val){ |
|||
emits('tableSelectionHandle',val) |
|||
} |
|||
|
|||
// 格式化时间 |
|||
function formatTableDate(time) { |
|||
let _time = '-' |
|||
if (time) { _time = formatTimeStrToStr(time) } |
|||
return _time |
|||
} |
|||
|
|||
// 格式化TagFilter |
|||
function formatTableTagFilter(type,row,item){ |
|||
let _op = item.options.filter(op=>op.value == row[item.prop]) |
|||
if(!_op || _op.length <=0 || !_op[0][type]){ |
|||
if(type=='type'){return 'info'} |
|||
else{return '--'} |
|||
}else{ |
|||
return _op[0][type] |
|||
} |
|||
} |
|||
|
|||
|
|||
//排序 |
|||
function sortChange(data) { |
|||
emits('sortChange',data) |
|||
} |
|||
|
|||
// 左侧操作列 |
|||
function leftOperationHadel(btn,scope) { |
|||
emits('leftOperationHadel',btn,scope) |
|||
} |
|||
|
|||
// 判断是否显示右侧操作权限 |
|||
function getShowRightOpera(){ |
|||
let _arr = [] |
|||
props.rightOperation.forEach(item=>{_arr.push(item.auth)}) |
|||
return _arr |
|||
} |
|||
|
|||
// 判断可编辑元素是否禁用 |
|||
function getEditItemDisabled(item,row,scope){ |
|||
if(typeof props.getEditItemDisabled == 'boolean'){ |
|||
return props.getEditItemDisabled |
|||
}else{ |
|||
return props.getEditItemDisabled(item,row,scope.$index) |
|||
} |
|||
} |
|||
|
|||
// table的复选框是否禁用判断 |
|||
function selectableDisabled(row,index){ |
|||
if(typeof props.selectableDisabled == 'function'){ |
|||
return props.selectableDisabled(row,index) |
|||
}else{ |
|||
return props.selectableDisabled |
|||
} |
|||
} |
|||
|
|||
// 可编辑元素Focus事件 |
|||
function editItemFocusHandle(item,scope,event) { |
|||
emits('editItemFocusHandle',item,scope,event) |
|||
} |
|||
|
|||
// 可编辑元素change事件 |
|||
function editItemChangeHandle(item,scope,data) { |
|||
emits('editItemChangeHandle',item,scope,data) |
|||
} |
|||
|
|||
// 可编辑元素clear事件 |
|||
function editItemClearHandle(item,scope) { |
|||
emits('editItemClearHandle',item,scope) |
|||
} |
|||
|
|||
// 右侧操作列 |
|||
function rightOperationHadel(btn,scope) { |
|||
emits('rightOperationHadel',btn,scope) |
|||
} |
|||
|
|||
onMounted(() => {}) |
|||
|
|||
</script> |
|||
|
|||
<style scope lang="scss"> |
|||
.current-select-tableRow{ |
|||
background:#e1f3d8 !important; |
|||
td{ |
|||
background:#e1f3d8 !important; |
|||
} |
|||
} |
|||
.normal-tableRow{ |
|||
td{ |
|||
background:#fff; |
|||
} |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,353 @@ |
|||
<template> |
|||
<el-form style="height:calc(100% - 45px)" :model="props" :rules="props.tableFormRules" ref="tableForm_Ref"> |
|||
<el-table |
|||
style="height:100%" |
|||
row-key="id" |
|||
:data="props.tableData" |
|||
:border="true" |
|||
@sort-change="sortChange" |
|||
@selection-change="tableSelectionHandle" |
|||
:row-class-name="props.tableRowClassName" |
|||
:cell-class-name="props.tableCellClassName" |
|||
> |
|||
<!-- 多选框 --> |
|||
<el-table-column |
|||
v-if="props.multipleTable" |
|||
type="selection" |
|||
:fixed="'left'" |
|||
width="55" |
|||
:selectable="selectableDisabled" |
|||
/> |
|||
<!-- 序号 --> |
|||
<el-table-column v-if="props.showTableIndex" :fixed="'left'" type="index" width="50" /> |
|||
<!-- 左侧操作列 --> |
|||
<el-table-column |
|||
v-if="props.leftOperation && props.leftOperation.length > 0" |
|||
:fixed="'left'" |
|||
:width="props.leftOperationColumnWidth" |
|||
label="操作" |
|||
:align="'center'"> |
|||
<template #default="scope"> |
|||
<el-button |
|||
v-for="(btn,index) in props.leftOperation" |
|||
:key="index" |
|||
:type="btn.type" |
|||
:link="btn.link" |
|||
@click="leftOperationHadel(btn,scope)" |
|||
>{{btn.label}}</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<!-- 数据列 --> |
|||
<el-table-column |
|||
v-for="(item, index) in props.tableColumns" |
|||
:key="index" |
|||
:label="item.title" |
|||
:prop="item.prop" |
|||
:sortable="item.sortable || 'custom'" |
|||
:fixed="item.fixed" |
|||
:width="item.width || props.columnWidth" |
|||
:align="item.align || props.columnAlign" |
|||
:header-align="item.headerAlign || props.columnHeaderAlign"> |
|||
<template #default="scope"> |
|||
<!-- `tableData[${scope.$index}][${item.prop}]` --> |
|||
<el-form-item |
|||
:prop="'tableData.'+ scope.$index + '.' + item.prop" |
|||
:rules="props.tableFormRules[item.prop]" |
|||
> |
|||
<!-- 时间格式 --> |
|||
<span v-if="item.type == 'datetime'"> {{ formatTableDate(scope.row[item.prop]) }} </span> |
|||
<!-- 标签格式 --> |
|||
<el-tag |
|||
v-else-if="item.type == 'tagFilter'" |
|||
:type="formatTableTagFilter('type',scope.row,item)" |
|||
> |
|||
{{ formatTableTagFilter('label',scope.row,item) }} |
|||
</el-tag> |
|||
<!-- 字典 --> |
|||
<span v-else-if="item.type == 'filter'">{{ formatTableTagFilter('label',scope.row,item) }}</span> |
|||
<!-- 【可编辑】文本 --> |
|||
<el-input |
|||
v-else-if="item.type == 'input'" |
|||
v-model="scope.row[item.prop]" |
|||
:placeholder="item.label" |
|||
:disabled="getEditItemDisabled(item,scope.row,scope)" |
|||
:clearable="!item.noClear" |
|||
@focus="(event)=>{editItemFocusHandle(item,scope,event)}" |
|||
@change="editItemChangeHandle(item,scope,arguments)" |
|||
@clear="editItemClearHandle(item,scope)" |
|||
/> |
|||
<!-- 【可编辑】字典选择 --> |
|||
<el-select |
|||
v-else-if="item.type == 'filterSelect'" |
|||
v-model="scope.row[item.prop]" |
|||
:filterable="!item.noSearch" |
|||
placeholder="请选择" |
|||
:disabled="getEditItemDisabled(item,scope.row,scope)" |
|||
:clearable="!item.noClear" |
|||
@focus="(event)=>{editItemFocusHandle(item,scope,event)}" |
|||
@change="editItemChangeHandle(item,scope,arguments)" |
|||
@clear="editItemClearHandle(item,scope)"> |
|||
<el-option |
|||
v-for="(op,op_index) in item.options" |
|||
:key="op_index" |
|||
:label="op.label" |
|||
:value="op.value" |
|||
/> |
|||
</el-select> |
|||
<!-- 【可编辑】时间 --> |
|||
<el-date-picker |
|||
v-else-if="item.type == 'datetimeInput'" |
|||
v-model="scope.row[item.prop]" |
|||
style="width:100%" |
|||
:type="item.inputType || 'datetime'" |
|||
:format="item.format || 'YYYY-MM-DD HH:mm:ss'" |
|||
:value-format="item.valueFormat || 'YYYY-MM-DD HH:mm:ss'" |
|||
:clearable="!item.noClear" |
|||
:disabled="getEditItemDisabled(item,scope.row,scope)" |
|||
@focus="(event)=>{editItemFocusHandle(item,scope,event)}" |
|||
@change="editItemChangeHandle(item,scope,arguments)" |
|||
@clear="editItemClearHandle(item,scope)" |
|||
/> |
|||
<!-- 【可编辑】数字 --> |
|||
<el-input-number |
|||
v-else-if="item.type == 'numberInput'" |
|||
v-model="scope.row[item.prop]" |
|||
:min="item.min" |
|||
:max="item.max" |
|||
:disabled="getEditItemDisabled(item,scope.row,scope)" |
|||
@focus="(event)=>{editItemFocusHandle(item,scope,event)}" |
|||
@change="editItemChangeHandle(item,scope,arguments)" |
|||
/> |
|||
<!-- 正常直接显示 --> |
|||
<span v-else> {{ scope.row[item.prop] }} </span> |
|||
</el-form-item> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<!-- 右侧操作列 --> |
|||
<el-table-column |
|||
v-if="props.rightOperation && props.rightOperation.length > 0" |
|||
v-auth-any="getShowRightOpera()" |
|||
:fixed="'right'" |
|||
:width="props.rightOperationColumnWidth" |
|||
:align="'center'" |
|||
label="操作"> |
|||
<template #default="scope"> |
|||
<el-button |
|||
v-for="(btn,index) in props.rightOperation" |
|||
v-show="typeof btn.hide == 'function' ? !btn.hide(scope.row,scope) : !btn.hide" |
|||
:key="index" |
|||
:type="btn.type" |
|||
:link="btn.link" |
|||
@click="rightOperationHadel(btn,scope)" |
|||
v-auth="btn.auth" |
|||
>{{btn.label}}</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</template> |
|||
|
|||
<script setup> |
|||
defineOptions({ name: 'elTable' }) |
|||
import { reactive, ref, onMounted,defineExpose } from 'vue' |
|||
import { ElMessageBox, ElMessage,ElTable, ElTableColumn } from 'element-plus' |
|||
import { formatTimeStrToStr } from "@/utils/formatTime"; |
|||
|
|||
const state = reactive({}) |
|||
|
|||
const props = defineProps({ |
|||
// 多选 |
|||
multipleTable:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
// 序号 |
|||
showTableIndex:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
// 左侧操作列 |
|||
leftOperation:{ |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 左侧操作列宽度 |
|||
leftOperationColumnWidth:{ |
|||
type: Number, |
|||
default: 120 |
|||
}, |
|||
// 右侧操作列 |
|||
rightOperation:{ |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 右侧操作列宽度 |
|||
rightOperationColumnWidth:{ |
|||
type: Number, |
|||
default: 150 |
|||
}, |
|||
// table数据 |
|||
tableData: { |
|||
type: Object, |
|||
default: [] |
|||
}, |
|||
// table表头 |
|||
tableColumns: { |
|||
type: Object, |
|||
default: [] |
|||
}, |
|||
// 表头宽度 |
|||
columnWidth:{ |
|||
type: Number, |
|||
default: null |
|||
}, |
|||
// 表头对齐 |
|||
columnHeaderAlign:{ |
|||
type: String, |
|||
default: 'center' |
|||
}, |
|||
// 表内容对齐 |
|||
columnAlign:{ |
|||
type: String, |
|||
default: 'center' |
|||
}, |
|||
// table输入表单的rules |
|||
tableFormRules: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 可编辑单元格判断禁用 |
|||
getEditItemDisabled:{ |
|||
type: [Function,Boolean], |
|||
default: false |
|||
}, |
|||
// table的复选框是否禁用判断 |
|||
selectableDisabled:{ |
|||
type: [Function,Boolean], |
|||
default: true |
|||
}, |
|||
// 行class |
|||
tableRowClassName:{ |
|||
type: Function, |
|||
default: null |
|||
}, |
|||
// 单元格class |
|||
tableCellClassName:{ |
|||
type: Function, |
|||
default: null |
|||
}, |
|||
}) |
|||
|
|||
const emits = defineEmits([ |
|||
'sortChange', |
|||
'leftOperationHadel', |
|||
'rightOperationHadel', |
|||
'tableSelectionHandle', |
|||
'editItemFocusHandle', |
|||
'editItemChangeHandle', |
|||
'editItemClearHandle', |
|||
]) |
|||
|
|||
// 多选 |
|||
function tableSelectionHandle (val){ |
|||
emits('tableSelectionHandle',val) |
|||
} |
|||
|
|||
// 格式化时间 |
|||
function formatTableDate(time) { |
|||
let _time = '-' |
|||
if (time) { _time = formatTimeStrToStr(time) } |
|||
return _time |
|||
} |
|||
|
|||
// 格式化TagFilter |
|||
function formatTableTagFilter(type,row,item){ |
|||
let _op = item.options.filter(op=>op.value == row[item.prop]) |
|||
if(!_op || _op.length <=0 || !_op[0][type]){ |
|||
if(type=='type'){return 'info'} |
|||
else{return '--'} |
|||
}else{ |
|||
return _op[0][type] |
|||
} |
|||
} |
|||
|
|||
|
|||
//排序 |
|||
function sortChange(data) { |
|||
emits('sortChange',data) |
|||
} |
|||
|
|||
// 左侧操作列 |
|||
function leftOperationHadel(btn,scope) { |
|||
emits('leftOperationHadel',btn,scope) |
|||
} |
|||
|
|||
// 判断是否显示右侧操作权限 |
|||
function getShowRightOpera(){ |
|||
let _arr = [] |
|||
props.rightOperation.forEach(item=>{_arr.push(item.auth)}) |
|||
return _arr |
|||
} |
|||
|
|||
// 判断可编辑元素是否禁用 |
|||
function getEditItemDisabled(item,row,scope){ |
|||
if(typeof props.getEditItemDisabled == 'boolean'){ |
|||
return props.getEditItemDisabled |
|||
}else{ |
|||
return props.getEditItemDisabled(item,row,scope.$index) |
|||
} |
|||
} |
|||
|
|||
// table的复选框是否禁用判断 |
|||
function selectableDisabled(row,index){ |
|||
if(typeof props.selectableDisabled == 'function'){ |
|||
return props.selectableDisabled(row,index) |
|||
}else{ |
|||
return props.selectableDisabled |
|||
} |
|||
} |
|||
|
|||
// 可编辑元素Focus事件 |
|||
function editItemFocusHandle(item,scope,event) { |
|||
emits('editItemFocusHandle',item,scope,event) |
|||
} |
|||
|
|||
// 可编辑元素change事件 |
|||
function editItemChangeHandle(item,scope,data) { |
|||
emits('editItemChangeHandle',item,scope,data) |
|||
} |
|||
|
|||
// 可编辑元素clear事件 |
|||
function editItemClearHandle(item,scope) { |
|||
emits('editItemClearHandle',item,scope) |
|||
} |
|||
|
|||
// 右侧操作列 |
|||
function rightOperationHadel(btn,scope) { |
|||
emits('rightOperationHadel',btn,scope) |
|||
} |
|||
|
|||
const tableForm_Ref = ref(null) |
|||
defineExpose({ |
|||
tableForm_Ref, |
|||
}); |
|||
onMounted(() => {}) |
|||
|
|||
</script> |
|||
|
|||
<style scope lang="scss"> |
|||
.current-select-tableRow{ |
|||
background:#e1f3d8 !important; |
|||
td{ |
|||
background:#e1f3d8 !important; |
|||
} |
|||
} |
|||
.normal-tableRow{ |
|||
td{ |
|||
background:#fff; |
|||
} |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,154 @@ |
|||
<template> |
|||
<el-dialog |
|||
v-model="dialogVisible" |
|||
title="导入" |
|||
width="600" |
|||
:close-on-click-modal="false" |
|||
> |
|||
<el-upload |
|||
ref="uploadRef" |
|||
v-model:file-list="fileList" |
|||
:action="importUrl" |
|||
:auto-upload="false" |
|||
:disabled="formLoading" |
|||
:headers="uploadHeaders" |
|||
:limit="1" |
|||
:on-error="submitFormError" |
|||
:on-exceed="handleExceed" |
|||
:on-success="submitFormSuccess" |
|||
:accept="accept" |
|||
drag |
|||
style="width: 300px; margin: 0 auto" |
|||
v-loading="formLoading" |
|||
> |
|||
<el-icon color="#c0c4cc" :size="60"><UploadFilled /></el-icon> |
|||
<div class="el-upload__text">将文件拖到此处,或'<em>点击上传</em></div> |
|||
</el-upload> |
|||
<template #footer> |
|||
<div class="footerBtns"> |
|||
<div> |
|||
<el-button type="success" plain @click="importTemplate"> |
|||
<el-icon><Download /></el-icon>下载模板 |
|||
</el-button> |
|||
</div> |
|||
<div> |
|||
<el-button @click="dialogVisible = false">取消</el-button> |
|||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</el-dialog> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
defineOptions({ name: 'importPop' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import { ElDialog,ElMessage } from 'element-plus' |
|||
import { downloadByData } from '@/utils/download' |
|||
import { getCommonImportTemplate } from '@/api/common/index' |
|||
|
|||
import { useRoute } from 'vue-router' |
|||
const route = useRoute() |
|||
|
|||
const dialogVisible = ref(false) // 弹窗的是否展示 |
|||
const fileList = ref([]) // 文件列表 |
|||
const uploadRef = ref() |
|||
const formLoading = ref(false) // 表单的加载中 |
|||
const uploadHeaders = ref() // 上传 Header 头 |
|||
// const importUrl = getBaseUrl() + import.meta.env.VITE_API_URL + (props.url || '/finance/common-excel-in/import') |
|||
|
|||
const props = defineProps({ |
|||
// api名称 |
|||
apiName: { |
|||
type: String, |
|||
default: null |
|||
}, |
|||
// 可以导入的文件类型 |
|||
accept: { |
|||
type: String, |
|||
required: false, |
|||
default: '.xlsx,.xls' |
|||
}, |
|||
}) |
|||
const mode = import.meta.env.MODE |
|||
let app_base_api = mode == 'prod' ? systemConfig.baseUrl : import.meta.env.VITE_API_BASE_URL |
|||
const importUrl = `${app_base_api}/api/${props.apiName}/import` |
|||
console.log('importUrl',importUrl) |
|||
|
|||
/** 重置表单 */ |
|||
const resetForm = () => { |
|||
// 重置上传状态和文件 |
|||
formLoading.value = false |
|||
uploadRef.value?.clearFiles() |
|||
fileList.value = [] |
|||
} |
|||
|
|||
/** 打开弹窗 */ |
|||
const open = () => { |
|||
dialogVisible.value = true |
|||
resetForm() |
|||
} |
|||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
|||
|
|||
/** 上传错误提示 */ |
|||
const submitFormError = (): void => { |
|||
ElMessage.error('上传失败,请您重新上传!') |
|||
formLoading.value = false |
|||
} |
|||
|
|||
/** 文件数超出提示 */ |
|||
const handleExceed = (): void => { |
|||
ElMessage.error('最多只能上传一个文件!') |
|||
} |
|||
|
|||
/** 下载模板操作 */ |
|||
const importTemplate = () => { |
|||
formLoading.value = true |
|||
getCommonImportTemplate(props.apiName) |
|||
.then(res=>{ |
|||
downloadByData(res.data,route.meta.title+'_模板.xlsx') |
|||
}) |
|||
.catch(err=>{ElMessage.error('获取失败,请重试!')}) |
|||
.finally(() => (formLoading.value = false)) |
|||
} |
|||
|
|||
// /** 提交表单 */ |
|||
const submitForm = async () => { |
|||
if (fileList.value.length == 0) { |
|||
ElMessage.error('请上传文件') |
|||
return |
|||
} |
|||
// 提交请求 |
|||
// uploadHeaders.value = { |
|||
// Authorization: 'Bearer ' + getAccessToken(), |
|||
// 'tenant-id': getTenantId() |
|||
// } |
|||
formLoading.value = true |
|||
uploadRef.value!.submit() |
|||
} |
|||
|
|||
// /** 文件上传成功 */ |
|||
const emits = defineEmits(['success']) |
|||
// 成功后处理 |
|||
const submitFormSuccess = (response: any) => { |
|||
formLoading.value = false |
|||
if (response) { |
|||
if(response.code == '200'){ |
|||
ElMessage.success('导入成功!') |
|||
}else{ |
|||
ElMessage.error(response.message) |
|||
} |
|||
} |
|||
|
|||
// 发送操作成功的事件 |
|||
formLoading.value = false |
|||
emits('success') |
|||
dialogVisible.value = false |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.footerBtns{ |
|||
display: flex; |
|||
padding: 20px; |
|||
justify-content: space-between; |
|||
} |
|||
</style> |
@ -0,0 +1,575 @@ |
|||
<template> |
|||
<div class="app-container" v-loading="state.loading"> |
|||
<el-card class="search-container" v-if="!props.hideSearch"> |
|||
<el-form :inline="true"> |
|||
<el-form-item |
|||
v-auth="props.apiName + state.searchBtnOptions['search'].auth" |
|||
v-for="(item,index) in props.searchOptions" |
|||
:key="index" |
|||
:label="item.label"> |
|||
<!-- 文本 --> |
|||
<el-input |
|||
v-if="item.type == 'input'" |
|||
v-model="props.searchFilter[item.prop]" |
|||
:placeholder="item.label" |
|||
:clearable="!item.noClear" |
|||
/> |
|||
<!-- 数字 --> |
|||
<el-input-number |
|||
v-if="item.type == 'number'" |
|||
v-model="props.searchFilter[item.prop]" |
|||
:min="item.min" |
|||
:max="item.max" |
|||
/> |
|||
<!-- 时间区域 --> |
|||
<el-date-picker |
|||
v-if="item.type == 'datetimerange'" |
|||
v-model="props.searchFilter[item.prop]" |
|||
type="datetimerange" |
|||
start-placeholder="起始时间" |
|||
end-placeholder="结束时间" |
|||
format="YYYY-MM-DD HH:mm:ss" |
|||
value-format="YYYY-MM-DD HH:mm:ss" |
|||
/> |
|||
<!-- 选择框 --> |
|||
<el-select |
|||
v-if="item.type == 'select'" |
|||
v-model="props.searchFilter[item.prop]" |
|||
:filterable="!item.noSearch" |
|||
placeholder="请选择" |
|||
style="width: 240px" |
|||
:clearable="!item.noClear" |
|||
> |
|||
<el-option |
|||
v-for="(op,op_index) in item.options" |
|||
:key="op_index" |
|||
:label="op.label" |
|||
:value="op.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button |
|||
v-for="(btn,btn_key) in props.searchButtons" |
|||
:key="btn_key" |
|||
:icon="state.searchBtnOptions[btn].icon" |
|||
v-auth="state.searchBtnOptions[btn].sAuth || props.apiName + state.searchBtnOptions[btn].auth" |
|||
:type="state.searchBtnOptions[btn].type" |
|||
@click="searchBtnHandle(btn)" |
|||
>{{state.searchBtnOptions[btn].label}}</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-card> |
|||
|
|||
<el-card class="paged-table-container"> |
|||
<elTable |
|||
:columnWidth="props.columnWidth" |
|||
:columnHeaderAlign="props.columnHeaderAlign" |
|||
:columnAlign="props.columnAlign" |
|||
:tableData="state.tableData" |
|||
:tableColumns="getTableColumns()" |
|||
@sortChange="sortChange" |
|||
:leftOperation="props.leftOperation" |
|||
@leftOperationHadel="leftOperationHadel" |
|||
:rightOperation="getRightOperation()" |
|||
@rightOperationHadel="rightOperationHadel" |
|||
:multipleTable="props.multipleTable" |
|||
@tableSelectionHandle="tableSelectionHandle" |
|||
></elTable> |
|||
|
|||
<elPager |
|||
style="margin-top: 15px;float:right" |
|||
:pager="state.pager" |
|||
@pageSizeChange="pageSizeChange" |
|||
@pageCurrentChange="pageCurrentChange" |
|||
></elPager> |
|||
</el-card> |
|||
|
|||
<!-- 导入弹窗 --> |
|||
<importPop |
|||
ref="importPopRef" |
|||
:apiName="props.apiName" |
|||
@success="importSuccess" |
|||
/> |
|||
|
|||
<!-- 编辑弹窗 --> |
|||
<apiEditPop |
|||
ref="apiEditPopRef" |
|||
:apiName="props.apiName" |
|||
@submitEditForm="submitEditForm" |
|||
:formRules="props.apiEditFormRules" |
|||
/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script setup> |
|||
defineOptions({ name: 'tablePage' }) |
|||
import store from '@/stores' |
|||
import apiTableColumns from '@/utils/common/apiTableColumns' |
|||
import { reactive, ref, onMounted,computed,defineExpose } from 'vue' |
|||
import { |
|||
getCommonPaged, |
|||
getCommonDeatailPaged, |
|||
postCommonExport, |
|||
postCommonCreate, |
|||
putCommonUpdate, |
|||
deleteCommonApi, |
|||
getCommonCustominvoke |
|||
} from '@/api/common/index' |
|||
import { ElMessageBox, ElMessage,ElTable, ElTableColumn } from 'element-plus' |
|||
import elTable from '@/components/elTable/index.vue' |
|||
import elPager from '@/components/elPager/index.vue' |
|||
import { getPageParamsForFilter } from '@/utils/common/index' |
|||
import { downloadByData } from '@/utils/download' |
|||
import importPop from '@/components/importPop/index.vue' |
|||
import apiEditPop from '@/components/apiEditPop/index.vue' |
|||
import { formatDate } from '@/utils/formatTime' |
|||
import apiServeNames from '@/utils/common/apiServeNames' |
|||
|
|||
import { useRoute } from 'vue-router' |
|||
const route = useRoute() |
|||
const userStore = store.userStore() |
|||
const userInfo = userStore.state |
|||
|
|||
const state = reactive({ |
|||
loading:false, |
|||
searchBtnOptions:{ |
|||
search:{icon:'Search',auth:':page',label:'查询',type:null}, |
|||
create:{icon:'Plus',auth:':create',label:'新增',type:'primary'}, |
|||
import:{icon:'BottomRight',auth:':import',label:'导入',type:'warning'}, |
|||
export:{icon:'TopRight',auth:':export',label:'导出',type:'success'}, |
|||
custominvoke:{icon:'Position',auth:':custominvoke',label:'手动开关',type:'primary'}, |
|||
}, |
|||
tableData:[], |
|||
// table排序处理 |
|||
sortFilter:{ |
|||
sortBy:undefined, |
|||
isAscending:undefined |
|||
}, |
|||
pager:{ |
|||
page: 1, |
|||
pageSize: 10, |
|||
total: 1, |
|||
}, |
|||
tableSelectList:[] |
|||
}) |
|||
|
|||
const props = defineProps({ |
|||
// api名称 |
|||
apiName: { |
|||
type: String, |
|||
default: null |
|||
}, |
|||
// api类型 detailApi:走getdetail接口,不传或者pageApi:走getdatapaged接口 |
|||
apiType: { |
|||
type: String, |
|||
default: null |
|||
}, |
|||
// 隐藏表头搜索 |
|||
hideSearch:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
// 多选 |
|||
multipleTable:{ |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
// 左侧操作列 |
|||
leftOperation:{ |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 右侧操作列 |
|||
rightOperation:{ |
|||
type: [Object,String], |
|||
default: null |
|||
}, |
|||
// 右侧操作列,特殊自定义格式下,包含api操作 |
|||
showApiRightOperation:{ |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 右侧通用按钮特殊字段判断隐藏规则,默认为编辑删除,writeState=true不可操作, |
|||
// 如有特殊规则,则使用该方法特殊处理,当前判断方式为“=”,如后期有其他需求再进行封装 |
|||
apiRightHideConfig:{ |
|||
type: Object, |
|||
default: { |
|||
apiUpdate:{prop:'writeState',ruleValue:true}, |
|||
apiDelete:{prop:'writeState',ruleValue:true}, |
|||
} |
|||
}, |
|||
// table表头 |
|||
tableColumns: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
// 查询配置 |
|||
searchOptions: { |
|||
type: Object, |
|||
default: [] |
|||
}, |
|||
// 查询按钮 |
|||
searchButtons: { |
|||
type: Object, |
|||
default: ['search','export'] |
|||
}, |
|||
// table查询数据filter |
|||
searchFilter: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
// 表头宽度 |
|||
columnWidth:{ |
|||
type: Number, |
|||
default: 120 |
|||
}, |
|||
// 表头对齐 |
|||
columnHeaderAlign:{ |
|||
type: String, |
|||
default: 'center' |
|||
}, |
|||
// 表内容对齐 |
|||
columnAlign:{ |
|||
type: String, |
|||
default: 'center' |
|||
}, |
|||
// 表单规则 |
|||
apiEditFormRules:{ |
|||
type: Object, |
|||
default: null |
|||
} |
|||
}) |
|||
|
|||
// 获取表头 |
|||
function getTableColumns(){ |
|||
return props.tableColumns || apiTableColumns[props.apiName] |
|||
} |
|||
|
|||
const emits = defineEmits([ |
|||
'leftOperationHadel', |
|||
'rightOperationHadel', |
|||
'tableSelectionHandle' |
|||
]) |
|||
|
|||
// table多选 |
|||
function tableSelectionHandle (val){ |
|||
state.tableSelectList = val |
|||
emits('tableSelectionHandle',val) |
|||
} |
|||
|
|||
// 左侧操作列 |
|||
function leftOperationHadel(btn,scope) { |
|||
emits('leftOperationHadel',btn,scope) |
|||
} |
|||
|
|||
// 获取右侧操作列 |
|||
function getRightOperation() { |
|||
// 自定义右侧列,且不需要默认api通用操作 |
|||
if(typeof props.rightOperation == 'object' && !props.showApiRightOperation){ |
|||
return props.rightOperation |
|||
} |
|||
// 无自定义操作,或者有自定义且需要默认api操作 |
|||
else if( |
|||
(typeof props.rightOperation == 'object' && props.showApiRightOperation) |
|||
|| typeof props.rightOperation == 'string' |
|||
){ |
|||
// 格式化默认api按钮合集 |
|||
let _apiArr = props.showApiRightOperation || props.rightOperation.split(',') |
|||
let _config = { |
|||
apiUpdate:{label:'编辑',type:'warning'}, |
|||
apiDelete:{label:'删除',type:'danger'}, |
|||
} |
|||
let _btns = [] |
|||
if(_apiArr && _apiArr.length > 0){ |
|||
_apiArr.forEach(item => { |
|||
_btns.push({ |
|||
label:_config[item].label, |
|||
name:item, |
|||
link:true, |
|||
type:_config[item].type, |
|||
auth:props.apiName+':'+item, |
|||
hide:(row,scope) => {return row[props.apiRightHideConfig[item].prop] == props.apiRightHideConfig[item].ruleValue} |
|||
}) |
|||
}); |
|||
} |
|||
// 如果有自定义按钮,合并默认api按钮 |
|||
if(typeof props.rightOperation == 'object'){ |
|||
_btns = [..._btns,...props.rightOperation] |
|||
} |
|||
return _btns |
|||
} |
|||
} |
|||
|
|||
// 右侧操作列操作 |
|||
const apiEditPopRef = ref() |
|||
function rightOperationHadel(btn,scope) { |
|||
// 通用编辑 |
|||
if(btn.name == 'apiUpdate'){ |
|||
let _tableColums = getTableColumns() |
|||
let _list = _tableColums.filter(item => !item.noEdit) |
|||
apiEditPopRef.value.open(_list,scope.row) |
|||
} |
|||
// 通用删除 |
|||
if(btn.name == 'apiDelete'){ |
|||
ElMessageBox.confirm(`是否确定删除?`, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
state.loading = true |
|||
deleteCommonApi(props.apiName,scope.row.uId) |
|||
.then(res=>{ |
|||
ElMessage.success('操作成功!') |
|||
getTableData(1); |
|||
}) |
|||
.finally(()=>{state.loading = false}) |
|||
}) |
|||
} |
|||
emits('rightOperationHadel',btn,scope) |
|||
} |
|||
|
|||
// 编辑表单提交 |
|||
const submitEditForm = async (type,formData,formConfig) => { |
|||
apiEditPopRef.value.validate((valid) => { |
|||
if(valid){ |
|||
// 新增 |
|||
if(type == 'create'){ |
|||
if(formData.hasOwnProperty('createUser')){formData.createUser = userInfo.realName} |
|||
if(formData.hasOwnProperty('createByUser')){formData.createByUser = userInfo.realName} |
|||
if(formData.hasOwnProperty('createTime')){formData.createTime = formatDate(new Date(), "YYYY-mm-dd HH:MM:SS")} |
|||
apiEditPopRef.value.changeLoading(true) |
|||
postCommonCreate(props.apiName,formData) |
|||
.then(res=>{ |
|||
apiEditPopRef.value.close() |
|||
ElMessage.success('操作成功!') |
|||
getTableData(1); |
|||
}) |
|||
.catch(err=>{ElMessage.error('操作失败!')}) |
|||
.finally(()=>{apiEditPopRef.value.changeLoading(false)}) |
|||
}else{ |
|||
// 修改人信息处理 |
|||
if( |
|||
(formData.hasOwnProperty('updateByUser') && formData.hasOwnProperty('updateTime')) |
|||
|| (formData.hasOwnProperty('updateUser') && formData.hasOwnProperty('updateTime')) |
|||
){ |
|||
if(formData.hasOwnProperty('updateByUser')){formData.updateByUser = userInfo.realName} |
|||
if(formData.hasOwnProperty('updateUser')){formData.updateUser = userInfo.realName} |
|||
if(formData.hasOwnProperty('updateTime')){formData.updateTime = formatDate(new Date(), "YYYY-mm-dd HH:MM:SS")} |
|||
}else{ |
|||
// 特殊不处理页面 |
|||
let _notChange=['taskconifgure'] |
|||
if(_notChange.indexOf(props.apiName) < 0){ |
|||
formData.remark= `修改信息:${userInfo.realName} ${formatDate(new Date(), "YYYY-mm-dd HH:MM:SS")}` |
|||
} |
|||
} |
|||
apiEditPopRef.value.changeLoading(true) |
|||
putCommonUpdate(props.apiName,formData) |
|||
.then(res=>{ |
|||
apiEditPopRef.value.close() |
|||
ElMessage.success('操作成功!') |
|||
getTableData(1); |
|||
}) |
|||
.catch(err=>{ElMessage.error('操作失败!')}) |
|||
.finally(()=>{apiEditPopRef.value.changeLoading(false)}) |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 格式化页面传参 |
|||
function getPageParams(){ |
|||
let _filters = [] |
|||
console.log(383,props.searchFilter) |
|||
if(props.hideSearch){ |
|||
_filters = props.searchFilter |
|||
}else{ |
|||
for(let i in props.searchFilter){ |
|||
console.log(388,i) |
|||
let _item = props.searchOptions.filter(item=>item.prop == i) |
|||
let _type = (_item && _item.length > 0) ? _item[0].type : null |
|||
if(props.searchFilter[i] || props.searchFilter[i] == 0){ |
|||
// 时间区域格式 |
|||
if(_type == 'datetimerange'){ |
|||
_filters.push( |
|||
{ |
|||
logic: "And", |
|||
column: i, |
|||
action: '>=', |
|||
value: props.searchFilter[i][0] |
|||
} |
|||
) |
|||
_filters.push( |
|||
{ |
|||
logic: "And", |
|||
column: i, |
|||
action: '<=', |
|||
value: props.searchFilter[i][1] |
|||
} |
|||
) |
|||
}else{ |
|||
let _action = 'like' |
|||
let _EqualTypes = ['tagFilter','filter','number','select']//等于情况的类型 |
|||
if(_EqualTypes.indexOf(_type) >= 0){ |
|||
_action = '==' |
|||
} |
|||
_filters.push( |
|||
{ |
|||
logic: "And", |
|||
column: i, |
|||
action: _action, |
|||
value: props.searchFilter[i] |
|||
} |
|||
) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
let _pageParams = getPageParamsForFilter({ |
|||
pageNumber:state.pager.page, |
|||
pageSize:state.pager.pageSize, |
|||
sortBy:state.sortFilter.sortBy, |
|||
isAscending:state.sortFilter.isAscending, |
|||
condition:{ |
|||
filters:_filters |
|||
} |
|||
}) |
|||
return _pageParams |
|||
} |
|||
|
|||
// 获取页面数据 |
|||
function getTableData(page) { |
|||
if(props.apiType == 'detailApi'){ |
|||
state.loading = true |
|||
if(!page)page = state.pager.page |
|||
if(page)state.pager.page = page |
|||
getCommonDeatailPaged(props.apiName,getPageParams()) |
|||
.then((resp) => { |
|||
state.tableData = resp.data.data |
|||
state.pager.total = resp.data.totalCount |
|||
}) |
|||
.catch(err=>{ElMessage.error('数据获取失败!')}) |
|||
.finally(() => (state.loading = false)) |
|||
}else{ |
|||
state.loading = true |
|||
if(!page)page = state.pager.page |
|||
if(page)state.pager.page = page |
|||
getCommonPaged(props.apiName,getPageParams()) |
|||
.then((resp) => { |
|||
state.tableData = resp.data.data |
|||
state.pager.total = resp.data.totalCount |
|||
}) |
|||
.catch(err=>{ElMessage.error('数据获取失败!')}) |
|||
.finally(() => (state.loading = false)) |
|||
} |
|||
} |
|||
|
|||
const importPopRef = ref() |
|||
// 按钮功能 |
|||
function searchBtnHandle(btn){ |
|||
console.log(btn) |
|||
// 查询 |
|||
if(btn == 'search'){ |
|||
getTableData() |
|||
} |
|||
// 新增 |
|||
else if (btn == 'create'){ |
|||
let _tableColums = getTableColumns() |
|||
let _list = _tableColums.filter(item => !item.noEdit) |
|||
apiEditPopRef.value.open(_list) |
|||
} |
|||
// 导入 |
|||
else if (btn == 'import'){ |
|||
importPopRef.value.open() |
|||
} |
|||
// 导出 |
|||
else if (btn == 'export'){ |
|||
state.loading = true |
|||
getTableData()//同步数据查询 |
|||
postCommonExport(props.apiName,getPageParams()) |
|||
.then((res) => { |
|||
downloadByData(res.data,route.meta.title+'.xlsx') |
|||
}) |
|||
.catch(err=>{ElMessage.error('操作失败!')}) |
|||
.finally(() => (state.loading = false)) |
|||
} |
|||
// 手动开关 |
|||
else if (btn == 'custominvoke'){ |
|||
ElMessageBox.confirm('是否确定操作手动开关?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
state.loading = true |
|||
let _data = { |
|||
taskName:apiServeNames[props.apiName].taskName, |
|||
client:'Chery' |
|||
} |
|||
getCommonCustominvoke(props.apiName,_data) |
|||
.then((res) => { |
|||
ElMessage.success('操作成功!') |
|||
getTableData(1)//同步数据查询 |
|||
}) |
|||
.finally(() => (state.loading = false)) |
|||
}) |
|||
} |
|||
// todo:手动传出(多选) |
|||
else if (btn == 'custominvokeMany'){ |
|||
console.log(state.tableSelectList) |
|||
if(state.tableSelectList && state.tableSelectList.length > 0 ){ |
|||
ElMessageBox.confirm('是否确定手动传出?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
// state.loading = true |
|||
// deleteMenu({ ids:[id] }).then(() => { |
|||
|
|||
// }) |
|||
// .finally(() => (state.loading = false)) |
|||
}) |
|||
}else{ |
|||
ElMessage.warning('未选中任何数据') |
|||
} |
|||
} |
|||
} |
|||
|
|||
// 排序 |
|||
function sortChange(data) { |
|||
const { prop, order } = data; |
|||
if (!prop || !order) { |
|||
state.sortFilter.sortBy = undefined; |
|||
state.sortFilter.isAscending = undefined; |
|||
getTableData(1); |
|||
return; |
|||
} |
|||
state.sortFilter.sortBy = prop; |
|||
state.sortFilter.isAscending = (order == "ascending"); |
|||
getTableData(1); |
|||
} |
|||
|
|||
// 导入成功之后todo |
|||
function importSuccess(response,importDate){ |
|||
getTableData() |
|||
} |
|||
|
|||
// size-change |
|||
function pageSizeChange(pageSize){ |
|||
state.pager.pageSize = pageSize |
|||
getTableData(1) |
|||
} |
|||
|
|||
// current-change |
|||
function pageCurrentChange(page){ |
|||
getTableData(page) |
|||
} |
|||
|
|||
onMounted(() => { |
|||
getTableData() |
|||
}) |
|||
|
|||
defineExpose({ |
|||
state, |
|||
getTableData |
|||
}); |
|||
</script> |
@ -0,0 +1,124 @@ |
|||
const apiServeNames = { |
|||
// M+6月物料需求计划风险确认
|
|||
cherysupplierconmmrp:{ |
|||
tableName:'SUPPLIER_CON_MMRP', |
|||
taskName:'M+6月物料需求计划风险确认', |
|||
}, |
|||
|
|||
// 日物料需求计划风险确认
|
|||
cherysuppliercondate:{ |
|||
tableName:'SUPPLIER_CON_DATE', |
|||
taskName:'日物料需求计划风险确认' |
|||
}, |
|||
|
|||
// 采购订单风险确认
|
|||
cherysupplierconpo:{ |
|||
tableName:'SUPPLIER_CON_PO', |
|||
taskName:'采购订单风险确认' |
|||
}, |
|||
|
|||
// 来料检验数据
|
|||
supplierpromaterialstock:{ |
|||
tableName:'SUPPLIER_PRO_MATERIAL_STOCK', |
|||
taskName:'来料检验数据' |
|||
}, |
|||
|
|||
// 排产数据
|
|||
cherysupplierproscheduling:{ |
|||
tableName:'SUPPLIER_PRO_SCHEDULING', |
|||
taskName:'排产数据' |
|||
}, |
|||
|
|||
// 供应商基础信息
|
|||
cherysupplierinfo:{ |
|||
tableName:'SUPPLIER_INFO', |
|||
taskName:'供应商基础信息' |
|||
}, |
|||
|
|||
// 人员资质信息
|
|||
cherysupplieremployee:{ |
|||
tableName:'SUPPLIER_EMPLOYEE', |
|||
taskName:'人员资质信息' |
|||
}, |
|||
|
|||
// BOM主数据
|
|||
cherysupplierbom:{ |
|||
tableName:'SUPPLIER_BOM', |
|||
taskName:'BOM主数据' |
|||
}, |
|||
|
|||
// 过程控制项质量数据
|
|||
cherysupplierprocps:{ |
|||
tableName:'SUPPLIER_PRO_CPS', |
|||
taskName:'过程控制项质量数据' |
|||
}, |
|||
|
|||
// 生产过程数据
|
|||
cherysupplierprodata:{ |
|||
tableName:'SUPPLIER_PRO_DATA', |
|||
taskName:'生产过程数据' |
|||
}, |
|||
|
|||
// 产品一次合格率
|
|||
cherysupplierprofirstpassyield:{ |
|||
tableName:'SUPPLIER_PRO_FIRST_PASSYIELD', |
|||
taskName:'产品一次合格率' |
|||
}, |
|||
|
|||
// 工位一次合格率
|
|||
cherysupplierprostationfirstpassyield:{ |
|||
tableName:'SUPPLIER_PRO_STATION_FIRST_PASSYIELD', |
|||
taskName:'工位一次合格率' |
|||
}, |
|||
|
|||
// 缺陷业务数据
|
|||
cherysupplierproflaw:{ |
|||
tableName:'SUPPLIER_PRO_FLAW', |
|||
taskName:'缺陷业务数据' |
|||
}, |
|||
|
|||
// 物料主数据
|
|||
cherysupplierpromaterialdata:{ |
|||
tableName:'SUPPLIER_PRO_MATERIAL_DATA', |
|||
taskName:'物料主数据' |
|||
}, |
|||
|
|||
// 附件类数据
|
|||
cherysupplierproattachmentdata:{ |
|||
tableName:'SUPPLIER_PRO_ATTACHMENT_DATA', |
|||
taskName:'附件类数据' |
|||
}, |
|||
|
|||
// 工艺装备
|
|||
cherysupplierproprocessequipment:{ |
|||
tableName:'SUPPLIER_PRO_PROCESS_EQUIPMENT', |
|||
taskName:'工艺装备' |
|||
}, |
|||
|
|||
// 工艺
|
|||
cherysupplierproprocess:{ |
|||
tableName:'SUPPLIER_PRO_PROCESS', |
|||
taskName:'工艺' |
|||
}, |
|||
|
|||
/*无页面,供任务明细页面使用 */ |
|||
// 环境业务数据
|
|||
cherysupplierproenvironment:{ |
|||
tableName:'SUPPLIER_PRO_ENVIRONMENT', |
|||
taskName:'环境业务数据' |
|||
}, |
|||
|
|||
// 设备OEE达成率
|
|||
cherysupplierprooeeachievementrate:{ |
|||
tableName:'SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE', |
|||
taskName:'设备OEE达成率' |
|||
}, |
|||
|
|||
// OEE时间明细
|
|||
cherysupplierprooeetimedetails:{ |
|||
tableName:'SUPPLIER_PRO_OEE_TIME_DETAILS', |
|||
taskName:'OEE时间明细' |
|||
}, |
|||
} |
|||
|
|||
export default apiServeNames |
@ -0,0 +1,880 @@ |
|||
import EnumList from '@/utils/common/enumList' |
|||
|
|||
const apiTableColumns = { |
|||
// 接口设置表
|
|||
taskconifgure:[ |
|||
{prop:'tableName',title:'表名',align:'left',width:160}, |
|||
{prop:'taskName',title:'任务名称',align:'left',width:160}, |
|||
{prop:'api',title:'api',align:'left',width:200}, |
|||
{prop:'url',title:'url',align:'left',width:300}, |
|||
{prop:'corn',title:'corn'}, |
|||
{prop:'writeState',title:'writeState',type:'tagFilter',options:EnumList.whetherBoolean}, |
|||
{prop:'readState',title:'readState',type:'tagFilter',options:EnumList.whetherBoolean}, |
|||
{prop:'isAuto',title:'是否自动执行',type:'tagFilter',options:EnumList.whetherBoolean}, |
|||
{prop:'remark',title:'remark',align:'left',width:300}, |
|||
{prop:'creationTime',title:'创建时间',width:180,type:'datetime',noEdit:true}, |
|||
{prop:'module',title:'module'}, |
|||
{prop:'client',title:'客户'}, |
|||
], |
|||
|
|||
// 任务列表
|
|||
tasksub:[ |
|||
// {prop:'writeState',title:'writeState'},
|
|||
// {prop:'readState',title:'readState'},
|
|||
// {prop:'taskId',title:'taskId'},
|
|||
{prop:'tableName',title:'表名',align:'left',width:240,disabled:true}, |
|||
{prop:'taskName',title:'任务名称',align:'left',width:160,disabled:true}, |
|||
{prop:'dataCount',title:'同步总数量',type:'number'}, |
|||
{prop:'subscriber',title:'客户名'}, |
|||
{prop:'failedCount',title:'失败次数',type:'number'}, |
|||
{prop:'failedInfo',title:'失败信息'}, |
|||
{prop:'domain',title:'域名'}, |
|||
{prop:'site',title:'站点'}, |
|||
{prop:'syncedPageCount',title:'更新完成次数',type:'number',width:160}, |
|||
{prop:'remark',title:'备注',align:'left',width:300}, |
|||
{prop:'createUser',title:'创建人',noEdit:true}, |
|||
{prop:'creationTime',title:'创建时间',width:180,noEdit:true}, |
|||
{prop:'updateUser',title:'修改人',noEdit:true}, |
|||
{prop:'updateTime',title:'修改时间',width:180,noEdit:true}, |
|||
], |
|||
|
|||
/*计划物流 */ |
|||
// 整车月度生产计划2
|
|||
supplierproplaning:[ |
|||
{prop:'releaseEdition',title:'需求发布版次',width:150}, |
|||
{prop:'models',title:'车型'}, |
|||
{prop:'salseDepartment',title:'销售单位'}, |
|||
{prop:'type',title:'类型'}, |
|||
{prop:'assembly',title:'动力总成'}, |
|||
{prop:'pattern',title:'版型'}, |
|||
{prop:'omterior',title:'内饰'}, |
|||
{prop:'startMonth',title:'起始月份'}, |
|||
{prop:'quantity1',title:'数量1'}, |
|||
{prop:'quantity2',title:'数量2'}, |
|||
{prop:'quantity3',title:'数量3'}, |
|||
{prop:'quantity4',title:'数量4'}, |
|||
{prop:'quantity5',title:'数量5'}, |
|||
{prop:'quantity6',title:'数量6'}, |
|||
{prop:'plant',title:'工厂'}, |
|||
{prop:'createByUser',title:'创建人'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
{prop:'updateByUser',title:'修改人'}, |
|||
{prop:'updateTime',title:'修改时间',width:180}, |
|||
{prop:'isDelete',title:'是否删除',type:'tagFilter',options:EnumList.whether}, |
|||
{prop:'version',title:'版本号'}, |
|||
], |
|||
// M+6月物料需求计划
|
|||
cherysuppliermrpmonth:[ |
|||
{prop:'releaseEdition',title:'需求发布版次',width:150}, |
|||
{prop:'materialCode',title:'零件号'}, |
|||
{prop:'materialDescription',title:'零件名称'}, |
|||
{prop:'plantId',title:'工厂代码'}, |
|||
{prop:'plantName',title:'工厂名称'}, |
|||
{prop:'startMonth',title:'起始年月'}, |
|||
{prop:'quantityDemand1',title:'需求数量1'}, |
|||
{prop:'quantityDemand2',title:'需求数量2'}, |
|||
{prop:'quantityDemand3',title:'需求数量3'}, |
|||
{prop:'quantityDemand4',title:'需求数量4'}, |
|||
{prop:'quantityDemand5',title:'需求数量5'}, |
|||
{prop:'quantityDemand6',title:'需求数量6'}, |
|||
{prop:'quantityDemand7',title:'需求数量7'}, |
|||
{prop:'quantityDemand8',title:'需求数量8'}, |
|||
{prop:'quantityDemand9',title:'需求数量9'}, |
|||
{prop:'quantityDemand10',title:'需求数量10',width:130}, |
|||
{prop:'quantityDemand11',title:'需求数量11',width:130}, |
|||
{prop:'quantityDemand12',title:'需求数量12',width:130}, |
|||
{prop:'isUpdate',title:'是否更新',type:'tagFilter',options:EnumList.whether}, |
|||
{prop:'createByUser',title:'创建人'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
{prop:'updateByUser',title:'修改人'}, |
|||
{prop:'updateTime',title:'修改时间',width:180}, |
|||
{prop:'isDelete',title:'是否删除',type:'tagFilter',options:EnumList.whether}, |
|||
{prop:'version',title:'版本号'}, |
|||
], |
|||
// M+6月物料需求计划风险确认
|
|||
cherysupplierconmmrp:[ |
|||
{prop:'supplierCode',title:'供应商代码',width:150,align:'left'}, |
|||
{prop:'releaseEdition',title:'需求发布版次',width:150}, |
|||
{prop:'materialCode',title:'零件号'}, |
|||
{prop:'plantId',title:'工厂代码',width:120}, |
|||
{prop:'feedbackResults',title:'反馈结果',type:'filterSelect',options:EnumList.feedbackResults,required:true}, |
|||
{prop:'ventureType',title:'风险类型',type:'filterSelect',options:EnumList.ventureType}, |
|||
{prop:'ventureSpecific',title:'具体风险',type:'input'}, |
|||
{prop:'measures',title:'应对措施',type:'input'}, |
|||
{prop:'quantityMeet1',title:'满足数量1',type:'numberInput',required:true}, |
|||
{prop:'quantityMeet2',title:'满足数量2',type:'numberInput',required:true}, |
|||
{prop:'quantityMeet3',title:'满足数量3',type:'numberInput',required:true}, |
|||
{prop:'quantityMeet4',title:'满足数量4',type:'numberInput',required:true}, |
|||
{prop:'quantityMeet5',title:'满足数量5',type:'numberInput',required:true}, |
|||
{prop:'quantityMeet6',title:'满足数量6',type:'numberInput',required:true}, |
|||
{prop:'quantityMeet7',title:'满足数量7',type:'numberInput'}, |
|||
{prop:'quantityMeet8',title:'满足数量8',type:'numberInput'}, |
|||
{prop:'quantityMeet9',title:'满足数量9',type:'numberInput'}, |
|||
{prop:'quantityMeet10',title:'满足数量10',type:'numberInput'}, |
|||
{prop:'quantityMeet11',title:'满足数量11',type:'numberInput'}, |
|||
{prop:'quantityMeet12',title:'满足数量12',type:'numberInput'}, |
|||
{prop:'startMonth',title:'起始月份'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// M+6月物料需求计划风险确认-明细
|
|||
cherysupplierconmmrpDetail:[ |
|||
{prop:'releaseEdition',title:'需求发布版次',width:150}, |
|||
{prop:'materialCode',title:'零件号'}, |
|||
{prop:'materialDescription',title:'零件名称'}, |
|||
{prop:'plantId',title:'工厂代码'}, |
|||
{prop:'plantName',title:'工厂名称'}, |
|||
{prop:'startMonth',title:'起始月份'}, |
|||
{prop:'quantityDemand1',title:'需求数量1'}, |
|||
{prop:'quantityDemand2',title:'需求数量2'}, |
|||
{prop:'quantityDemand3',title:'需求数量3'}, |
|||
{prop:'quantityDemand4',title:'需求数量4'}, |
|||
{prop:'quantityDemand5',title:'需求数量5'}, |
|||
{prop:'quantityDemand6',title:'需求数量6'}, |
|||
{prop:'quantityDemand7',title:'需求数量7'}, |
|||
{prop:'quantityDemand8',title:'需求数量8'}, |
|||
{prop:'quantityDemand9',title:'需求数量9'}, |
|||
{prop:'quantityDemand10',title:'需求数量10',width:130}, |
|||
{prop:'quantityDemand11',title:'需求数量11',width:130}, |
|||
{prop:'quantityDemand12',title:'需求数量12',width:130}, |
|||
{prop:'requestDate',title:'请求日期',width:180}, |
|||
// {prop:'remark',title:'备注',align:'left',width:300},
|
|||
{prop:'createByUser',title:'创建人'}, |
|||
{prop:'createTime',title:'创建时间',width:180}, |
|||
// {prop:'creationTime',title:'创建时间(接收)',width:180},
|
|||
{prop:'updateByUser',title:'修改人'}, |
|||
{prop:'updateTime',title:'修改时间',width:180}, |
|||
{prop:'version',title:'版本号'}, |
|||
// {prop:'isDelete',title:'是否删除',type:'tagFilter',options:EnumList.whether},
|
|||
// {prop:'isUpdate',title:'是否更新',type:'tagFilter',options:EnumList.whether},
|
|||
// {prop:'writeState',title:'writeState',type:'tagFilter',options:EnumList.whetherBoolean},
|
|||
// {prop:'readState',title:'readState',type:'tagFilter',options:EnumList.whetherBoolean},
|
|||
], |
|||
// 日物料需求计划
|
|||
cherysuppliermrpdata:[ |
|||
{prop:'releaseEdition',title:'需求发布版次',width:150}, |
|||
{prop:'materialCode',title:'零件号'}, |
|||
{prop:'materialDescription',title:'零件名称'}, |
|||
{prop:'plantId',title:'工厂代码'}, |
|||
{prop:'plantName',title:'工厂名称'}, |
|||
{prop:'startDate',title:'起始日期',width:180}, |
|||
{prop:'quantityDemand1',title:'需求数量1'}, |
|||
{prop:'quantityDemand2',title:'需求数量2'}, |
|||
{prop:'quantityDemand3',title:'需求数量3'}, |
|||
{prop:'quantityDemand4',title:'需求数量4'}, |
|||
{prop:'quantityDemand5',title:'需求数量5'}, |
|||
{prop:'quantityDemand6',title:'需求数量6'}, |
|||
{prop:'quantityDemand7',title:'需求数量7'}, |
|||
{prop:'quantityDemand8',title:'需求数量8'}, |
|||
{prop:'quantityDemand9',title:'需求数量9'}, |
|||
{prop:'quantityDemand10',title:'需求数量10',width:130}, |
|||
{prop:'quantityDemand11',title:'需求数量11',width:130}, |
|||
{prop:'quantityDemand12',title:'需求数量12',width:130}, |
|||
{prop:'quantityDemand13',title:'需求数量13',width:130}, |
|||
{prop:'quantityDemand14',title:'需求数量14',width:130}, |
|||
{prop:'quantityDemand15',title:'需求数量15',width:130}, |
|||
{prop:'quantityDemand16',title:'需求数量16',width:130}, |
|||
{prop:'quantityDemand17',title:'需求数量17',width:130}, |
|||
{prop:'quantityDemand18',title:'需求数量18',width:130}, |
|||
{prop:'quantityDemand19',title:'需求数量19',width:130}, |
|||
{prop:'quantityDemand20',title:'需求数量20',width:130}, |
|||
{prop:'quantityDemand21',title:'需求数量21',width:130}, |
|||
{prop:'quantityDemand22',title:'需求数量22',width:130}, |
|||
{prop:'quantityDemand23',title:'需求数量23',width:130}, |
|||
{prop:'quantityDemand24',title:'需求数量24',width:130}, |
|||
{prop:'quantityDemand25',title:'需求数量25',width:130}, |
|||
{prop:'quantityDemand26',title:'需求数量26',width:130}, |
|||
{prop:'quantityDemand27',title:'需求数量27',width:130}, |
|||
{prop:'quantityDemand28',title:'需求数量28',width:130}, |
|||
{prop:'quantityDemand29',title:'需求数量29',width:130}, |
|||
{prop:'quantityDemand30',title:'需求数量30',width:130}, |
|||
{prop:'quantityDemand31',title:'需求数量31',width:130}, |
|||
{prop:'is_update',title:'是否更新',type:'tagFilter',options:EnumList.whether}, |
|||
{prop:'createByUser',title:'创建人'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
{prop:'updateByUser',title:'修改人'}, |
|||
{prop:'updateTime',title:'修改时间',width:180}, |
|||
{prop:'isDelete',title:'是否删除',type:'tagFilter',options:EnumList.whether}, |
|||
{prop:'version',title:'版本号'}, |
|||
], |
|||
// 计划协议
|
|||
cherysuppliersaweek:[ |
|||
{prop:'scheduleAgreement',title:'计划协议号',width:120}, |
|||
{prop:'serialNumber',title:'行项目号'}, |
|||
{prop:'materialCode',title:'零件号'}, |
|||
{prop:'materialDescription',title:'零件名称'}, |
|||
{prop:'purchasingGroup',title:'采购组'}, |
|||
{prop:'plantId',title:'工厂代码'}, |
|||
{prop:'quantityDemand',title:'需求数量'}, |
|||
{prop:'dateReceived',title:'交货日期',width:180}, |
|||
{prop:'createByUser',title:'创建人'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
{prop:'updateByUser',title:'修改人'}, |
|||
{prop:'updateTime',title:'修改时间',width:180}, |
|||
{prop:'isDelete',title:'是否删除',type:'tagFilter',options:EnumList.whether}, |
|||
{prop:'version',title:'版本号'}, |
|||
], |
|||
// 采购订单
|
|||
cherysupplierpo:[ |
|||
{prop:'purchaseOrder',title:'采购订单号',width:120}, |
|||
{prop:'serialNumber',title:'行项目号'}, |
|||
{prop:'plantId',title:'工厂代码'}, |
|||
{prop:'plantName',title:'工厂名称',width:160}, |
|||
{prop:'voucherDate',title:'凭证日期',width:180}, |
|||
{prop:'purchaser',title:'需方联系人'}, |
|||
{prop:'supplier',title:'供方联系人'}, |
|||
{prop:'materialCode',title:'物料编码',width:180}, |
|||
{prop:'materialDescription',title:'物料描述',width:180}, |
|||
{prop:'quantityDemand',title:'需求数量'}, |
|||
{prop:'materialUnit',title:'物料单位'}, |
|||
{prop:'deliveryDate',title:'交货日期',width:180}, |
|||
{prop:'deliveryPlace',title:'交货地点'}, |
|||
{prop:'quantityDelivery',title:'到货数量'}, |
|||
{prop:'note',title:'备注',width:200}, |
|||
{prop:'itemType',title:'项目类别文本',width:150}, |
|||
{prop:'tradeTerms',title:'国际贸易条件',width:150}, |
|||
{prop:'country',title:'出口国家'}, |
|||
{prop:'batch',title:'批次'}, |
|||
{prop:'createByUser',title:'创建人'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
{prop:'updateByUser',title:'修改人'}, |
|||
{prop:'updateTime',title:'修改时间',width:180}, |
|||
{prop:'isDelete',title:'是否删除',type:'tagFilter',options:EnumList.whether}, |
|||
{prop:'version',title:'版本号'}, |
|||
], |
|||
// 采购订单风险确认
|
|||
cherysupplierconpo:[ |
|||
{prop:'supplierCode',title:'供应商代码'}, |
|||
{prop:'purchaseOrder',title:'采购订单号',type:'input',required:true,width:120}, |
|||
{prop:'serialNumber',title:'行项目号',type:'input',required:true}, |
|||
{prop:'quantityMeet',title:'满足数量',type:'numberInput',required:true}, |
|||
{prop:'feedbackResults',title:'反馈结果',type:'filterSelect',options:EnumList.feedbackResults,required:true}, |
|||
{prop:'ventureType',title:'风险类型',type:'filterSelect',options:EnumList.ventureType}, |
|||
{prop:'ventureSpecific',title:'具体风险',type:'input'}, |
|||
{prop:'measures',title:'应对措施',type:'input'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// 过焊装未过总装
|
|||
cherysupplierporhschedul:[ |
|||
{prop:'models',title:'车型'}, |
|||
{prop:'vin',title:'VIN'}, |
|||
{prop:'productionLineId',title:'产线代码'}, |
|||
{prop:'productionLineName',title:'产线名称'}, |
|||
{prop:'materialCode',title:'物料编码'}, |
|||
{prop:'materialDescription',title:'物料描述'}, |
|||
{prop:'productionType',title:'报工类型'}, |
|||
{prop:'onLineTime',title:'上线日期时间',width:180}, |
|||
{prop:'createByUser',title:'创建人'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
{prop:'updateByUser',title:'修改人'}, |
|||
{prop:'updateTime',title:'修改时间',width:180}, |
|||
{prop:'isDelete',title:'是否删除',type:'tagFilter',options:EnumList.whether}, |
|||
{prop:'version',title:'版本号'}, |
|||
], |
|||
// 过涂装未过总装
|
|||
cherysupplierprotschedul:[ |
|||
{prop:'models',title:'车型'}, |
|||
{prop:'vin',title:'VIN'}, |
|||
{prop:'productionLineId',title:'产线代码'}, |
|||
{prop:'productionLineName',title:'产线名称'}, |
|||
{prop:'materialCode',title:'物料编码'}, |
|||
{prop:'materialDescription',title:'物料描述'}, |
|||
{prop:'onLineTime',title:'上线日期时间',width:180}, |
|||
{prop:'finalWorkshop',title:'总装车间'}, |
|||
{prop:'finalOnLineTime',title:'总装上线日期时间',width:180}, |
|||
{prop:'createByUser',title:'创建人'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
{prop:'updateByUser',title:'修改人'}, |
|||
{prop:'updateTime',title:'修改时间',width:180}, |
|||
{prop:'isDelete',title:'是否删除',type:'tagFilter',options:EnumList.whether}, |
|||
{prop:'version',title:'版本号'}, |
|||
], |
|||
// 退货单
|
|||
cherysupplierreturn:[ |
|||
{prop:'returnNumber',title:'退货单号'}, |
|||
{prop:'serialNumber',title:'行项目号'}, |
|||
{prop:'serialSrate',title:'退货单状态'}, |
|||
{prop:'pickUpLocation',title:'取货地'}, |
|||
{prop:'demandPickupTime',title:'需求取货时间',width:180}, |
|||
{prop:'pickUpCrossings',title:'取货道口'}, |
|||
{prop:'feedback',title:'反馈信息'}, |
|||
{prop:'plant',title:'工厂'}, |
|||
{prop:'materialCode',title:'零件号'}, |
|||
{prop:'materialDescription',title:'零件名称'}, |
|||
{prop:'quantityDelivery',title:'数量'}, |
|||
{prop:'returnType',title:'退货类型',type:'filter',options:EnumList.returnType}, |
|||
{prop:'lotNumber',title:'批次号'}, |
|||
{prop:'judge',title:'判定人'}, |
|||
{prop:'returnReason',title:'退货原因'}, |
|||
{prop:'createByUser',title:'创建人'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
{prop:'updateByUser',title:'修改人'}, |
|||
{prop:'updateTime',title:'修改时间',width:180}, |
|||
{prop:'isDelete',title:'是否删除',type:'tagFilter',options:EnumList.whether}, |
|||
{prop:'version',title:'版本号'}, |
|||
], |
|||
// 奇瑞RDC共享库存
|
|||
supplierinvdata:[ |
|||
{prop:'plantId',title:'工厂代码'}, |
|||
{prop:'plantName',title:'工厂名称'}, |
|||
{prop:'materialCode',title:'零件号'}, |
|||
{prop:'materialDescription',title:'零件名称'}, |
|||
{prop:'quantityCurrent',title:'前库存数量'}, |
|||
{prop:'stockState',title:'库存状态'}, |
|||
{prop:'dataUpdateTime',title:'更新时间',width:180}, |
|||
{prop:'createByUser',title:'创建人'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
{prop:'updateByUser',title:'修改人'}, |
|||
{prop:'updateTime',title:'修改时间',width:180}, |
|||
{prop:'isDelete',title:'是否删除',type:'tagFilter',options:EnumList.whether}, |
|||
{prop:'version',title:'版本号'}, |
|||
], |
|||
// 供应商共享库存
|
|||
cherysuppliersinvdata:[ |
|||
{prop:'supplierCode',title:'供应商代码',required:true}, |
|||
{prop:'supplierName',title:'供应商名称',required:true}, |
|||
{prop:'serialNumber',title:'行项目号'}, |
|||
{prop:'materialCode',title:'零件号',required:true}, |
|||
{prop:'materialDescription',title:'零件名称',required:true}, |
|||
{prop:'materialType',title:'物料类型',type:'filter',options:EnumList.materialType}, |
|||
{prop:'quantityCurrent',title:'当前库存数量',type:'number',required:true}, |
|||
{prop:'quantityPlan',title:'原材料在途数量',type:'number',required:true}, |
|||
{prop:'inventoryStatus',title:'库存状态',type:'filter',options:EnumList.inventoryStatus,required:true}, |
|||
{prop:'safetyStock',title:'安全库存',type:'number',required:true}, |
|||
{prop:'productionCycle',title:'生产/采购周期',required:true}, |
|||
{prop:'dataUpdateTime',title:'库存更新时间',type:'datetime',width:180}, |
|||
{prop:'supplierBatch',title:'批次',required:true}, |
|||
{prop:'supplieryxqDate',title:'效期截止日期',type:'datetime',width:180}, |
|||
{prop:'creationTime',title:'创建时间',type:'datetime',width:180,noEdit:true}, |
|||
], |
|||
// 日MRP状态监控
|
|||
cherysuppliermrp:[ |
|||
{prop:'plantId',title:'工厂代码'}, |
|||
{prop:'plantName',title:'工厂名称'}, |
|||
{prop:'demandSrate',title:'需求状态'}, |
|||
{prop:'demandType',title:'需求类型'}, |
|||
{prop:'materialCode',title:'零件号'}, |
|||
{prop:'materialDescription',title:'零件名称'}, |
|||
{prop:'summarySign',title:'集货标识'}, |
|||
{prop:'dateRequired',title:'需求日期',width:180}, |
|||
{prop:'quantityDemand',title:'需求数量'}, |
|||
{prop:'confirmTime',title:'需求确认时间',width:180}, |
|||
{prop:'creatQuantity',title:'已建单数量'}, |
|||
{prop:'quantityDelivery',title:'已发货数量'}, |
|||
{prop:'quantityReceive',title:'已收货数量'}, |
|||
{prop:'quantityInTransit',title:'在途数量'}, |
|||
{prop:'onTimePercentage',title:'按时到货比'}, |
|||
{prop:'summaryCreatQuantity',title:'集货件已建单数量'}, |
|||
{prop:'summaryQuantityDelivery',title:'集货件已发货数量'}, |
|||
{prop:'summaryQuantityReceive',title:'集货件已收货数量'}, |
|||
{prop:'summaryQuantityInTransit',title:'集货件已在途数量'}, |
|||
{prop:'createByUser',title:'创建人'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
{prop:'updateByUser',title:'修改人'}, |
|||
{prop:'updateTime',title:'修改时间',width:180}, |
|||
{prop:'isDelete',title:'是否删除',type:'tagFilter',options:EnumList.whether}, |
|||
{prop:'version',title:'版本号'}, |
|||
], |
|||
// 日MRP预警推移
|
|||
cherysuppliermrpwarning:[ |
|||
{prop:'plantId',title:'工厂代码'}, |
|||
{prop:'materialCode',title:'零件号'}, |
|||
{prop:'materialDescription',title:'零件名称'}, |
|||
{prop:'quantityCurrent',title:'当前库存'}, |
|||
{prop:'reckonDate',title:'需求日期',width:180}, |
|||
{prop:'quantityPlanned',title:'需求数量'}, |
|||
{prop:'quantityPlannedDelivery',title:'满足数量'}, |
|||
{prop:'quantityInTransit',title:'在途数量'}, |
|||
{prop:'dateGap',title:'日GAP'}, |
|||
{prop:'inventoryGap',title:'库存GAP'}, |
|||
{prop:'inventoryGap',title:'库存GAP'}, |
|||
{prop:'createByUser',title:'创建人'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
{prop:'updateByUser',title:'修改人'}, |
|||
{prop:'updateTime',title:'修改时间',width:180}, |
|||
{prop:'isDelete',title:'是否删除',type:'tagFilter',options:EnumList.whether}, |
|||
{prop:'version',title:'版本号'}, |
|||
], |
|||
|
|||
/*生产质量 */ |
|||
// 来料检验数据
|
|||
supplierpromaterialstock:[ |
|||
{prop:'supplierCode',title:'供应商代码',required:true}, |
|||
{prop:'supplierName',title:'供应商名称',required:true}, |
|||
{prop:'supplierSubCode',title:'供应商子零件编号',width:180,required:true}, |
|||
{prop:'supplierSubName',title:'供应商子零件名称',width:180,required:true}, |
|||
{prop:'subSupplierCode',title:'分供方代码',required:true}, |
|||
{prop:'subSupplierName',title:'分供方名称',required:true}, |
|||
{prop:'subSupplierAddress',title:'分供方地址',required:true}, |
|||
{prop:'componentCode',title:'分供方子件编码'}, |
|||
{prop:'componentName',title:'分供方子件名称'}, |
|||
{prop:'subBatchNo',title:'子件批次号',required:true}, |
|||
{prop:'subBatchNum',title:'子件批次数量',type:'number',required:true}, |
|||
{prop:'subBatchSn',title:'子件SN码'}, |
|||
{prop:'empCode',title:'检验人员编号',required:true}, |
|||
{prop:'empName',title:'检验人员姓名',required:true}, |
|||
{prop:'deviceCode',title:'检测设备编号',required:true}, |
|||
{prop:'deviceName',title:'检测设备名称',required:true}, |
|||
{prop:'featureName',title:'参数/特性名称',required:true}, |
|||
{prop:'featureUnit',title:'参数/特性单位',required:true}, |
|||
{prop:'standardValue',title:'参数/特性标准值',width:180,required:true}, |
|||
{prop:'featureUpper',title:'参数/特性上限值',width:180,required:true}, |
|||
{prop:'featureLower',title:'参数/特性下限值',width:180,required:true}, |
|||
{prop:'featureValue',title:'参数/特性实测值',width:180,required:true}, |
|||
{prop:'checkNo',title:'来料检验单号',required:true}, |
|||
{prop:'checkResult',title:'批次的最终判定结果',type:'filter',options:EnumList.checkResult,width:180,required:true}, |
|||
{prop:'checkTime',title:'检验时间',type:'datetime',width:180,required:true}, |
|||
{prop:'samplingRate',title:'控制项要求频率',type:'number'}, |
|||
{prop:'limitUpdateTime',title:'上下限更新时间',type:'datetime',width:180}, |
|||
{prop:'vendorFieldDesc',title:'控制项描述'}, |
|||
{prop:'vendorFieldCode',title:'控制项代码',required:true}, |
|||
{prop:'deadLine',title:'库存有效日期',type:'datetime',width:180,required:true}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// 排产数据
|
|||
cherysupplierproscheduling:[ |
|||
{prop:'supplierCode',title:'供应商代码'}, |
|||
{prop:'supplierName',title:'供应商名称'}, |
|||
{prop:'plantId',title:'工厂代码'}, |
|||
{prop:'plantName',title:'工厂名称'}, |
|||
{prop:'vendorProductNo',title:'供应商总成零件号',width:180}, |
|||
{prop:'vendorProductName',title:'供应商总成零件名称',width:180}, |
|||
{prop:'cheryProductNo',title:'奇瑞零件号'}, |
|||
{prop:'cheryProductName',title:'奇瑞零件名称',width:180}, |
|||
{prop:'planNo',title:'计划单号'}, |
|||
{prop:'manufactureNo',title:'生产工单号'}, |
|||
{prop:'productBatchNo',title:'生产批次号'}, |
|||
{prop:'manufactureNum',title:'批次计划数量',width:160}, |
|||
{prop:'manufactureInputNum',title:'批次投入数量',width:160}, |
|||
{prop:'manufactureOutputNum',title:'批次产出数量',width:160}, |
|||
{prop:'planStatus',title:'排产状态',type:'filter',options:EnumList.planStatus}, |
|||
{prop:'planBeginTime',title:'计划开始时间',width:180}, |
|||
{prop:'planEndTime',title:'计划结束时间',width:180}, |
|||
{prop:'actualBeginTime',title:'实际开始时间',width:180}, |
|||
{prop:'actualEndTime',title:'实际结束时间',width:180}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// 供应商基础信息
|
|||
cherysupplierinfo:[ |
|||
{prop:'supplierCode',title:'供应商代码',required:true}, |
|||
{prop:'supplierName',title:'供应商名称',required:true}, |
|||
{prop:'plantId',title:'工厂代码',required:true}, |
|||
{prop:'plantName',title:'工厂名称',required:true}, |
|||
{prop:'workshopId',title:'车间代码',required:true}, |
|||
{prop:'workshopName',title:'车间名称',required:true}, |
|||
{prop:'productionLineId',title:'产线代码',required:true}, |
|||
{prop:'productionLineName',title:'产线名称',required:true}, |
|||
{prop:'stationId',title:'工位代码',required:true}, |
|||
{prop:'stationName',title:'工位名称',required:true}, |
|||
{prop:'keyStation',title:'是否关键工位',width:160,type:'tagFilter',options:EnumList.whetherByYN,required:true}, |
|||
{prop:'dataUpdateTime',title:'供应商修改时间',width:180,type:'datetime',required:true}, |
|||
{prop:'productionLineOrder',title:'产线顺序',type:'number',required:true}, |
|||
{prop:'stationOrder',title:'工位顺序',type:'number',required:true}, |
|||
{prop:'vendorProductNo',title:'供应商总成零件号',width:180,required:true}, |
|||
{prop:'vendorProductName',title:'供应商总成零件名称',width:180,required:true}, |
|||
{prop:'cheryProductNo',title:'奇瑞零件号',required:true}, |
|||
{prop:'cheryProductName',title:'奇瑞零件名称',width:180,required:true}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// 人员资质信息
|
|||
cherysupplieremployee:[ |
|||
{prop:'supplierCode',title:'供应商代码',required:true}, |
|||
{prop:'supplierName',title:'供应商名称',required:true}, |
|||
{prop:'plantId',title:'工厂代码',required:true}, |
|||
{prop:'plantName',title:'工厂名称',required:true}, |
|||
{prop:'workshopId',title:'车间代码',required:true}, |
|||
{prop:'workshopName',title:'车间名称',required:true}, |
|||
{prop:'productionLineId',title:'产线代码',required:true}, |
|||
{prop:'productionLineName',title:'产线名称',required:true}, |
|||
{prop:'stationId',title:'工位代码',required:true}, |
|||
{prop:'stationName',title:'工位名称',required:true}, |
|||
{prop:'operatorId',title:'工位人员账号',width:160,required:true}, |
|||
{prop:'operatorName',title:'工位人员姓名',width:160,required:true}, |
|||
{prop:'haveQuantity',title:'是否有资质',width:160,type:'tagFilter',options:EnumList.whetherByYN,required:true}, |
|||
{prop:'dataUpdateTime',title:'供应商修改时间',width:180,type:'datetime',required:true}, |
|||
{prop:'positionId',title:'岗位代码',required:true}, |
|||
{prop:'positionName',title:'岗位名称',required:true}, |
|||
{prop:'qualificationLevel',title:'资质等级',required:true}, |
|||
{prop:'checkInTime',title:'资质获取时间',width:180,type:'datetime',required:true}, |
|||
{prop:'checkOutTime',title:'资质失去时间',width:180,type:'datetime',required:true}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// BOM主数据
|
|||
cherysupplierbom:[ |
|||
{prop:'supplierCode',title:'供应商代码'}, |
|||
{prop:'supplierName',title:'供应商名称'}, |
|||
{prop:'bomCode',title:'BOM编码'}, |
|||
{prop:'bomName',title:'BOM名称'}, |
|||
{prop:'bomVersion',title:'BOM版本'}, |
|||
{prop:'cheryProductNo',title:'奇瑞零件号'}, |
|||
{prop:'cheryProductName',title:'奇瑞零件名称',width:180}, |
|||
{prop:'vendorProductNo',title:'供应商父件编码',width:180}, |
|||
{prop:'vendorProductName',title:'供应商父件名称',width:180}, |
|||
{prop:'vendorProductType',title:'父件类型',type:'filter',options:EnumList.vendorProductType}, |
|||
{prop:'materialUnit',title:'父件单位'}, |
|||
{prop:'subMaterialCode',title:'子件编码'}, |
|||
{prop:'subMaterialName',title:'子件名称'}, |
|||
{prop:'subMaterialType',title:'子件类型',type:'filter',options:EnumList.subMaterialType}, |
|||
{prop:'subMaterialUnit',title:'子件单位'}, |
|||
{prop:'subMaterialQuota',title:'子件用量',type:'number'}, |
|||
{prop:'dataUpdateTime',title:'BOM变更时间',width:180,type:'datetime'}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// 过程控制项质量数据
|
|||
cherysupplierprocps:[ |
|||
{prop:'supplierCode',title:'供应商代码',required:true}, |
|||
{prop:'supplierName',title:'供应商名称',required:true}, |
|||
{prop:'vendorProductNo',title:'供应商总成零件号',width:180,required:true}, |
|||
{prop:'vendorProductName',title:'供应商总成零件名称',width:180,required:true}, |
|||
{prop:'vendorProductSn',title:'供应商总成SN码',width:180,required:true}, |
|||
{prop:'vendorProductBatch',title:'供应商总成批次号',width:180,required:true}, |
|||
{prop:'cheryProductNo',title:'奇瑞零件号',required:true}, |
|||
{prop:'cheryProductName',title:'奇瑞零件名称',width:180,required:true}, |
|||
{prop:'cheryProductSn',title:'奇瑞SN码',required:true}, |
|||
{prop:'productBatchNo',title:'生产批次号',required:true}, |
|||
{prop:'manufactureNo',title:'生产工单号',required:true}, |
|||
{prop:'plantId',title:'工厂代码',required:true}, |
|||
{prop:'plantName',title:'工厂名称',required:true}, |
|||
{prop:'workshopId',title:'车间代码',required:true}, |
|||
{prop:'workshopName',title:'车间名称',required:true}, |
|||
{prop:'productionLineId',title:'产线代码',required:true}, |
|||
{prop:'productionLineName',title:'产线名称',required:true}, |
|||
{prop:'stationId',title:'工位代码',required:true}, |
|||
{prop:'stationName',title:'工位名称',required:true}, |
|||
{prop:'empCode',title:'工位人员编号',required:true}, |
|||
{prop:'empName',title:'工位人员姓名',required:true}, |
|||
{prop:'vendorFieldName',title:'控制项名称',required:true}, |
|||
{prop:'vendorFieldCode',title:'控制项代码',required:true}, |
|||
{prop:'gatherSpot',title:'控制项点位'}, |
|||
{prop:'samplingRate',title:'控制项要求频率',type:'number'}, |
|||
{prop:'limitUpdateTime',title:'上下限更新时间',type:'datetime',width:180}, |
|||
{prop:'vendorFieldDesc',title:'控制项描述'}, |
|||
{prop:'carrierCode',title:'载体编码'}, |
|||
{prop:'intputQty',title:'投入数量',type:'number',required:true}, |
|||
{prop:'fttQty',title:'一次合格数量',type:'number',required:true}, |
|||
{prop:'parameter',title:'参数',width:160,type:'tagFilter',options:EnumList.whetherByYN,required:true}, |
|||
{prop:'characteristic',title:'特性',width:160,type:'tagFilter',options:EnumList.whetherByYN,required:true}, |
|||
{prop:'cc',title:'cc项',width:160,type:'tagFilter',options:EnumList.whetherByYN,required:true}, |
|||
{prop:'sc',title:'sc项',width:160,type:'tagFilter',options:EnumList.whetherByYN,required:true}, |
|||
{prop:'spc',title:'SPC',width:160,type:'tagFilter',options:EnumList.whetherByYN,required:true}, |
|||
{prop:'standardValue',title:'控制项标准值',width:150,required:true}, |
|||
{prop:'upperLimit',title:'控制项上限',type:'number',required:true}, |
|||
{prop:'lowerLimit',title:'控制项下限',type:'number',required:true}, |
|||
{prop:'decimalValue',title:'控制项实测值',type:'number',required:true}, |
|||
{prop:'unitCn',title:'控制项值的单位名称',width:180}, |
|||
{prop:'unitEn',title:'控制项单位英文',width:180,required:true}, |
|||
{prop:'checkResult',title:'检测结果',required:true}, |
|||
{prop:'detectionMode',title:'在线检测',type:'filter',options:EnumList.detectionMode}, |
|||
{prop:'workShift',title:'班次',type:'filter',options:EnumList.workShift,required:true}, |
|||
{prop:'collectTime',title:'采集时间',type:'datetime',width:180,required:true}, |
|||
{prop:'checkMode',title:'检测方式',type:'filter',options:EnumList.checkMode,required:true}, |
|||
{prop:'deviceCode',title:'检测设备编号',required:true}, |
|||
{prop:'deviceName',title:'检测设备名称',required:true}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// 生产过程数据
|
|||
cherysupplierprodata:[ |
|||
{prop:'supplierCode',title:'供应商代码',required:true}, |
|||
{prop:'supplierName',title:'供应商名称',required:true}, |
|||
{prop:'plantId',title:'工厂代码',required:true}, |
|||
{prop:'plantName',title:'工厂名称',required:true}, |
|||
{prop:'workshopId',title:'车间代码',required:true}, |
|||
{prop:'workshopName',title:'车间名称',required:true}, |
|||
{prop:'productionLineId',title:'产线代码',required:true}, |
|||
{prop:'productionLineName',title:'产线名称',required:true}, |
|||
{prop:'stationId',title:'工位代码',required:true}, |
|||
{prop:'stationName',title:'工位名称',required:true}, |
|||
{prop:'empCode',title:'工位人员编号',width:160,required:true}, |
|||
{prop:'empName',title:'工位人员姓名',width:160,required:true}, |
|||
{prop:'vendorProductName',title:'供应商总成零件名称',width:180,required:true}, |
|||
{prop:'vendorProductNo',title:'供应商总成零件号',width:180,required:true}, |
|||
{prop:'vendorProductBatch',title:'供应商总成批次号',width:180,required:true}, |
|||
{prop:'vendorProductSn',title:'供应商总成SN码',width:180,required:true}, |
|||
{prop:'subProdNo',title:'子件编码',required:true}, |
|||
{prop:'subProdName',title:'子件名称',required:true}, |
|||
{prop:'subBatchNo',title:'子件批次号',required:true}, |
|||
{prop:'childPackageInfo',title:'子件分包号'}, |
|||
{prop:'subProdNum',title:'子件扣料数量',type:'number',width:160,required:true}, |
|||
{prop:'subProdSn',title:'子件SN码',width:160,required:true}, |
|||
{prop:'childSource',title:'子件物料来源',width:160,required:true}, |
|||
{prop:'subSupplierCode',title:'分供方代码'}, |
|||
{prop:'subSupplierName',title:'分供方名称'}, |
|||
{prop:'cheryProductNo',title:'奇瑞零件号',required:true}, |
|||
{prop:'cheryProductName',title:'奇瑞零件名称',width:180,required:true}, |
|||
{prop:'cheryProductSn',title:'奇瑞SN码',required:true}, |
|||
{prop:'manufactureNo',title:'生产工单号',required:true}, |
|||
{prop:'productBatchNo',title:'生产批次号'}, |
|||
{prop:'workShift',title:'班次',type:'filter',options:EnumList.workShift,required:true}, |
|||
{prop:'materialInputTime',title:'进工位的时间',type:'datetime',width:180,required:true}, |
|||
{prop:'materialOutputTime',title:'出工位的时间',type:'datetime',width:180,required:true}, |
|||
{prop:'vendorFieldNum',title:'装配设备编号',width:160,required:true}, |
|||
{prop:'vendorFieldName',title:'装配设备名称',width:160,required:true}, |
|||
{prop:'instrumentQualityStatus',title:'设备判定的质量状态',type:'filter',options:EnumList.checkResult,width:180}, |
|||
{prop:'manualQualityStatus',title:'人工判定的质量状态',type:'filter',options:EnumList.checkResult,width:180}, |
|||
{prop:'finalQualityStatus',title:'最终质量状态',type:'filter',options:EnumList.checkResult,width:180,required:true}, |
|||
{prop:'collectTime',title:'采集时间',type:'datetime',width:180,required:true}, |
|||
{prop:'dateTime',title:'子件绑定扫码时间',type:'datetime',width:180,required:true}, |
|||
{prop:'parentHardwareRevision',title:'父件硬件版本号',width:180}, |
|||
{prop:'parentSoftwareRevision',title:'父件软件版本号',width:180}, |
|||
{prop:'childHardwareRevision',title:'子件硬件版本号',width:180}, |
|||
{prop:'childSoftwareRevision',title:'子件软件版本号',width:180}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// 产品一次合格率
|
|||
cherysupplierprofirstpassyield:[ |
|||
{prop:'supplierCode',title:'供应商代码',required:true}, |
|||
{prop:'supplierName',title:'供应商名称',required:true}, |
|||
{prop:'vendorProductNo',title:'供应商总成零件号',width:180,required:true}, |
|||
{prop:'vendorProductName',title:'供应商总成零件名称',width:180,required:true}, |
|||
{prop:'plantId',title:'工厂代码',required:true}, |
|||
{prop:'plantName',title:'工厂名称',required:true}, |
|||
{prop:'workshopId',title:'车间代码',required:true}, |
|||
{prop:'workshopName',title:'车间名称',required:true}, |
|||
{prop:'productionLineId',title:'产线代码',required:true}, |
|||
{prop:'productionLineName',title:'产线名称',required:true}, |
|||
{prop:'cheryProductNo',title:'奇瑞零件号',required:true}, |
|||
{prop:'cheryProductName',title:'奇瑞零件名称',width:180,required:true}, |
|||
{prop:'manufactureNo',title:'生产工单号',required:true}, |
|||
{prop:'productBatchNo',title:'生产批次号',required:true}, |
|||
{prop:'workOrderNumber',title:'批次计划数量',type:'number',width:160,required:true}, |
|||
{prop:'defectiveNumber',title:'不合格数',type:'number',width:160,required:true}, |
|||
{prop:'acceptableNumber',title:'合格数',type:'number',width:160,required:true}, |
|||
{prop:'oncePassRateRealValue',title:'一次合格率实际值',type:'number',width:180,required:true}, |
|||
{prop:'oncePassRateTagValue',title:'一次合格率目标值',type:'number',width:180,required:true}, |
|||
{prop:'workShift',title:'班次',type:'filter',options:EnumList.workShift,required:true}, |
|||
{prop:'statisticalTime',title:'生产日期',width:180,type:'datetime',required:true}, |
|||
{prop:'dateTime',title:'值统计时间',width:180,type:'datetime',required:true}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// 工位一次合格率
|
|||
cherysupplierprostationfirstpassyield:[ |
|||
{prop:'supplierCode',title:'供应商代码',required:true}, |
|||
{prop:'supplierName',title:'供应商名称',required:true}, |
|||
{prop:'plantId',title:'工厂代码',required:true}, |
|||
{prop:'plantName',title:'工厂名称',required:true}, |
|||
{prop:'workshopId',title:'车间代码',required:true}, |
|||
{prop:'workshopName',title:'车间名称',required:true}, |
|||
{prop:'productionLineId',title:'产线代码',required:true}, |
|||
{prop:'productionLineName',title:'产线名称',required:true}, |
|||
{prop:'stationId',title:'工位代码',required:true}, |
|||
{prop:'stationName',title:'工位名称',required:true}, |
|||
{prop:'cheryProductNo',title:'奇瑞零件号',required:true}, |
|||
{prop:'cheryProductName',title:'奇瑞零件名称',width:180,required:true}, |
|||
{prop:'vendorProductNo',title:'供应商总成零件号',width:180,required:true}, |
|||
{prop:'vendorProductName',title:'供应商总成零件名称',width:180,required:true}, |
|||
{prop:'productBatchNo',title:'生产批次号',required:true}, |
|||
{prop:'manufactureNo',title:'生产工单号',required:true}, |
|||
{prop:'workOrderNumber',title:'批次计划数量',type:'number',width:160,required:true}, |
|||
{prop:'defectiveNumber',title:'不合格数',type:'number',width:160,required:true}, |
|||
{prop:'acceptableNumber',title:'合格数',type:'number',width:160,required:true}, |
|||
{prop:'oncePassRateRealValue',title:'一次合格率实际值',type:'number',width:180,required:true}, |
|||
{prop:'oncePassRateTagValue',title:'一次合格率目标值',type:'number',width:180,required:true}, |
|||
{prop:'workShift',title:'班次',type:'filter',options:EnumList.workShift,required:true}, |
|||
{prop:'statisticalTime',title:'生产日期',width:180,type:'datetime',required:true}, |
|||
{prop:'dateTime',title:'值统计时间',width:180,type:'datetime',required:true}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// 缺陷业务数据
|
|||
cherysupplierproflaw:[ |
|||
{prop:'supplierCode',title:'供应商代码',required:true}, |
|||
{prop:'supplierName',title:'供应商名称',required:true}, |
|||
{prop:'plantId',title:'工厂代码',required:true}, |
|||
{prop:'plantName',title:'工厂名称',required:true}, |
|||
{prop:'workshopId',title:'车间代码',required:true}, |
|||
{prop:'workshopName',title:'车间名称',required:true}, |
|||
{prop:'productionLineId',title:'产线代码',required:true}, |
|||
{prop:'productionLineName',title:'产线名称',required:true}, |
|||
{prop:'stationId',title:'工位代码',required:true}, |
|||
{prop:'stationName',title:'工位名称',required:true}, |
|||
{prop:'defectsCode',title:'缺陷代码',required:true}, |
|||
{prop:'defectsName',title:'缺陷名称',required:true}, |
|||
{prop:'classOfName',title:'缺陷分类',type:'filter',options:EnumList.defectsClass,required:true}, |
|||
{prop:'vendorProductNo',title:'供应商总成零件号',width:180,required:true}, |
|||
{prop:'vendorProductName',title:'供应商总成零件名称',width:180,required:true}, |
|||
{prop:'vendorProductBatch',title:'供应商总成批次号',width:180,required:true}, |
|||
{prop:'vendorProductSn',title:'供应商总成SN码',width:180,required:true}, |
|||
{prop:'cheryProductNo',title:'奇瑞零件号',required:true}, |
|||
{prop:'cheryProductName',title:'奇瑞零件名称',width:180,required:true}, |
|||
{prop:'cheryProductSn',title:'奇瑞SN码',required:true}, |
|||
{prop:'productBatchNo',title:'生产批次号',required:true}, |
|||
{prop:'manufactureNo',title:'生产工单号',required:true}, |
|||
{prop:'workShift',title:'班次',type:'filter',options:EnumList.workShift,required:true}, |
|||
{prop:'numberofdefect',title:'缺陷件数',type:'number',required:true}, |
|||
{prop:'defectsDesc',title:'缺陷描述',required:true}, |
|||
{prop:'defectsLevel',title:'缺陷等级',type:'filter',options:EnumList.defectsLevel,required:true}, |
|||
{prop:'statisticalTime',title:'缺陷录入时间',width:180,type:'datetime',required:true}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// 物料主数据
|
|||
cherysupplierpromaterialdata:[ |
|||
{prop:'supplierCode',title:'供应商代码'}, |
|||
{prop:'supplierName',title:'供应商名称'}, |
|||
{prop:'vendorProductNo',title:'供应商物料号'}, |
|||
{prop:'vendorProductName',title:'供应商物料名称',width:180}, |
|||
{prop:'type',title:'类型',type:'filter',options:EnumList.materialType}, |
|||
{prop:'vendorHardwareRevision',title:'供应商零件版本号',width:180}, |
|||
{prop:'cheryProductNo',title:'奇瑞零件号'}, |
|||
{prop:'cheryProductName',title:'奇瑞零件名称',width:180}, |
|||
{prop:'oemHardwareRevision',title:'奇瑞硬件版本号',width:180}, |
|||
{prop:'oemSoftwareRevision',title:'奇瑞软件版本号',width:180}, |
|||
{prop:'oemModel',title:'车型'}, |
|||
{prop:'oemProjectName',title:'项目名称'}, |
|||
{prop:'launched',title:'是否SOP',width:160,type:'tagFilter',options:EnumList.whetherByYN}, |
|||
{prop:'dateTime',title:'数据同步执行时间',width:180,type:'datetime'}, |
|||
{prop:'plantId',title:'供应商工厂代码',width:180}, |
|||
{prop:'plantName',title:'供应商工厂名称',width:180}, |
|||
{prop:'procurementType',title:'芯片采购类型',width:160}, |
|||
{prop:'mpnCode',title:'芯片MPN标识码',width:180}, |
|||
{prop:'mpnName',title:'芯片MPN标识名称',width:180}, |
|||
{prop:'validDays',title:'物料有效期(天)',width:180}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// 附件类数据
|
|||
cherysupplierproattachmentdata:[ |
|||
{prop:'supplierCode',title:'供应商代码',required:true}, |
|||
{prop:'supplierName',title:'供应商名称',required:true}, |
|||
{prop:'type',title:'数据类型',type:'filter',options:EnumList.attachmentType,required:true}, |
|||
{prop:'fileName',title:'文件名',required:true}, |
|||
{prop:'fileUrl',title:'图文地址',width:null,required:true}, |
|||
{prop:'dateTime',title:'生成时间',type:'datetime',width:180,required:true}, |
|||
{prop:'productionLineName',title:'产线名称',required:true}, |
|||
{prop:'productionLineId',title:'产线代码',required:true}, |
|||
{prop:'stationName',title:'工位名称',required:true}, |
|||
{prop:'stationId',title:'工位代码',required:true}, |
|||
{prop:'deviceName',title:'设备名称',required:true}, |
|||
{prop:'deviceId',title:'设备代码',required:true}, |
|||
{prop:'vendorProductNo',title:'供应商总成零件号',width:180,required:true}, |
|||
{prop:'vendorProductName',title:'供应商总成零件名称',width:180,required:true}, |
|||
{prop:'cheryProductNo',title:'奇瑞零件号',required:true}, |
|||
{prop:'cheryProductName',title:'奇瑞零件名称',width:180,required:true}, |
|||
{prop:'vendorProductSn',title:'供应商总成SN码',width:180}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// 工艺装备
|
|||
cherysupplierproprocessequipment:[ |
|||
{prop:'supplierCode',title:'供应商代码',required:true}, |
|||
{prop:'supplierName',title:'供应商名称',required:true}, |
|||
{prop:'cheryProductNo',title:'奇瑞零件号',required:true}, |
|||
{prop:'cheryProductName',title:'奇瑞零件名称',width:180,required:true}, |
|||
{prop:'vendorProductNo',title:'供应商总成零件号',width:180,required:true}, |
|||
{prop:'vendorProductName',title:'供应商总成零件名称',width:180,required:true}, |
|||
{prop:'deviceType',title:'工艺装备类型分类',type:'filter',width:180,options:EnumList.deviceType,required:true}, |
|||
{prop:'deviceCode',title:'工艺装备编码',required:true}, |
|||
{prop:'deviceName',title:'工艺装备名称',required:true}, |
|||
{prop:'manufacturer',title:'生产厂家',required:true}, |
|||
{prop:'modelNumber',title:'工艺装备型号',required:true}, |
|||
{prop:'serialNumber',title:'工艺装备序列号',width:180,required:true}, |
|||
{prop:'productionDate',title:'工艺装备制造日期',width:180,type:'datetime',required:true}, |
|||
{prop:'material',title:'主要材质',required:true}, |
|||
{prop:'currentLocation',title:'当前存放地点',required:true}, |
|||
{prop:'deviceStatus',title:'工艺装备状态',required:true}, |
|||
{prop:'cavityCount',title:'穴腔数量',type:'number',required:true}, |
|||
{prop:'moldSize',title:'模具尺寸规格',required:true}, |
|||
{prop:'designLifeUnits',title:'设计寿命单位',required:true}, |
|||
{prop:'designLifeValue',title:'设计寿命',required:true}, |
|||
{prop:'currentUsageCount',title:'当前剩余寿命',width:180,required:true}, |
|||
{prop:'overhaulCount',title:'模具大修次数',type:'number',width:160,required:true}, |
|||
{prop:'coolingChannelLayout',title:'图纸编号描述',required:true}, |
|||
{prop:'detectionAccuracy',title:'检测精度',required:true}, |
|||
{prop:'calibrationDate',title:'最近校准日期',width:180,type:'datetime',required:true}, |
|||
{prop:'calibrationDueDays',title:'校准到期天数',required:true}, |
|||
{prop:'toleranceRange',title:'允许误差范围',required:true}, |
|||
{prop:'wearThreshold',title:'磨损阈值',required:true}, |
|||
{prop:'detectionRange',title:'检测范围',required:true}, |
|||
{prop:'unitType',title:'检测单位',required:true}, |
|||
{prop:'creationTime',title:'创建时间',width:180}, |
|||
], |
|||
// 工艺
|
|||
cherysupplierproprocess:[ |
|||
{prop:'cheryProductNo',title:'奇瑞零件号'}, |
|||
{prop:'cheryProductName',title:'奇瑞零件名称',width:180}, |
|||
{prop:'vendorProductNo',title:'供应商总成零件号',width:180}, |
|||
{prop:'vendorProductName',title:'供应商总成零件名称',width:180}, |
|||
{prop:'supplierCode',title:'供应商代码'}, |
|||
{prop:'supplierName',title:'供应商名称'}, |
|||
{prop:'techCode',title:'工艺编码'}, |
|||
{prop:'techName',title:'工艺名称'}, |
|||
{prop:'validPeriod',title:'有效期',width:180,type:'datetime'}, |
|||
{prop:'techVersion',title:'工艺版本'}, |
|||
{prop:'moldCode',title:'模具编码'}, |
|||
{prop:'moldName',title:'模具名称'}, |
|||
{prop:'maxProcessingCapacity',title:'最大加工能力'}, |
|||
{prop:'processCode',title:'工序编码'}, |
|||
{prop:'processName',title:'工序名称'}, |
|||
{prop:'processOrder',title:'工序顺序号',type:'number'}, |
|||
{prop:'deviceCode',title:'设备编码'}, |
|||
{prop:'rhythm',title:'工序节拍',type:'number'}, |
|||
{prop:'rhythmUnit',title:'节拍单位'}, |
|||
], |
|||
|
|||
|
|||
/*无页面,供任务明细页面使用 */ |
|||
// 环境业务数据
|
|||
cherysupplierproenvironment:[ |
|||
{prop:'supplierCode',title:'供应商代码'}, |
|||
{prop:'supplierName',title:'供应商名称'}, |
|||
{prop:'plantId',title:'工厂代码'}, |
|||
{prop:'plantName',title:'工厂名称'}, |
|||
{prop:'workshopId',title:'车间代码'}, |
|||
{prop:'workshopName',title:'车间名称'}, |
|||
{prop:'productionLineId',title:'产线代码'}, |
|||
{prop:'productionLineName',title:'产线名称'}, |
|||
{prop:'envIndicatorName',title:'环境指标名称',width:160}, |
|||
{prop:'numValue',title:'指标实测值',width:160}, |
|||
{prop:'upperLimit',title:'上限值'}, |
|||
{prop:'lowerLimit',title:'下限值'}, |
|||
{prop:'chineseUnit',title:'单位'}, |
|||
{prop:'equipmentCode',title:'采集仪器代码',width:160}, |
|||
{prop:'equipmentName',title:'采集仪器名称',width:160}, |
|||
{prop:'dataCollectionPoint',title:'数据采集的点位',width:160}, |
|||
{prop:'collectTime',title:'数据采集的时间',width:180}, |
|||
], |
|||
// 设备OEE达成率
|
|||
cherysupplierprooeeachievementrate:[ |
|||
{prop:'supplierCode',title:'供应商代码'}, |
|||
{prop:'supplierName',title:'供应商名称'}, |
|||
{prop:'plantId',title:'工厂代码'}, |
|||
{prop:'plantName',title:'工厂名称'}, |
|||
{prop:'workshopId',title:'车间代码'}, |
|||
{prop:'workshopName',title:'车间名称'}, |
|||
{prop:'productionLineId',title:'产线代码'}, |
|||
{prop:'productionLineName',title:'产线名称'}, |
|||
{prop:'stationId',title:'工位代码'}, |
|||
{prop:'stationName',title:'工位名称'}, |
|||
{prop:'deviceId',title:'设备代码'}, |
|||
{prop:'deviceName',title:'设备名称'}, |
|||
{prop:'cheryProductNo',title:'奇瑞零件号'}, |
|||
{prop:'cheryProductName',title:'奇瑞零件名称',width:180}, |
|||
{prop:'vendorProductNo',title:'供应商总成零件号',width:180}, |
|||
{prop:'vendorProductName',title:'供应商总成零件名称',width:180}, |
|||
{prop:'productBatchNo',title:'生产批次号'}, |
|||
{prop:'manufactureNo',title:'生产工单号'}, |
|||
{prop:'rate',title:'OEE实际值'}, |
|||
{prop:'rateTagValue',title:'OEE目标值'}, |
|||
{prop:'workShift',title:'班次'}, |
|||
{prop:'statisticalTime',title:'生产日期',width:180}, |
|||
{prop:'dateTime',title:'值统计时间',width:180}, |
|||
], |
|||
// OEE时间明细
|
|||
cherysupplierprooeetimedetails:[ |
|||
{prop:'supplierCode',title:'供应商代码'}, |
|||
{prop:'supplierName',title:'供应商名称'}, |
|||
{prop:'plantId',title:'工厂代码'}, |
|||
{prop:'plantName',title:'工厂名称'}, |
|||
{prop:'workshopId',title:'车间代码'}, |
|||
{prop:'workshopName',title:'车间名称'}, |
|||
{prop:'productionLineId',title:'产线代码'}, |
|||
{prop:'productionLineName',title:'产线名称'}, |
|||
{prop:'stationId',title:'工位代码'}, |
|||
{prop:'stationName',title:'工位名称'}, |
|||
{prop:'deviceId',title:'设备代码'}, |
|||
{prop:'deviceName',title:'设备名称'}, |
|||
{prop:'recId',title:'记录ID'}, |
|||
{prop:'type',title:'大类',type:'filter',options:EnumList.OEETimeType}, |
|||
{prop:'subType',title:'小类编码'}, |
|||
{prop:'subTypeName',title:'小类描述'}, |
|||
{prop:'startTime',title:'开始时间',width:180}, |
|||
{prop:'endTime',title:'结束时间',width:180}, |
|||
], |
|||
} |
|||
|
|||
export default apiTableColumns |
@ -0,0 +1,125 @@ |
|||
const EnumList = { |
|||
// 是否
|
|||
whether:[ |
|||
{label:'是',value:1,type:'success'}, |
|||
{label:'否',value:0,type:'danger'} |
|||
], |
|||
// 是否Y/N
|
|||
whetherByYN:[ |
|||
{label:'是',value:'Y',type:'success'}, |
|||
{label:'否',value:'N',type:'danger'}, |
|||
], |
|||
// 是否boolean
|
|||
whetherBoolean:[ |
|||
{label:'是',value:true,type:'success'}, |
|||
{label:'否',value:false,type:'danger'} |
|||
], |
|||
// 退货类型
|
|||
returnType:[ |
|||
{label:'合格品',value:1}, |
|||
{label:'不合格品',value:0} |
|||
], |
|||
// 物料类型
|
|||
materialType:[ |
|||
{label:'成品',value:'成品'}, |
|||
{label:'半成品',value:'半成品'}, |
|||
{label:'原材料',value:'原材料'}, |
|||
], |
|||
// 父件(供应商总成)类型
|
|||
vendorProductType:[ |
|||
{label:'成品',value:'成品'}, |
|||
{label:'半成品',value:'半成品'}, |
|||
], |
|||
// 子件类型
|
|||
subMaterialType:[ |
|||
{label:'半成品',value:'半成品'}, |
|||
{label:'原材料',value:'原材料'}, |
|||
], |
|||
// 库存状态
|
|||
inventoryStatus:[ |
|||
{label:'生产件',value:'生产件'}, |
|||
{label:'呆滞件',value:'呆滞件'}, |
|||
{label:'备件',value:'备件'}, |
|||
{label:'KD件',value:'KD件'}, |
|||
], |
|||
// 反馈结果
|
|||
feedbackResults:[ |
|||
{label:'异常',value:'1'}, |
|||
{label:'无异常',value:'0'}, |
|||
], |
|||
// 风险类型
|
|||
ventureType:[ |
|||
{label:'生产节拍不足',value:'1'}, |
|||
{label:'人员不足',value:'2'}, |
|||
{label:'原材料不足',value:'3'}, |
|||
{label:'设备异常',value:'4'}, |
|||
{label:'其他',value:'5'}, |
|||
], |
|||
// 批次的最终判定结果
|
|||
checkResult:[ |
|||
{label:'合格',value:'OK'}, |
|||
{label:'不合格',value:'NG'}, |
|||
], |
|||
// 排产状态
|
|||
planStatus:[ |
|||
{label:'未生产',value:'0'}, |
|||
{label:'生产中',value:'1'}, |
|||
{label:'已完工',value:'2'}, |
|||
{label:'已取消',value:'3'}, |
|||
{label:'已终止',value:'4'}, |
|||
], |
|||
// 在线检测
|
|||
detectionMode:[ |
|||
{label:'在生产线上进行检测',value:'inline'}, |
|||
{label:'从生产线上拿下来进行检测',value:'offline'}, |
|||
{label:'同时存在',value:'both'}, |
|||
], |
|||
// 班次
|
|||
workShift:[ |
|||
{label:'白班',value:'白班'}, |
|||
{label:'晚班',value:'晚班'}, |
|||
{label:'中班',value:'中班'}, |
|||
], |
|||
// 检测方式
|
|||
checkMode:[ |
|||
{label:'人工',value:'人工'}, |
|||
{label:'设备',value:'设备'}, |
|||
], |
|||
// 缺陷分类
|
|||
defectsClass:[ |
|||
{label:'外观',value:'外观'}, |
|||
{label:'尺寸',value:'尺寸'}, |
|||
{label:'材料',value:'材料'}, |
|||
{label:'功能',value:'功能'}, |
|||
{label:'性能',value:'性能'}, |
|||
{label:'其他',value:'其他'}, |
|||
], |
|||
// 缺陷等级
|
|||
defectsLevel:[ |
|||
{label:'严重',value:'1'}, |
|||
{label:'一般',value:'2'}, |
|||
{label:'轻微',value:'3'}, |
|||
], |
|||
// 附件数据类型
|
|||
attachmentType:[ |
|||
{label:'产前管理',value:'1'}, |
|||
{label:'人员资质',value:'2'}, |
|||
{label:'监控视频',value:'3'}, |
|||
], |
|||
// 工艺装备类型分类
|
|||
deviceType:[ |
|||
{label:'模具',value:'1'}, |
|||
{label:'检具',value:'2'}, |
|||
{label:'夹具',value:'3'}, |
|||
], |
|||
|
|||
|
|||
// OEE时间明细-大类(供任务明细页面使用)
|
|||
OEETimeType:[ |
|||
{label:'计划工作',value:'1'}, |
|||
{label:'计划停机',value:'2'}, |
|||
{label:'非计划停机',value:'3'}, |
|||
], |
|||
} |
|||
|
|||
export default EnumList |
@ -0,0 +1,11 @@ |
|||
// filter中空字符转义
|
|||
export function getPageParamsForFilter(pageParams){ |
|||
if(pageParams.filters && JSON.stringify(pageParams.filters) != "{}"){ |
|||
for(let i in pageParams.filters){ |
|||
if(pageParams.filters[i] == ""){ |
|||
pageParams.filters[i] = null |
|||
} |
|||
} |
|||
} |
|||
return pageParams |
|||
} |
@ -0,0 +1,63 @@ |
|||
<template> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// tablePage 使用demo |
|||
defineOptions({ name: 'tablePageDemo' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'tablePageDemo', |
|||
searchFilter: { |
|||
materialCode: null, |
|||
// createTime:null, |
|||
// isDelete:null, |
|||
// quantity1:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'materialCode',label:'物料号'}, |
|||
// {type:'datetimerange',prop:'createTime',label:'创建时间'}, |
|||
// {type:'number',prop:'quantity1',label:'数量1'}, |
|||
// {type:'select',prop:'isDelete',label:'是否删除',options:EnumList.whether,noSearch:true}, |
|||
], |
|||
|
|||
// 左侧操作列,可参考 view/task/taskConifgure.vue 的查看明细 |
|||
// leftOperation:[ |
|||
// {label:'查看详情',name:'showInfo',link:true,type:'primary'} |
|||
// ], |
|||
|
|||
// 右侧操作列方式1,默认为api通用方式 |
|||
// rightOperation:'apiUpdate,apiDelete', |
|||
//右侧操作列方式2,自定义方式,如果需要默认的api,则使用showApiRightOperation传参 |
|||
// rightOperation:[], |
|||
// showApiRightOperation:['apiUpdate'] |
|||
// 新增/编辑特殊rule |
|||
// apiEditFormRules:{ |
|||
// supplierCode: [{ required: true, message: '必填项', trigger: 'blur' }], |
|||
// supplierName: [{ required: true, message: '必填项', trigger: 'blur' }], |
|||
// deadLine: [{ required: true, message: '必填项', trigger: 'blur' }], |
|||
// } |
|||
}) |
|||
|
|||
// 左侧操作事件 |
|||
// function leftOperationHadel(btn,scope) { |
|||
// console.log(btn,scope) |
|||
// } |
|||
|
|||
//右侧操作列方式2,自定义方式 |
|||
// state.rightOperation = [{label:'编辑2',name:'edit',link:true,type:'danger',auth:state.apiName+':page'}] |
|||
|
|||
// 节点传参 |
|||
// :leftOperation="state.leftOperation" |
|||
// @leftOperationHadel="leftOperationHadel" |
|||
// :rightOperation="state.rightOperation" |
|||
// :showApiRightOperation="state.showApiRightOperation" |
|||
// :apiEditFormRules="state.apiEditFormRules" |
|||
|
|||
</script> |
@ -0,0 +1,38 @@ |
|||
<template> |
|||
<ediTtablePage |
|||
:columnWidth="200" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:detailColumName="'cherysupplierconmmrpDetail'" |
|||
:searchButtons="['search','export','outputMany']" |
|||
:multipleTable="state.auths.hasPermission(state.apiName+':outputMany')" |
|||
></ediTtablePage> |
|||
</template> |
|||
|
|||
|
|||
<script setup> |
|||
// M+6月物料需求计划风险确认 |
|||
defineOptions({ name: 'supplierConMmrp' }) |
|||
import store from '@/stores' |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import ediTtablePage from '@/components/ediTtablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierconmmrp', |
|||
searchFilter: { |
|||
supplierCode: null, |
|||
creationTime: null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'supplierCode',label:'供应商代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
auths:store.permissionStore(), |
|||
// :tableFormRules="state.tableFormRules" |
|||
// tableFormRules:{ |
|||
// plantId:[{ required: true, message: '必填', trigger: 'change' },] |
|||
// } |
|||
}) |
|||
</script> |
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 奇瑞RDC共享库存 |
|||
defineOptions({ name: 'supplierInvData' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'supplierinvdata', |
|||
searchFilter: { |
|||
plantId: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'plantId',label:'工厂代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 日物料需求计划 |
|||
defineOptions({ name: 'supplierMrpDate' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysuppliermrpdata', |
|||
searchFilter: { |
|||
materialCode: null, |
|||
creationTime: null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'materialCode',label:'零件号'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// M+6月物料需求计划 |
|||
defineOptions({ name: 'supplierMrpMonth' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysuppliermrpmonth', |
|||
searchFilter: { |
|||
materialCode: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'materialCode',label:'零件号'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 日MRP状态监控 |
|||
defineOptions({ name: 'supplierMrpState' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysuppliermrp', |
|||
searchFilter: { |
|||
plantId: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'plantId',label:'工厂代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 日MRP预警推移 |
|||
defineOptions({ name: 'supplierMrpWarning' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysuppliermrpwarning', |
|||
searchFilter: { |
|||
plantId: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'plantId',label:'工厂代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 采购订单 |
|||
defineOptions({ name: 'supplierPo' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierpo', |
|||
searchFilter: { |
|||
purchaseOrder: null, |
|||
creationTime: null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'purchaseOrder',label:'采购订单号'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 过焊装未过总装 |
|||
defineOptions({ name: 'supplierProHschedul' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierporhschedul', |
|||
searchFilter: { |
|||
productionLineId: null, |
|||
creationTime: null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'productionLineId',label:'产线代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 整车月度生产计划2 |
|||
defineOptions({ name: 'supplierProPlaning' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'supplierproplaning', |
|||
searchFilter: { |
|||
materialCode: null, |
|||
creationTime:null, |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'materialCode',label:'物料号'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 过涂装未过总装 |
|||
defineOptions({ name: 'supplierProTschedul' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierprotschedul', |
|||
searchFilter: { |
|||
productionLineId: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'productionLineId',label:'产线代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 退货单 |
|||
defineOptions({ name: 'supplierReturn' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierreturn', |
|||
searchFilter: { |
|||
returnNumber: null, |
|||
creationTime: null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'returnNumber',label:'退货单号'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 计划协议 |
|||
defineOptions({ name: 'supplierSaWeek' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysuppliersaweek', |
|||
searchFilter: { |
|||
scheduleAgreement: null, |
|||
creationTime: null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'scheduleAgreement',label:'计划协议号'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,29 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 供应商共享库存 |
|||
defineOptions({ name: 'supplierSinvData' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysuppliersinvdata', |
|||
searchFilter: { |
|||
supplierCode: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'supplierCode',label:'供应商代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
rightOperation:'apiUpdate', |
|||
}) |
|||
</script> |
@ -0,0 +1,29 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:apiEditFormRules="state.apiEditFormRules" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// BOM主数据 |
|||
defineOptions({ name: 'supplierBom' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierbom', |
|||
searchFilter: { |
|||
supplierCode: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'supplierCode',label:'供应商代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,30 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:searchButtons="['search','create','import','export']" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 人员资质信息 |
|||
defineOptions({ name: 'supplierEmployee' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplieremployee', |
|||
searchFilter: { |
|||
supplierCode: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'supplierCode',label:'供应商代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
rightOperation:'apiUpdate,apiDelete', |
|||
}) |
|||
</script> |
@ -0,0 +1,30 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:searchButtons="['search','create','import','export']" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 供应商基础信息 |
|||
defineOptions({ name: 'supplierInfo' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierinfo', |
|||
searchFilter: { |
|||
supplierCode: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'supplierCode',label:'供应商代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
rightOperation:'apiUpdate,apiDelete', |
|||
}) |
|||
</script> |
@ -0,0 +1,30 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:searchButtons="['search','create','import','export']" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 附件类数据 |
|||
defineOptions({ name: 'supplierProAttachmentData' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierproattachmentdata', |
|||
searchFilter: { |
|||
supplierCode: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'supplierCode',label:'供应商代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
rightOperation:'apiUpdate,apiDelete', |
|||
}) |
|||
</script> |
@ -0,0 +1,30 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:searchButtons="['search','export','custominvoke']" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 过程控制项质量数据 |
|||
defineOptions({ name: 'supplierProCps' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierprocps', |
|||
searchFilter: { |
|||
supplierCode: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'supplierCode',label:'供应商代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
rightOperation:'apiUpdate', |
|||
}) |
|||
</script> |
@ -0,0 +1,30 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:searchButtons="['search','export','custominvoke']" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 生产过程数据 |
|||
defineOptions({ name: 'supplierProData' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierprodata', |
|||
searchFilter: { |
|||
supplierCode: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'supplierCode',label:'供应商代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
rightOperation:'apiUpdate', |
|||
}) |
|||
</script> |
@ -0,0 +1,30 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:searchButtons="['search','export','custominvoke']" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 产品一次合格率 |
|||
defineOptions({ name: 'supplierProFirstPassyield' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierprofirstpassyield', |
|||
searchFilter: { |
|||
cheryProductNo: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'cheryProductNo',label:'奇瑞零件号'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
rightOperation:'apiUpdate', |
|||
}) |
|||
</script> |
@ -0,0 +1,30 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:searchButtons="['search','export','custominvoke']" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 缺陷业务数据 |
|||
defineOptions({ name: 'supplierProFlaw' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierproflaw', |
|||
searchFilter: { |
|||
supplierCode: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'supplierCode',label:'供应商代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
rightOperation:'apiUpdate', |
|||
}) |
|||
</script> |
@ -0,0 +1,30 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:searchButtons="['search','export','custominvoke']" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 来料检验数据 |
|||
defineOptions({ name: 'supplierProMaterialStock' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'supplierpromaterialstock', |
|||
searchFilter: { |
|||
supplierCode: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'supplierCode',label:'供应商代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
rightOperation:'apiUpdate', |
|||
}) |
|||
</script> |
@ -0,0 +1,29 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:apiEditFormRules="state.apiEditFormRules" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 工艺 |
|||
defineOptions({ name: 'supplierProProcess' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierproprocess', |
|||
searchFilter: { |
|||
techCode: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'techCode',label:'工艺编码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,30 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:searchButtons="['search','create','import','export']" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 工艺装备 |
|||
defineOptions({ name: 'supplierProProcessEquipment' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierproprocessequipment', |
|||
searchFilter: { |
|||
deviceCode: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'deviceCode',label:'工艺装备编码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
rightOperation:'apiUpdate,apiDelete', |
|||
}) |
|||
</script> |
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 排产数据 |
|||
defineOptions({ name: 'supplierProScheduling' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierproscheduling', |
|||
searchFilter: { |
|||
plantId: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'plantId',label:'工厂代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
}) |
|||
</script> |
@ -0,0 +1,29 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 物料主数据 |
|||
defineOptions({ name: 'upplierProMaterialData' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierpromaterialdata', |
|||
searchFilter: { |
|||
cheryProductNo: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'cheryProductNo',label:'奇瑞零件号'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
rightOperation:'apiUpdate', |
|||
}) |
|||
</script> |
@ -0,0 +1,30 @@ |
|||
<template> |
|||
<tablePage |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:searchButtons="['search','export','custominvoke']" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
// 工位一次合格率 |
|||
defineOptions({ name: 'upplierProStationFirstPassyield' }) |
|||
import { reactive, ref, onMounted } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
|
|||
const state = reactive({ |
|||
apiName:'cherysupplierprostationfirstpassyield', |
|||
searchFilter: { |
|||
stationId: null, |
|||
creationTime:null |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'stationId',label:'工位代码'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
rightOperation:'apiUpdate', |
|||
}) |
|||
</script> |
@ -0,0 +1,94 @@ |
|||
<template> |
|||
<tablePage |
|||
ref="tablePageRef" |
|||
:columnWidth="150" |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
:rightOperation="state.rightOperation" |
|||
:showApiRightOperation="state.showApiRightOperation" |
|||
:apiEditFormRules="state.apiEditFormRules" |
|||
@rightOperationHadel="rightOperationHadel" |
|||
></tablePage> |
|||
</template> |
|||
|
|||
<script setup> |
|||
defineOptions({ name: 'taskConifgure' }) |
|||
import { reactive, ref, onMounted,nextTick } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
import { getSetisautoByUid } from '@/api/system/taskConifgureApi' |
|||
import { ElMessageBox,ElMessage } from 'element-plus' |
|||
|
|||
|
|||
const state = reactive({ |
|||
apiName:'taskconifgure', |
|||
searchFilter: { |
|||
tableName: null, |
|||
creationTime:null, |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'tableName',label:'表名'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
rightOperation:[], |
|||
showApiRightOperation:['apiUpdate'], |
|||
apiEditFormRules:{ |
|||
tableName: [{ required: true, message: '必填项', trigger: 'blur' }], |
|||
taskName: [{ required: true, message: '必填项', trigger: 'blur' }], |
|||
api: [{ required: true, message: '必填项', trigger: 'blur' }], |
|||
url: [{ required: true, message: '必填项', trigger: 'blur' }], |
|||
corn: [{ required: true, message: '必填项', trigger: 'blur' }], |
|||
} |
|||
}) |
|||
|
|||
state.rightOperation = [ |
|||
{ |
|||
label:'启动', |
|||
name:'setisautoOk', |
|||
link:true, |
|||
type:'success', |
|||
auth:state.apiName+':setisautoOk', |
|||
hide:(row,scope) => {return row.isAuto} |
|||
}, |
|||
{ |
|||
label:'关闭', |
|||
name:'setisautoNo', |
|||
link:true, |
|||
type:'danger', |
|||
auth:state.apiName+':setisautoNo', |
|||
hide:(row,scope) => {return !row.isAuto} |
|||
}, |
|||
] |
|||
|
|||
const tablePageRef = ref(null) |
|||
|
|||
// 自动执行-启动/关闭 接口执行 |
|||
function changeSetisautoHttp(row,btn){ |
|||
ElMessageBox.confirm(`是否确定${btn}?`, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
tablePageRef.value.state.loading = true |
|||
getSetisautoByUid({uid:row.uId,isauto:!row.isAuto}) |
|||
.then(res=>{ |
|||
ElMessage.success('操作成功!') |
|||
tablePageRef.value.getTableData() |
|||
}) |
|||
.finally(()=>{tablePageRef.value.state.loading = false}) |
|||
}) |
|||
} |
|||
|
|||
// 右侧按钮操作 |
|||
function rightOperationHadel(btn,scope){ |
|||
// 自动执行-启动 |
|||
if(btn.name == 'setisautoOk'){ |
|||
changeSetisautoHttp(scope.row,btn.label) |
|||
} |
|||
// 自动执行-关闭 |
|||
if(btn.name == 'setisautoNo'){ |
|||
changeSetisautoHttp(scope.row,btn.label) |
|||
} |
|||
} |
|||
|
|||
</script> |
@ -0,0 +1,114 @@ |
|||
<template> |
|||
<div class="taskSubPage"> |
|||
<!-- 主表 --> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:searchOptions="state.searchOptions" |
|||
:searchFilter="state.searchFilter" |
|||
@leftOperationHadel="leftOperationHadel" |
|||
:leftOperation="state.leftOperation" |
|||
:rightOperation="state.rightOperation" |
|||
></tablePage> |
|||
|
|||
<!-- 明细抽屉 --> |
|||
<el-drawer |
|||
v-model="state.drawerShow" |
|||
title="详情" |
|||
direction="rtl" |
|||
destroy-on-close |
|||
:size="'80%'" |
|||
> |
|||
<div style="height: 100%;display: flex"> |
|||
<tablePage |
|||
:apiName="state.apiName" |
|||
:tableColumns="state.infoTableColumns" |
|||
:searchFilter="state.infoSearchFilter" |
|||
:hideSearch="true" |
|||
:apiType="'detailApi'" |
|||
></tablePage> |
|||
</div> |
|||
</el-drawer> |
|||
</div> |
|||
</template> |
|||
|
|||
<script setup> |
|||
defineOptions({ name: 'taskSub' }) |
|||
import apiTableColumns from '@/utils/common/apiTableColumns' |
|||
import { ElMessageBox, ElMessage,ElTable, ElTableColumn } from 'element-plus' |
|||
import { reactive, ref, onMounted,nextTick } from 'vue' |
|||
import tablePage from '@/components/tablePage/index.vue' |
|||
import apiServeNames from '@/utils/common/apiServeNames' |
|||
|
|||
const state = reactive({ |
|||
apiName:'tasksub', |
|||
searchFilter: { |
|||
taskName: null, |
|||
creationTime:null, |
|||
}, |
|||
searchOptions:[ |
|||
{type:'input',prop:'taskName',label:'任务名称'}, |
|||
{type:'datetimerange',prop:'creationTime',label:'创建时间'}, |
|||
], |
|||
leftOperation:[ |
|||
{label:'查看详情',name:'showInfo',link:true,type:'primary'} |
|||
], |
|||
drawerShow:false, |
|||
// 查看详情内部table列数据 |
|||
infoTableColumns:null, |
|||
// 查看详情内部table查询条件 |
|||
infoSearchFilter: [], |
|||
rightOperation:'apiUpdate', |
|||
}) |
|||
|
|||
function getApiByTableName(tableName){ |
|||
let _api = null |
|||
for(let i in apiServeNames){ |
|||
if(apiServeNames[i].tableName == tableName){ |
|||
console.log(apiServeNames[i].tableName,tableName) |
|||
_api = i |
|||
} |
|||
} |
|||
return _api |
|||
} |
|||
|
|||
function leftOperationHadel(btn,scope) { |
|||
// 查看详情 |
|||
if(btn.name == 'showInfo'){ |
|||
state.infoTableColumns = apiTableColumns[getApiByTableName(scope.row.tableName)] |
|||
if(!state.infoTableColumns){ |
|||
ElMessage.error(`不支持的表名: ${scope.row.tableName}`) |
|||
return |
|||
} |
|||
state.infoSearchFilter = [ |
|||
{ |
|||
logic: "And", |
|||
column: 'TableName', |
|||
action: '==', |
|||
value: scope.row.tableName |
|||
}, |
|||
{ |
|||
logic: "And", |
|||
column: 'TaskId', |
|||
action: '==', |
|||
value: scope.row.taskId |
|||
}, |
|||
] |
|||
nextTick(() => { |
|||
state.drawerShow = true |
|||
}) |
|||
} |
|||
} |
|||
|
|||
|
|||
</script> |
|||
<style scope lang="scss"> |
|||
.taskSubPage{ |
|||
height: 100%; |
|||
display: flex; |
|||
width:100%; |
|||
|
|||
.el-drawer__header { |
|||
margin-bottom:0 !important |
|||
} |
|||
} |
|||
</style> |
Loading…
Reference in new issue