pic
This commit is contained in:
@@ -85,8 +85,31 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@selection-change="handleSelectionChange">
|
@selection-change="handleSelectionChange">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
align="center"
|
||||||
type="selection"
|
type="selection"
|
||||||
width="55"/>
|
width="50"/>
|
||||||
|
<el-table-column align="center" label="照片" width="50">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-popover
|
||||||
|
v-if="scope.row.文件标识 && scope.row.文件标识 !== 'null'"
|
||||||
|
placement="top-start"
|
||||||
|
width="200"
|
||||||
|
trigger="hover">
|
||||||
|
<el-button type="text" style="float:right" @click="deletePhoto(scope.row)">删除</el-button>
|
||||||
|
<el-image :src="scope.row.文件标识 && scope.row.文件标识 !== 'null' ? (readFile + scope.row.文件标识 + '.' + scope.row.文件后缀) : readFile + '123.jpg'">
|
||||||
|
<div slot="error" class="image-slot">
|
||||||
|
<i class="el-icon-picture-outline"/>
|
||||||
|
</div>
|
||||||
|
</el-image>
|
||||||
|
<el-image slot="reference" :src="scope.row.文件标识 && scope.row.文件标识 !== 'null' ? (readFile + scope.row.文件标识 + '.' + scope.row.文件后缀) : readFile + '123.jpg'" style="width:23px;">
|
||||||
|
<div slot="error" class="image-slot">
|
||||||
|
<i class="el-icon-picture-outline"/>
|
||||||
|
</div>
|
||||||
|
</el-image>
|
||||||
|
</el-popover>
|
||||||
|
<span v-else>—</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" label="部门名称" width="100">
|
<el-table-column align="center" label="部门名称" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.节点名称 }}
|
{{ scope.row.节点名称 }}
|
||||||
@@ -152,9 +175,10 @@
|
|||||||
{{ scope.row.家庭住址 }}
|
{{ scope.row.家庭住址 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="300">
|
<el-table-column label="操作" fixed="right" align="center" width="220">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
:disabled="scope.row.文件标识 && scope.row.文件标识 !== 'null'"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-picture"
|
icon="el-icon-picture"
|
||||||
@@ -164,11 +188,11 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleEditPeople(scope.row)">编辑</el-button>
|
@click="handleEditPeople(scope.row)">编辑</el-button>
|
||||||
<el-button
|
<!--<el-button-->
|
||||||
size="mini"
|
<!--size="mini"-->
|
||||||
type="danger"
|
<!--type="danger"-->
|
||||||
icon="el-icon-delete"
|
<!--icon="el-icon-delete"-->
|
||||||
@click="deletePeopleTable(scope.row)">删除</el-button>
|
<!--@click="deletePeopleTable(scope.row)">删除</el-button>-->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -415,9 +439,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import { moveGroups, getTree, tree, getTablePeople, getTablePeopleForName, addDepartmentName, delList, editList, delPeopleList, fetchEducationData, fetchPostData, addPeople, editPeople, quit, searchLeavingList } from '@/api/BasicData/PersonnelManagement'
|
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'
|
import { uploadPerson } from '@/utils/request'
|
||||||
|
import { readFile } from '@/utils/request'
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
limit: 999,
|
||||||
|
readFile: readFile,
|
||||||
disabledMove: true,
|
disabledMove: true,
|
||||||
PageCurrentN: 1,
|
PageCurrentN: 1,
|
||||||
PageSizeN: 10,
|
PageSizeN: 10,
|
||||||
@@ -506,6 +535,35 @@ export default {
|
|||||||
this.fetchPostData()
|
this.fetchPostData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 删除人员照片
|
||||||
|
deletePhoto(row) {
|
||||||
|
this.$confirm('此操作将永久删除该图片, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '4',
|
||||||
|
name: `delete from 人员管理_图片 where 人员编号 = ${row.人员编号}`
|
||||||
|
}
|
||||||
|
}).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.handleNodeClick()
|
||||||
|
} else {
|
||||||
|
this.$message.error('删除失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '取消删除'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
fetchEducationData() {
|
fetchEducationData() {
|
||||||
this.getSelect(fetchEducationData, ['学历名称', '学历编号'], 'EducationDate')
|
this.getSelect(fetchEducationData, ['学历名称', '学历编号'], 'EducationDate')
|
||||||
},
|
},
|
||||||
@@ -553,6 +611,7 @@ export default {
|
|||||||
uploadSuccess(res) { // 上传成功回调
|
uploadSuccess(res) { // 上传成功回调
|
||||||
if (res[0].result === '1') {
|
if (res[0].result === '1') {
|
||||||
this.$message.success('增加成功')
|
this.$message.success('增加成功')
|
||||||
|
this.handleNodeClick()
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
this.$refs.upload.clearFiles()
|
this.$refs.upload.clearFiles()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -11,9 +11,31 @@
|
|||||||
height="800"
|
height="800"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
border>
|
border>
|
||||||
|
<el-table-column align="center" label="照片" width="50">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-popover
|
||||||
|
v-if="scope.row.文件标识 && scope.row.文件标识 !== 'null'"
|
||||||
|
placement="top-start"
|
||||||
|
width="200"
|
||||||
|
trigger="hover">
|
||||||
|
<el-button type="text" style="float:right" @click="deletePhoto(scope.row)">删除</el-button>
|
||||||
|
<el-image :src="scope.row.文件标识 && scope.row.文件标识 !== 'null' ? (readFile + scope.row.文件标识 + '.' + scope.row.文件后缀) : readFile + '123.jpg'">
|
||||||
|
<div slot="error" class="image-slot">
|
||||||
|
<i class="el-icon-picture-outline"/>
|
||||||
|
</div>
|
||||||
|
</el-image>
|
||||||
|
<el-image slot="reference" :src="scope.row.文件标识 && scope.row.文件标识 !== 'null' ? (readFile + scope.row.文件标识 + '.' + scope.row.文件后缀) : readFile + '123.jpg'" style="width:30px;">
|
||||||
|
<div slot="error" class="image-slot">
|
||||||
|
<i class="el-icon-picture-outline"/>
|
||||||
|
</div>
|
||||||
|
</el-image>
|
||||||
|
</el-popover>
|
||||||
|
<span v-else>—</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" label="工位号">
|
<el-table-column align="center" label="工位号">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text">{{ scope.row.工位号 }}</el-button>
|
<el-button type="text" @click="openNew(scope.row.工位号)">{{ scope.row.工位号 }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="登陆人">
|
<el-table-column align="center" label="登陆人">
|
||||||
@@ -31,6 +53,7 @@
|
|||||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
:disabled="scope.row.文件标识 && scope.row.文件标识 !== 'null'"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-picture"
|
icon="el-icon-picture"
|
||||||
@@ -93,9 +116,13 @@
|
|||||||
<script>
|
<script>
|
||||||
import { ANDON_countselect } from '@/api/ManufacturingCenter/AntonMonitoring'
|
import { ANDON_countselect } from '@/api/ManufacturingCenter/AntonMonitoring'
|
||||||
import { wsuri, name1, uploadOP } from '@/utils/request'
|
import { wsuri, name1, uploadOP } from '@/utils/request'
|
||||||
|
import { readFile } from '@/utils/request'
|
||||||
|
import request from '@/utils/request'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
readFile: readFile,
|
||||||
|
limit: 9999,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
timer_ANDON: '',
|
timer_ANDON: '',
|
||||||
andonMsg: '',
|
andonMsg: '',
|
||||||
@@ -117,6 +144,37 @@ export default {
|
|||||||
this.initWebpack()
|
this.initWebpack()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
deletePhoto(row) {
|
||||||
|
this.$confirm('此操作将永久删除该图片, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '4',
|
||||||
|
name: `delete from 设备管理_设备监控_图片 where 工位 = '${row.工位号}'`
|
||||||
|
}
|
||||||
|
}).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.ANDON_countselect()
|
||||||
|
} else {
|
||||||
|
this.$message.error('删除失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '取消删除'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
openNew(val) {
|
||||||
|
window.open(`http://192.168.1.231:8008/#/EquipmentConditionAnalysis?opname=${val}`, '_blank')
|
||||||
|
},
|
||||||
ANDON_countselect() {
|
ANDON_countselect() {
|
||||||
ANDON_countselect().then(response => {
|
ANDON_countselect().then(response => {
|
||||||
this.tableData = response.data
|
this.tableData = response.data
|
||||||
@@ -156,6 +214,7 @@ export default {
|
|||||||
if (res[0].result === '1') {
|
if (res[0].result === '1') {
|
||||||
this.$message.success('增加成功')
|
this.$message.success('增加成功')
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
|
this.ANDON_countselect()
|
||||||
this.$refs.upload.clearFiles()
|
this.$refs.upload.clearFiles()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('增加失败')
|
this.$message.error('增加失败')
|
||||||
|
|||||||
Reference in New Issue
Block a user