Browse Source

时间

master
李达明 4 weeks ago
parent
commit
5a7b617fc0
  1. 5
      .env.test
  2. 149
      src/api/battery/monomer/index.ts
  3. 12
      src/hooks/web/useMessage.ts
  4. 2
      src/locales/zh-CN.ts
  5. 37
      src/views/battery/monomer/index.vue

5
.env.test

@ -36,17 +36,16 @@ VITE_INTERFACE_URL='http://10.56.17.106:25111/magic/web/index.html'
#VITE_INTERFACE_URL='http://dev.ccwin-in.com:25111/magic/web/index.html'
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25111'
VITE_JMREPORT_BASE_URL='http://10.56.17.106:25111'
# 租户配置
VITE_TENANT='["东驰新能源"]'
# 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'
VITE_REPORT_URL = 'http://10.56.17.106:25400'
# 是否需要验证码
VITE_NEED_CODE = true
# 是否需要下载PDA链接
VITE_PDA_URL = true

149
src/api/battery/monomer/index.ts

@ -19,77 +19,77 @@ export interface MonomerVO {
procRemark: String
type: String
acoreThi: String
acoreWid: String
bcoreThi: String
bcoreWid: String
oneInjectPreCpk: String
twoInjectPreCpk: String
posCoatDenCpk: String
negCoatDenCpk: String
posRollThickCpk: String
negRollThickCpk: String
oneInjectCpk: String
finalInjectRetenCpk: String
temOfPriinjectPlant: String
temOfPreStandPlant: String
temOfStandPlant: String
temOfAftStandPlant: String
temOfSecinjectPlant: String
tempOfBefVolSepPlant: String
tempOfVolSepPlant: String
humOfVolAssPlant: String
humOfPriinjectPlant: String
humOfPreStandPlant: String
humOfStandPlant: String
humOfAftStandPlant: String
humOfSecinjectPlant: String
humpOfBefVolSepPlant: String
humpOfVolSepPlant: String
standardOfClean: String
cleanOfCoatPlant: String
cleanOfRollPlant: String
cleanOfSlitPlant: String
cleanOfStackPlant: String
cleanOfPriInjectPlant: String
cOfPreStandPlant: String
clOfStandPlant: String
cleanOfAftStandPlant: String
passPer: String
equAbnList: String
equAbnAlarm: String
environAbnoralarm: String
posPowrMagSub: String
negPowrMagSub: String
posSlurMagSub: String
negSlurMagSub: String
posPolOneSidDen: String
negPolOneSidDen: String
posPolDouSidDen: String
negPolDouSidDen: String
posColTh: String
negColTh: String
posPolLen: String
negPolLen: String
diaThiAftDieSli: String
verHeiAftDieSli: String
mosConPolAftBak: String
vacLeaValOrHelVal: String
helDetAftWel: String
tolInj: String
tolInjPerDev: String
totWeight: String
facVol: String
quantitative: String
impAc: String
celLen: String
celWid: String
celThi: String
// acoreThi: String
// acoreWid: String
// bcoreThi: String
// bcoreWid: String
//
// oneInjectPreCpk: String
// twoInjectPreCpk: String
// posCoatDenCpk: String
// negCoatDenCpk: String
// posRollThickCpk: String
// negRollThickCpk: String
// oneInjectCpk: String
// finalInjectRetenCpk: String
//
// temOfPriinjectPlant: String
// temOfPreStandPlant: String
// temOfStandPlant: String
// temOfAftStandPlant: String
// temOfSecinjectPlant: String
// tempOfBefVolSepPlant: String
// tempOfVolSepPlant: String
// humOfVolAssPlant: String
// humOfPriinjectPlant: String
// humOfPreStandPlant: String
// humOfStandPlant: String
// humOfAftStandPlant: String
// humOfSecinjectPlant: String
// humpOfBefVolSepPlant: String
// humpOfVolSepPlant: String
// standardOfClean: String
// cleanOfCoatPlant: String
// cleanOfRollPlant: String
// cleanOfSlitPlant: String
// cleanOfStackPlant: String
// cleanOfPriInjectPlant: String
// cOfPreStandPlant: String
// clOfStandPlant: String
// cleanOfAftStandPlant: String
//
// passPer: String
// equAbnList: String
// equAbnAlarm: String
// environAbnoralarm: String
//
// posPowrMagSub: String
// negPowrMagSub: String
// posSlurMagSub: String
// negSlurMagSub: String
// posPolOneSidDen: String
// negPolOneSidDen: String
// posPolDouSidDen: String
// negPolDouSidDen: String
// posColTh: String
// negColTh: String
// posPolLen: String
// negPolLen: String
// diaThiAftDieSli: String
// verHeiAftDieSli: String
// mosConPolAftBak: String
//
// vacLeaValOrHelVal: String
// helDetAftWel: String
// tolInj: String
// tolInjPerDev: String
// totWeight: String
// facVol: String
// quantitative: String
// impAc: String
// celLen: String
// celWid: String
// celThi: String
}
// 查询battery_cell_device列表
@ -113,6 +113,13 @@ export const createMonomer = async (data: MonomerVO) => {
return await request.post({ url: `/battery/monomer/create`, data })
}
export const releaseStatic = async (data: MonomerVO) => {
return await request.put({ url: `/battery/monomer/release-static`, data })
}
export const releaseMoving = async (data: MonomerVO) => {
return await request.put({ url: `/battery/monomer/release-moving`, data })
}
// 修改battery_cell_device
export const updateMonomer = async (data: MonomerVO) => {
return await request.put({ url: `/battery/monomer/update`, data })

12
src/hooks/web/useMessage.ts

@ -1,5 +1,6 @@
import { ElMessage, ElMessageBox, ElNotification } from 'element-plus'
import { useI18n } from './useI18n'
import {releaseStatic} from "@/api/battery/monomer";
export const useMessage = () => {
const { t } = useI18n()
return {
@ -77,6 +78,17 @@ export const useMessage = () => {
type: 'warning'
})
},
releaseConfirm(content?: string, tip?: string) {
return ElMessageBox.confirm(
content ? content : t('common.releaseMessage'),
tip ? tip : t('common.confirmTitle'),
{
confirmButtonText: t('common.ok'),
cancelButtonText: t('common.cancel'),
type: 'warning'
}
)
},
// 删除窗体
delConfirm(content?: string, tip?: string) {
return ElMessageBox.confirm(

2
src/locales/zh-CN.ts

@ -46,7 +46,9 @@ export default {
updateSuccess: '修改成功',
emailSentSuccess: '邮件发送成功',
delMessage: '是否删除所选中数据?',
releaseMessage: '是否发布所选中数据?',
delDataMessage: '是否删除数据?',
releaseDataMessage: '是否发布数据?',
delNoData: '请选择需要删除的数据',
delSuccess: '删除成功',
index: '序号',

37
src/views/battery/monomer/index.vue

@ -226,6 +226,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import {defaultAddStaticBtn} from "@/utils/disposition/defaultButtons";
import {releaseMoving, releaseStatic} from "@/api/battery/monomer";
defineOptions({ name: 'CellDevice' })
@ -263,7 +264,7 @@ const HeadButttondata = [
defaultButtons.defaultAddStaticBtn({hasPermi:'battery:monomer:update'}), //
defaultButtons.defaultAddBtn({hasPermi:'battery:monomer:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'battery:cellDevice:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'battery:monomer:export'}), //
// defaultButtons.defaultExportBtn({hasPermi:'battery:monomer:export'}), //
defaultButtons.defaultFreshBtn(null), //
// defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -293,13 +294,23 @@ const buttonBaseClick = (val, item) => {
console.log('其他按钮', item)
}
}
// isShowButton
const isShowButton = (row,val) => {
if (row.type == 'static') {
return false
} else if (row.sending == '0') {
return false
} else{
return true
}
}
// -
const butttondata = (row,$index) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'battery:monomer:update'}), //
defaultButtons.mainListReleaseBtn({hide:(row.release =='0' || row.type !='static'),hasPermi:'battery:monomer:update'}), //
defaultButtons.mainListEditBtn({hide:isShowButton(row,['FALSE']),hasPermi:'battery:monomer:update'}), //
defaultButtons.mainListReleaseBtn({hide:isShowButton(row,['FALSE']),hasPermi:'battery:monomer:update'}), //
defaultButtons.mainListDeleteBtn({hide:row.type =='static' ,hasPermi:'battery:monomer:delete'}), //
]
}
@ -307,10 +318,11 @@ const butttondata = (row,$index) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}else if (val == 'release') { //
handleRelease(row)
}
}
@ -410,6 +422,23 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicCellDevice')
}
const handleRelease = async (row?: any) => {
try {
//
await message.releaseConfirm()
//
if(row.type == 'static'){
await MonomerApi.releaseStatic(row);
}else{
await MonomerApi.releaseMoving(row);
}
message.success('发送成功')
//
await getList()
} catch {}
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {

Loading…
Cancel
Save