| | |
| | | }) |
| | | } |
| | | |
| | | export function ClaimTasks(flowcard,state) { |
| | | export function ClaimTasks(flowcard,state,line) { |
| | | return request({ |
| | | url: '/home/ClaimTasks?flowcard='+flowcard+'&state='+state, |
| | | url: '/home/ClaimTasks?flowcard='+flowcard+'&state='+state+'&line='+line, |
| | | method: 'post', |
| | | data:"" |
| | | }) |
| | |
| | | <div style="width:1000px;height: 720px;border: 2px solid #d1d1d1;"> |
| | | <!--玻璃图 #81b337--> |
| | | <div :style="'top:10px;bottom: 10px;left: 10px;right: 10px;margin:auto auto;position:absolute;width:' |
| | | + (this.LastQueue.glasswidth / 25 * 7) + 'px;height:' |
| | | + (this.LastQueue.glassheight / 25 * 7) + 'px;line-height: ' |
| | | + (this.LastQueue.glassheight / 25 * 7) + 'px;background-color: #93d2f3;text-align: center;'"> |
| | | + (this.LastQueue.glasswidth / 25 * 7) + 'px;height:' |
| | | + (this.LastQueue.glassheight / 25 * 7) + 'px;line-height: ' |
| | | + (this.LastQueue.glassheight / 25 * 7) + 'px;background-color: #93d2f3;text-align: center;'"> |
| | | {{ this.LastQueue.glasswidth }}*{{ this.LastQueue.glassheight }} |
| | | </div> |
| | | |
| | |
| | | <el-table-column :min-width="80" prop="glassWidth" :label="$t('Width')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="glassHeight" :label="$t('Height')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="thickness" :label="$t('Thickness')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="films" :label="$t('Films')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="number" :label="$t('number')"></el-table-column> |
| | | <el-table-column :min-width="80" prop="width" :label="$t('Width')"></el-table-column> |
| | | <el-table-column :min-width="250" :label="$t('Operate')"> |
| | | <template slot-scope='scope'> |
| | | |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | @click="UpdateDisabled(scope.row.cage, scope.row.cell, scope.row.disabled == 0 ? 1 : 0)"> |
| | | {{ scope.row.disabled == 0 ? $t('Disable') : $t('Enable') }}</el-button> |
| | | |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | :disabled="(scope.row.width < scope.row.glassWidth + 100 ? true : false)" |
| | | @click="UpdateStroageCageByCell(scope.row.cell, scope.row.number, 1)">{{ $t('Add') |
| | | }} |
| | | </el-button> |
| | | |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | :disabled="scope.row.number >= 1 ? false : true" |
| | | @click="UpdateStroageCageByCell(scope.row.cell, scope.row.number, -1)">{{ $t('Reduce') |
| | | }}</el-button> |
| | | |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | :disabled="scope.row.number >= 1 ? false : true" |
| | | @click="UpdateStroageCageByCell(scope.row.cell, scope.row.number, 0)">{{ $t('Delete') |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="state" :label="$t('Task State')"> |
| | | <template slot-scope='scope'> |
| | | {{ scope.row.state >= 0 ? scope.row.state == 0 ? $t('Start') : $t('Stop') : "" }} |
| | | {{ scope.row.state >= 0 ? scope.row.state == 0 ? $t('Stop') : $t('Start') : "" }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="method" :label="$t('Task Method')"> |
| | | <template slot-scope='scope'> |
| | | {{ scope.row.state >= 0 ? scope.row.method == 0 ? $t('Out') : $t('All Out') : "" }} |
| | | </template> |
| | | |
| | | </el-table-column> |
| | | <el-table-column prop="line" :label="$t('Task Line')"> |
| | | </el-table-column> |
| | | <el-table-column width="220" :label="$t('Operate')"> |
| | | <el-table-column width="300" :label="$t('Operate')"> |
| | | |
| | | <template slot-scope='scope'> |
| | | <el-select v-model="selected[scope.$index]" :placeholder="$t('Line')" |
| | | v-show="scope.row.state >= 0 ? true : false"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | v-show="scope.row.state >= 0 ? true : false" |
| | | @click="ClaimTasks(scope.row.flowcard, scope.row.state)"> |
| | | {{ scope.row.status == '0' ? $t('Start Task') : $t('Stop Task') }}</el-button> |
| | | @click="ClaimTasks(scope.row.flowcard, scope.row.state, selected[scope.$index])"> |
| | | {{ scope.row.state > 0 ? $t('Stop Task') : $t('Start Task') }}</el-button> |
| | | |
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" |
| | | v-show="scope.row.state >= 0 ? true : false" |
| | |
| | | </div> |
| | | <el-table :data="this.StorageCageAddInfo" :height="700" border style="width: 100%;overflow: auto;"> |
| | | <el-table-column prop="flowcard" :label="$t('Flowcard')"></el-table-column> |
| | | <el-table-column prop="tier" :label="$t('Tier')"></el-table-column> |
| | | <el-table-column prop="glasstype" :label="$t('GlassType')"></el-table-column> |
| | | <el-table-column prop="width" :label="$t('Width')"></el-table-column> |
| | | <el-table-column prop="height" :label="$t('Height')"></el-table-column> |
| | |
| | | Disabled, SelectPermissionByUserName, currentUsername, CompleteQueue, |
| | | isAllowReorderings, |
| | | |
| | | UpdateStroageCageByCell, FinishTask, SelectGlassInfo, StorageCageAddGlass, ClaimTasks, ModeChange, UpdateQueue,importData,ManualTake,AnewMeasure |
| | | UpdateStroageCageByCell, FinishTask, SelectGlassInfo, StorageCageAddGlass, ClaimTasks, ModeChange, UpdateQueue, importData, ManualTake, AnewMeasure |
| | | } from "../../api/home"; |
| | | |
| | | |
| | |
| | | name: "Home", |
| | | data() { |
| | | return { |
| | | selected: [], |
| | | options: [{ |
| | | value: '1', |
| | | label: '1' |
| | | }, { |
| | | value: '2', |
| | | label: '2' |
| | | }], |
| | | dataList: [], |
| | | tableData1: [], |
| | | Measuermode: false, |
| | |
| | | socket.onclose = function () { |
| | | console.log("websocket已关闭"); |
| | | }; |
| | | //发生了错误事件 |
| | | //发生了错误事件 |
| | | socket.onerror = function () { |
| | | console.log("websocket发生了错误"); |
| | | } |
| | |
| | | |
| | | }, |
| | | //领取/暂停任务 |
| | | ClaimTasks(flowcard, state) { |
| | | ClaimTasks(flowcard, state).then(res => { |
| | | ClaimTasks(flowcard, state, line) { |
| | | ClaimTasks(flowcard, state, line).then(res => { |
| | | if (res.data.message == 200) { |
| | | this.$message.success(this.$t('Operation successful')); |
| | | } |
| | |
| | | }, |
| | | //人工拿走 |
| | | ManualTake() { |
| | | let s="123"; |
| | | let s = "123"; |
| | | ManualTake(s).then(res => { |
| | | if (res.data.message == 200) { |
| | | console.log(res.data.message); |
| | |
| | | }, |
| | | //重新测量 |
| | | AnewMeasure() { |
| | | let s="123"; |
| | | let s = "123"; |
| | | AnewMeasure(s).then(res => { |
| | | if (res.data.message == 200) { |
| | | console.log(res.data.message); |
| | |
| | | |
| | | }, |
| | | importData() { |
| | | let tbdata=this.dataList; |
| | | let tbdata = this.dataList; |
| | | importData(tbdata).then(res => { |
| | | if (res.data.message == 200) { |
| | | this.$message.success(this.$t('Operation successful')); |
| | |
| | | FileInputStream fileInputStream; |
| | | try { |
| | | // 从文件中读取字节数据存入 fileInputStream |
| | | fileInputStream = new FileInputStream("D:/canadames/Alarm.json"); |
| | | fileInputStream = new FileInputStream("D:/Albania_Mes/Alarm.json"); |
| | | // 读取 fileInputStream 中字节并将其解码为字符 |
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8"); |
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader |
| | |
| | | |
| | | //领取/暂停任务 |
| | | @PostMapping("/ClaimTasks") |
| | | public Result ClaimTasks(String flowcard,Integer state) { |
| | | return storageCageService.ClaimTasks(flowcard,state); |
| | | public Result ClaimTasks(String flowcard,Integer state, Integer line) { |
| | | return storageCageService.ClaimTasks(flowcard,state,line); |
| | | } |
| | | |
| | | //修改出片方式 |
| | |
| | | List<StorageCage> SelectStorageCageInfo(); |
| | | |
| | | // 删除格子内玻璃信息 |
| | | @Update("update storage_cage set width=5000,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,thickness=null,glasstype=null,number=null where cell=#{cell}") |
| | | @Update("update storage_cage set films=null,width=5000,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,thickness=null,glasstype=null,number=null where cell=#{cell}") |
| | | void DeleteStroageCageByCell(Integer cell); |
| | | |
| | | // 修改格子玻璃数量 |
| | |
| | | @Select("select gi.*,sum(sc.number) as cageno from glassinfo gi left join storage_cage sc on gi.glasstype=sc.glasstype where gi.flowcard=#{flowcard} group by gi.id order by gi.mateid,gi.tier") |
| | | List<GlassInfo> SelectOrderView(String flowcard); |
| | | |
| | | @Update("update flowcard set state=#{state} where flowcard=#{flowcard}") |
| | | void ClaimTasks(String flowcard, int state); |
| | | @Update("update flowcard set state=#{state},line=#{line} where flowcard=#{flowcard}") |
| | | void ClaimTasks(String flowcard, int state, int line); |
| | | |
| | | @Update("update flowcard set method=#{method} where flowcard=#{flowcard}") |
| | | void ModeChange(String flowcard, int method); |
| | | |
| | | @Update("update queue set flowcard=#{flowcard},glasswidth=#{width},glassheight=#{height},glasstype=#{glasstype},state=1 where state<=0") |
| | | void UpdateQueue(String flowcard, double width, double height, Integer glasstype); |
| | | @Update("update queue set glassid=concat(#P{flowcard},'-',#{tier}),flowcard=#{flowcard},glasswidth=#{width},glassheight=#{height},glasstype=#{glasstype},thickness=#{thickness},state=1 where state<=0") |
| | | void UpdateQueue(String flowcard, double width, double height, Integer glasstype, Double thickness); |
| | | |
| | | @Update("update glassinfo set finishnumber=ifnull(finishnumber,0)+1 where flowcard=#{flowcard} and mateid=#{mateid} and tier=#{geTier}") |
| | | void AddGlassNo(String flowcard, Integer mateid, Integer geTier); |
| | |
| | | } |
| | | |
| | | // 开始任务 |
| | | public Result ClaimTasks(String flowcard, Integer state) { |
| | | public Result ClaimTasks(String flowcard, Integer state, Integer line) { |
| | | if (state == 1) { |
| | | homeMapper.ClaimTasks(flowcard, 0); |
| | | homeMapper.ClaimTasks(flowcard, 0,line); |
| | | } else { |
| | | homeMapper.ClaimTasks(flowcard, 1); |
| | | homeMapper.ClaimTasks(flowcard, 1,line); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | |
| | | // 修改测量信息 |
| | | public Result UpdateQueue(GlassInfo glassInfo) { |
| | | homeMapper.UpdateQueue(glassInfo.getFlowcard(), glassInfo.getWidth(), glassInfo.getHeight(), |
| | | glassInfo.getGlasstype()); |
| | | glassInfo.getGlasstype(),glassInfo.getThickness()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |