打卡设备相关调整
This commit is contained in:
parent
f95fa8a721
commit
58c33d935e
@ -8,3 +8,10 @@ export function listDetail(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function sendPhoto(sn) {
|
||||
return request({
|
||||
url: '/equipment/snDetail/sendPhoto/'+sn,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@ -2,6 +2,11 @@
|
||||
<div class="app-container">
|
||||
<el-table v-loading="loading" :data="detailList">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="设备名称" align="center" prop="sn">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.time_clock" :value="scope.row.sn"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备号" align="center" prop="sn" />
|
||||
<el-table-column label="内部版本号" align="center" prop="versionCode" />
|
||||
<el-table-column label="设备页面版本号" align="center" prop="versionName" />
|
||||
@ -12,6 +17,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备连接状态" align="center" prop="type" />
|
||||
<el-table-column label="操作" align="center" fixed="right" width="150" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-s-promotion"
|
||||
@click="sendPhoto(scope.row)"
|
||||
>下发照片</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -25,10 +40,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listDetail} from "@/api/equipment/snDetail";
|
||||
import { listDetail, sendPhoto} from "@/api/equipment/snDetail";
|
||||
|
||||
export default {
|
||||
name: "SnDetail",
|
||||
dicts: ['time_clock'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@ -62,6 +78,17 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
sendPhoto(row){
|
||||
sendPhoto(row.sn).then(response => {
|
||||
if(response.data){
|
||||
this.$modal.msgSuccess("下发完成");
|
||||
}else{
|
||||
this.$modal.msgError(response.msg);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -41,20 +41,13 @@
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="staffList">
|
||||
<el-table-column label="员工姓名" align="center" prop="staffName" />
|
||||
<el-table-column label="照片地址" align="center" prop="imageUrl" >
|
||||
<el-table-column label="员工照片" align="center" prop="imageUrl" >
|
||||
<template slot-scope="scope">
|
||||
<el-link :href="scope.row.imageUrl" :underline="false" target="_blank">查看图片</el-link>
|
||||
<el-image style="width: 100px; height: 100px" :src="scope.row.imageUrl" :preview-src-list="[scope.row.imageUrl]"></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="uploadDispatching(scope.row)"
|
||||
v-hasPermi="['product:staff:edit']"
|
||||
>上传照片</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -91,25 +84,13 @@
|
||||
<el-button @click="open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 上传员工照片对话框 -->
|
||||
<el-dialog v-dialogDrag :title="title" :visible.sync="openDispatching" width="400px" append-to-body>
|
||||
<el-form ref="forms" :model="form" :rules="rules" label-width="90px">
|
||||
<el-form-item label="员工照片" prop="labler">
|
||||
<input type="file" @change="uploadDispatchings" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="openDispatching=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listStaff, getSpecialOverTime, addOverTime, addStaff, updateStaff, getStaff,delStaff,uploadDispatchingFile } from "@/api/personnelMatters/specialOverTime";
|
||||
import { listStaff, getSpecialOverTime, addOverTime, addStaff, getStaff,delStaff,uploadDispatchingFile } from "@/api/personnelMatters/specialOverTime";
|
||||
import { listStaffAll } from '@/api/system/staff'
|
||||
|
||||
export default {
|
||||
@ -212,24 +193,11 @@ export default {
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateStaff(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
for(var i=0;i<this.staffAllList.length;i++){
|
||||
if(this.staffAllList[i].userId == this.form.userId){
|
||||
this.form.staffName = this.staffAllList[i].name;
|
||||
}
|
||||
}
|
||||
addStaff(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
addStaff(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@ -149,6 +149,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="年龄" align="center" prop="age" />
|
||||
<el-table-column label="电话" align="center" prop="phone" width="110"/>
|
||||
<el-table-column label="员工照片" align="center" prop="imageUrl" width="110">
|
||||
<template slot-scope="scope">
|
||||
<el-image style="width: 100px; height: 100px" :src="scope.row.imageUrl" :preview-src-list="[scope.row.imageUrl]"></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="住址" align="center" show-overflow-tooltip prop="address" />
|
||||
<el-table-column label="毕业学校" align="center" show-overflow-tooltip prop="school" />
|
||||
<el-table-column label="专业" align="center" prop="major" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user