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_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_TENANT='["东驰新能源"]'
# 查看质检报告环境 # 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400' VITE_REPORT_URL = 'http://10.56.17.106:25400'
# 是否需要验证码 # 是否需要验证码
VITE_NEED_CODE = true VITE_NEED_CODE = true
# 是否需要下载PDA链接 # 是否需要下载PDA链接
VITE_PDA_URL = true VITE_PDA_URL = true

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

@ -19,77 +19,77 @@ export interface MonomerVO {
procRemark: String procRemark: String
type: String type: String
acoreThi: String // acoreThi: String
acoreWid: String // acoreWid: String
bcoreThi: String // bcoreThi: String
bcoreWid: String // bcoreWid: String
//
oneInjectPreCpk: String // oneInjectPreCpk: String
twoInjectPreCpk: String // twoInjectPreCpk: String
posCoatDenCpk: String // posCoatDenCpk: String
negCoatDenCpk: String // negCoatDenCpk: String
posRollThickCpk: String // posRollThickCpk: String
negRollThickCpk: String // negRollThickCpk: String
oneInjectCpk: String // oneInjectCpk: String
finalInjectRetenCpk: String // finalInjectRetenCpk: String
//
temOfPriinjectPlant: String // temOfPriinjectPlant: String
temOfPreStandPlant: String // temOfPreStandPlant: String
temOfStandPlant: String // temOfStandPlant: String
temOfAftStandPlant: String // temOfAftStandPlant: String
temOfSecinjectPlant: String // temOfSecinjectPlant: String
tempOfBefVolSepPlant: String // tempOfBefVolSepPlant: String
tempOfVolSepPlant: String // tempOfVolSepPlant: String
humOfVolAssPlant: String // humOfVolAssPlant: String
humOfPriinjectPlant: String // humOfPriinjectPlant: String
humOfPreStandPlant: String // humOfPreStandPlant: String
humOfStandPlant: String // humOfStandPlant: String
humOfAftStandPlant: String // humOfAftStandPlant: String
humOfSecinjectPlant: String // humOfSecinjectPlant: String
humpOfBefVolSepPlant: String // humpOfBefVolSepPlant: String
humpOfVolSepPlant: String // humpOfVolSepPlant: String
standardOfClean: String // standardOfClean: String
cleanOfCoatPlant: String // cleanOfCoatPlant: String
cleanOfRollPlant: String // cleanOfRollPlant: String
cleanOfSlitPlant: String // cleanOfSlitPlant: String
cleanOfStackPlant: String // cleanOfStackPlant: String
cleanOfPriInjectPlant: String // cleanOfPriInjectPlant: String
cOfPreStandPlant: String // cOfPreStandPlant: String
clOfStandPlant: String // clOfStandPlant: String
cleanOfAftStandPlant: String // cleanOfAftStandPlant: String
//
passPer: String // passPer: String
equAbnList: String // equAbnList: String
equAbnAlarm: String // equAbnAlarm: String
environAbnoralarm: String // environAbnoralarm: String
//
posPowrMagSub: String // posPowrMagSub: String
negPowrMagSub: String // negPowrMagSub: String
posSlurMagSub: String // posSlurMagSub: String
negSlurMagSub: String // negSlurMagSub: String
posPolOneSidDen: String // posPolOneSidDen: String
negPolOneSidDen: String // negPolOneSidDen: String
posPolDouSidDen: String // posPolDouSidDen: String
negPolDouSidDen: String // negPolDouSidDen: String
posColTh: String // posColTh: String
negColTh: String // negColTh: String
posPolLen: String // posPolLen: String
negPolLen: String // negPolLen: String
diaThiAftDieSli: String // diaThiAftDieSli: String
verHeiAftDieSli: String // verHeiAftDieSli: String
mosConPolAftBak: String // mosConPolAftBak: String
//
vacLeaValOrHelVal: String // vacLeaValOrHelVal: String
helDetAftWel: String // helDetAftWel: String
tolInj: String // tolInj: String
tolInjPerDev: String // tolInjPerDev: String
totWeight: String // totWeight: String
facVol: String // facVol: String
quantitative: String // quantitative: String
impAc: String // impAc: String
celLen: String // celLen: String
celWid: String // celWid: String
celThi: String // celThi: String
} }
// 查询battery_cell_device列表 // 查询battery_cell_device列表
@ -113,6 +113,13 @@ export const createMonomer = async (data: MonomerVO) => {
return await request.post({ url: `/battery/monomer/create`, data }) 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 // 修改battery_cell_device
export const updateMonomer = async (data: MonomerVO) => { export const updateMonomer = async (data: MonomerVO) => {
return await request.put({ url: `/battery/monomer/update`, data }) 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 { ElMessage, ElMessageBox, ElNotification } from 'element-plus'
import { useI18n } from './useI18n' import { useI18n } from './useI18n'
import {releaseStatic} from "@/api/battery/monomer";
export const useMessage = () => { export const useMessage = () => {
const { t } = useI18n() const { t } = useI18n()
return { return {
@ -77,6 +78,17 @@ export const useMessage = () => {
type: 'warning' 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) { delConfirm(content?: string, tip?: string) {
return ElMessageBox.confirm( return ElMessageBox.confirm(

2
src/locales/zh-CN.ts

@ -46,7 +46,9 @@ export default {
updateSuccess: '修改成功', updateSuccess: '修改成功',
emailSentSuccess: '邮件发送成功', emailSentSuccess: '邮件发送成功',
delMessage: '是否删除所选中数据?', delMessage: '是否删除所选中数据?',
releaseMessage: '是否发布所选中数据?',
delDataMessage: '是否删除数据?', delDataMessage: '是否删除数据?',
releaseDataMessage: '是否发布数据?',
delNoData: '请选择需要删除的数据', delNoData: '请选择需要删除的数据',
delSuccess: '删除成功', delSuccess: '删除成功',
index: '序号', 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 ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import {defaultAddStaticBtn} from "@/utils/disposition/defaultButtons"; import {defaultAddStaticBtn} from "@/utils/disposition/defaultButtons";
import {releaseMoving, releaseStatic} from "@/api/battery/monomer";
defineOptions({ name: 'CellDevice' }) defineOptions({ name: 'CellDevice' })
@ -263,7 +264,7 @@ const HeadButttondata = [
defaultButtons.defaultAddStaticBtn({hasPermi:'battery:monomer:update'}), // defaultButtons.defaultAddStaticBtn({hasPermi:'battery:monomer:update'}), //
defaultButtons.defaultAddBtn({hasPermi:'battery:monomer:create'}), // defaultButtons.defaultAddBtn({hasPermi:'battery:monomer:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'battery:cellDevice:import'}), // // defaultButtons.defaultImportBtn({hasPermi:'battery:cellDevice:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'battery:monomer:export'}), // // defaultButtons.defaultExportBtn({hasPermi:'battery:monomer:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
// defaultButtons.defaultFilterBtn(null), // // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -293,13 +294,23 @@ const buttonBaseClick = (val, item) => {
console.log('其他按钮', 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) => { const butttondata = (row,$index) => {
return [ return [
defaultButtons.mainListEditBtn({hasPermi:'battery:monomer:update'}), // defaultButtons.mainListEditBtn({hide:isShowButton(row,['FALSE']),hasPermi:'battery:monomer:update'}), //
defaultButtons.mainListReleaseBtn({hide:(row.release =='0' || row.type !='static'),hasPermi:'battery:monomer:update'}), // defaultButtons.mainListReleaseBtn({hide:isShowButton(row,['FALSE']),hasPermi:'battery:monomer:update'}), //
defaultButtons.mainListDeleteBtn({hide:row.type =='static' ,hasPermi:'battery:monomer:delete'}), // defaultButtons.mainListDeleteBtn({hide:row.type =='static' ,hasPermi:'battery:monomer:delete'}), //
] ]
} }
@ -307,10 +318,11 @@ const butttondata = (row,$index) => {
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) 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') 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) => { const handleDelete = async (id: number) => {
try { try {

Loading…
Cancel
Save