This commit is contained in:
liushuai
2019-07-24 09:38:04 +08:00
parent 5b29bf5f1a
commit 78963ec5ae
8 changed files with 156 additions and 8 deletions

View File

@@ -56,3 +56,14 @@ export function getMachine() {
}
})
}
// 初始化 状态
export function searchState() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'MES_机加工MES_设备状态查询_初始化'
}
})
}

View File

@@ -13,6 +13,8 @@ export const upload3 = `http://192.168.1.231:8411/submit/upload3.ashx` // perfor
export const uploadInvoiceScan = `http://192.168.1.231:8411/submit/uploadInvoiceScan.ashx` // invoice
export const uploadInvoiceScan1 = `http://192.168.1.231:8411/submit/uploadInvoiceScan1.ashx` // invoice(workshop)
export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement
export const uploadPerson = `http://192.168.1.231:8411/submit/uploadPerson.ashx`
export const uploadOP = `http://192.168.1.231:8411/submit/uploadOP.ashx`
// 技术中心程序发布时要更改下面所有的IP到0段
export const ServerIP = `http://192.168.1.231:8411/webpage/file/`

View File

@@ -152,8 +152,13 @@
{{ scope.row.家庭住址 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200">
<el-table-column label="操作" fixed="right" align="center" width="300">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-picture"
@click="handlePicture(scope.row)">上传图片</el-button>
<el-button
size="mini"
type="primary"
@@ -385,11 +390,31 @@
@current-change="handleCurrentChangeN"/>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible" title="上传图片" center style="height: 800px" width="30%">
<el-upload
id="invoiceScan"
ref="upload"
:multiple="true"
:auto-upload="false"
:on-success="uploadSuccess"
:before-upload="beforeUpload"
:on-exceed="warningExceed"
:limit="limit"
:action="upload+'?num='+ PersonId"
list-type="picture-card">
<i class="el-icon-plus"/>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible=false">取消</el-button>
<el-button type="primary" style="width: 70px" @click="submitPerson()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { moveGroups, getTree, tree, getTablePeople, getTablePeopleForName, addDepartmentName, delList, editList, delPeopleList, fetchEducationData, fetchPostData, addPeople, editPeople, quit, searchLeavingList } from '@/api/BasicData/PersonnelManagement'
import { uploadPerson } from '@/utils/request'
export default {
data() {
return {
@@ -410,6 +435,9 @@ export default {
nodeName: '',
btnLoading: false,
department_DFV: false,
upload: uploadPerson,
dialogFormVisible: false,
PersonId: '',
department_Form: {
DepartmentName: ''
},
@@ -522,6 +550,32 @@ export default {
}
}
},
uploadSuccess(res) { // 上传成功回调
if (res[0].result === '1') {
this.$message.success('增加成功')
this.dialogFormVisible = false
this.$refs.upload.clearFiles()
} else {
this.$message.error('增加失败')
}
},
beforeUpload(file) { // 上传前检测
const isJPG = /^image\/.*/.test(file.type)
if (!isJPG) {
this.$message.error('只能上传图片。。')
}
return isJPG
},
warningExceed() {
this.$message.error('仅可上传五张照片')
},
handlePicture(row) {
this.dialogFormVisible = true
this.PersonId = row.人员编号
},
submitPerson() {
this.$refs.upload.submit()
},
handleAdd(formName) {
this.department_Title = '新增部门'
this.department_DFV = true

View File

@@ -28,6 +28,15 @@
<div v-else ><div style="width: 12px;height: 12px;border-radius: 50%;background-color: red;display: inline-block;margin:0px 5px 0 0"/>{{ scope.row.呼叫备注 }}</div>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-picture"
@click="handlePicture(scope.row)">上传图片</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog
@@ -59,12 +68,31 @@
</el-table-column>
</el-table>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible" title="上传图片" center style="height: 800px" width="30%">
<el-upload
id="invoiceScan"
ref="upload"
:multiple="true"
:auto-upload="false"
:on-success="uploadSuccess"
:before-upload="beforeUpload"
:on-exceed="warningExceed"
:limit="limit"
:action="upload+'?num='+ OPId"
list-type="picture-card">
<i class="el-icon-plus"/>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible=false">取消</el-button>
<el-button type="primary" style="width: 70px" @click="submitPerson()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { ANDON_countselect } from '@/api/ManufacturingCenter/AntonMonitoring'
import { wsuri, name1 } from '@/utils/request'
import { wsuri, name1, uploadOP } from '@/utils/request'
export default {
data() {
return {
@@ -72,6 +100,9 @@ export default {
timer_ANDON: '',
andonMsg: '',
Name: '',
upload: uploadOP,
dialogFormVisible: false,
OPId: '',
massage: [],
dialogVisible: false,
tableDataMassage: [],
@@ -121,6 +152,32 @@ export default {
websocketerror() {
console.log('WebSocket连接失败')
},
uploadSuccess(res) { // 上传成功回调
if (res[0].result === '1') {
this.$message.success('增加成功')
this.dialogFormVisible = false
this.$refs.upload.clearFiles()
} else {
this.$message.error('增加失败')
}
},
beforeUpload(file) { // 上传前检测
const isJPG = /^image\/.*/.test(file.type)
if (!isJPG) {
this.$message.error('只能上传图片。。')
}
return isJPG
},
warningExceed() {
this.$message.error('仅可上传五张照片')
},
handlePicture(row) {
this.dialogFormVisible = true
this.OPId = row.工位号
},
submitPerson() {
this.$refs.upload.submit()
},
search() {
this.tableDataMassage = []
ANDON_countselect().then(response => {

View File

@@ -129,7 +129,7 @@
</div>
</template>
<script>import { getData, getData1, getData2, getData3, getMachine } from '@/api/ManufacturingCenter/EquipmentConditionAnalysis'
<script>import { getData, getData1, getData2, getData3, getMachine, searchState } from '@/api/ManufacturingCenter/EquipmentConditionAnalysis'
export default {
data() {
@@ -139,6 +139,8 @@ export default {
MachineValue1: '',
Machine: [],
yAxisValue: [],
colors: [],
state: [],
Time: '',
date1: '',
date2: '',
@@ -225,6 +227,12 @@ export default {
if (diff > 6) {
this.$message.warning('选择时间区间不得超过6天')
} else {
searchState().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.colors.push(response.data[i].颜色)
this.state.push(response.data[i].状态)
}
})
getData3(this.MachineValue1, this.date1, this.date2).then(response => {
this.table1 = response.data
console.log(this.table1)
@@ -417,10 +425,9 @@ export default {
return params.value[1].substr(11, 5) + '~' + params.value[2].substr(11, 5)
} // 数据的值
},
legend: {
orient: 'vertical',
x: 'left',
data: ['运行', '停机', '等待', '报警']
legend: { // 图例
left: 'left'
// selectedMode: false, // 图例可点击
},
dataZoom: [{
type: 'inside',
@@ -468,6 +475,10 @@ export default {
},
series: [
// 用空bar来显示几个图例
{ name: _this.state[0], type: 'bar', data: [] },
{ name: _this.state[1], type: 'bar', data: [] },
{ name: _this.state[2], type: 'bar', data: [] },
{ name: _this.state[3], type: 'bar', data: [] },
{
type: 'custom', renderItem(params, api) { // 开发者自定义的图形元素渲染逻辑,是通过书写 renderItem 函数实现的
var categoryIndex = api.value(0) // 这里使用 api.value(0) 取出当前 dataItem 中第一个维度的数值。

View File

@@ -548,6 +548,7 @@ export default {
组件零件基本件流水号: response.data.rows[i].组件零件基本件流水号,
投产类型流水号: response.data.rows[i].投产类型流水号,
数据类型: response.data.rows[i].数据类型,
规格: response.data.rows[i].规格,
材料流水号: response.data.rows[i].材料流水号,
checked_dailiao: false,
checked_waixie: false,
@@ -760,6 +761,7 @@ export default {
组件零件基本件流水号: response.data.rows[i].组件零件基本件流水号,
投产类型流水号: response.data.rows[i].投产类型流水号,
数据类型: response.data.rows[i].数据类型,
规格: response.data.rows[i].规格,
材料流水号: response.data.rows[i].材料流水号,
checked_dailiao: false,
checked_waixie: false,

View File

@@ -1,7 +1,7 @@
<template>
<div class="app-container">
<el-card>
<el-radio-group v-model="radio" size="small" style="margin: 10px;" @change="checked = false;partNum=[];partNumValue = '';typeValue = '';partName = '';material = '';materialName = '';prepareMateriel = '';spec = '';batchNum = '';searchPartsByMachineGroup();">
<el-radio-group v-model="radio" size="small" style="margin: 10px;" @change="checked = false;partNum=[];partNumValue = '';typeValue = '';Specifications = '';partName = '';material = '';materialName = '';prepareMateriel = '';spec = '';batchNum = '';searchPartsByMachineGroup();">
<el-radio v-model="radio" :label="1">未编制</el-radio>
<el-radio v-model="radio" :label="2">已编制</el-radio>
</el-radio-group>
@@ -40,6 +40,8 @@
<el-input v-model="typeValue" placeholder="种类" size="small" readonly style="width:100px"/>
<span>零件名称:</span>
<el-input v-model="partName" placeholder="零件名称" size="small" readonly style="width:115px"/>
<span>规格:</span>
<el-input v-model="Specifications" placeholder="规格" size="small" readonly style="width:115px"/>
<span>投产总数量:</span>
<el-input v-model="batchNum" readonly size="small" style="width:80px;margin-top:10px;"/>
<span>物料:</span>
@@ -560,6 +562,7 @@ export default {
height2: '',
OppositeSideWidth: '',
length2: '',
Specifications: '',
biankuan: '',
bianhou: '',
changdu: '',
@@ -986,6 +989,7 @@ export default {
this.checked = false
this.weight = ''
this.partNumValue = ''
this.Specifications = ''
this.typeValue = ''
this.partName = ''
this.material = ''
@@ -1187,6 +1191,7 @@ export default {
detailInfo(this.partNumValue).then(response => {
if (response.data.length !== 0) {
this.typeValue = response.data[0].零件类型名称
this.Specifications = response.data[0].规格
this.partName = response.data[0].零件名称
this.batchNum = response.data[0].批次数量
this.material = response.data[0].材料流水号
@@ -1518,6 +1523,7 @@ export default {
this.checked = false
this.partNumValue = ''
this.typeValue = ''
this.Specifications = ''
this.partName = ''
this.batchNum = ''
this.material = ''

View File

@@ -104,6 +104,11 @@
align="center">
<template slot-scope="scope">{{ scope.row.材料 }}</template>
</el-table-column>
<el-table-column
label="规格"
align="center">
<template slot-scope="scope">{{ scope.row.规格 }}</template>
</el-table-column>
<el-table-column
label="备注"
align="center">