pc端许可证添加图片、更改相关方地图头像、修改相关方项目人员
This commit is contained in:
parent
73d3724e8e
commit
ff4f5bcce4
|
@ -1,22 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="sc-upload-multiple">
|
<div class="sc-upload-multiple">
|
||||||
<el-upload ref="uploader"
|
<el-upload ref="uploader"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
:auto-upload="autoUpload"
|
:auto-upload="autoUpload"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:action="action"
|
:action="action"
|
||||||
:name="name"
|
:name="name"
|
||||||
:data="data"
|
:data="data"
|
||||||
:http-request="request"
|
:http-request="request"
|
||||||
:file-list="defaultFileList"
|
:file-list="defaultFileList"
|
||||||
:show-file-list="showFileList"
|
:show-file-list="showFileList"
|
||||||
:accept="accept"
|
:accept="accept"
|
||||||
multiple=true
|
:multiple="multiple"
|
||||||
:limit="limit"
|
:limit="limit"
|
||||||
:before-upload="before"
|
:before-upload="before"
|
||||||
:on-success="success"
|
:on-success="success"
|
||||||
:on-error="error"
|
:on-error="error"
|
||||||
:on-preview="handlePreview"
|
:on-preview="handlePreview"
|
||||||
:on-exceed="handleExceed">
|
:on-exceed="handleExceed">
|
||||||
<slot>
|
<slot>
|
||||||
<el-icon><el-icon-plus/></el-icon>
|
<el-icon><el-icon-plus/></el-icon>
|
||||||
|
@ -52,37 +52,47 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
modelValue: { },
|
modelValue: { type: [String, Array], default: "" },
|
||||||
tip: { type: String, default: "" },
|
tip: { type: String, default: "" },
|
||||||
action: { type: String, default: "" },
|
action: { type: String, default: "" },
|
||||||
apiObj: { type: Object, default: () => {} },
|
apiObj: { type: Object, default: () => {} },
|
||||||
data: { type: Object, default: () => {} },
|
|
||||||
name: { type: String, default: config.filename },
|
name: { type: String, default: config.filename },
|
||||||
limit: { type: Number, default: 9 },
|
data: { type: Object, default: () => {} },
|
||||||
|
accept: { type: String, default: "image/gif, image/jpeg, image/png" },
|
||||||
|
maxSize: { type: Number, default: config.maxSizeFile },
|
||||||
|
limit: { type: Number, default: 0 },
|
||||||
autoUpload: { type: Boolean, default: true },
|
autoUpload: { type: Boolean, default: true },
|
||||||
showFileList: { type: Boolean, default: true },
|
showFileList: { type: Boolean, default: true },
|
||||||
multiple: { type: Boolean, default: true },
|
multiple: { type: Boolean, default: true },
|
||||||
disabled: { type: Boolean, default: false },
|
disabled: { type: Boolean, default: false },
|
||||||
onSuccess: { type: Function, default: () => { return true } },
|
onSuccess: { type: Function, default: () => { return true } }
|
||||||
maxSize: { type: Number, default: config.maxSizeFile },
|
|
||||||
accept: { type: String, default: "image/gif, image/jpeg, image/png" },
|
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
value: "",
|
value: "",
|
||||||
defaultFileList: []//图片数组[{name:'',url:''}]
|
defaultFileList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
modelValue(val){
|
modelValue(val){
|
||||||
if (val != this.toStr(this.defaultFileList)) {
|
if(Array.isArray(val)){
|
||||||
this.defaultFileList = this.toArr(val)
|
if (JSON.stringify(val) != JSON.stringify(this.formatArr(this.defaultFileList))) {
|
||||||
this.value = val
|
this.defaultFileList = val
|
||||||
|
this.value = val
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if (val != this.toStr(this.defaultFileList)) {
|
||||||
|
this.defaultFileList = this.toArr(val)
|
||||||
|
this.value = val
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
defaultFileList: {
|
defaultFileList: {
|
||||||
handler(val){
|
handler(val){
|
||||||
this.$emit('update:modelValue', this.toStr(val))
|
// debugger;
|
||||||
|
// console.log(val)
|
||||||
|
// console.log(this.modelValue)
|
||||||
|
this.$emit('update:modelValue', Array.isArray(this.modelValue) ? this.formatArr(val) : this.toStr(val))
|
||||||
this.value = this.toStr(val)
|
this.value = this.toStr(val)
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
|
@ -94,17 +104,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
//处理传过来的图片地址
|
||||||
this.defaultFileList = this.modelValue//数组,图片ids
|
this.defaultFileList = Array.isArray(this.modelValue) ? this.modelValue : this.toArr(this.modelValue)
|
||||||
console.log(this.modelValue);
|
this.value = this.modelValue
|
||||||
if(this.modelValue.length>0){
|
|
||||||
this.modelValue.forEach(item=>{
|
|
||||||
|
|
||||||
})
|
|
||||||
// this.value.push()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//默认值转换为数组
|
//默认值转换为数组
|
||||||
|
@ -127,20 +129,18 @@
|
||||||
toStr(arr){
|
toStr(arr){
|
||||||
return arr.map(v => v.url).join(",")
|
return arr.map(v => v.url).join(",")
|
||||||
},
|
},
|
||||||
//拖拽
|
//格式化数组值
|
||||||
rowDrop(){
|
formatArr(arr){
|
||||||
const _this = this
|
var _arr = []
|
||||||
const itemBox = this.$refs.uploader.$el.querySelector('.el-upload-list')
|
arr.forEach(item => {
|
||||||
Sortable.create(itemBox, {
|
if(item){
|
||||||
handle: ".el-upload-list__item",
|
_arr.push({
|
||||||
animation: 200,
|
name: item.name,
|
||||||
ghostClass: "ghost",
|
url: item.url
|
||||||
onEnd({ newIndex, oldIndex }) {
|
})
|
||||||
const tableData = _this.defaultFileList
|
|
||||||
const currRow = tableData.splice(oldIndex, 1)[0]
|
|
||||||
tableData.splice(newIndex, 0, currRow)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
return _arr
|
||||||
},
|
},
|
||||||
before(file){
|
before(file){
|
||||||
if(!['image/jpeg','image/png','image/gif'].includes(file.type)){
|
if(!['image/jpeg','image/png','image/gif'].includes(file.type)){
|
||||||
|
@ -153,19 +153,22 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
success(res, file , fileList){
|
success(res, file,fileList){
|
||||||
debugger;
|
let ids = [];
|
||||||
|
for(let i = 0;i<fileList.length;i++){
|
||||||
|
if(fileList[i].response!==undefined){
|
||||||
|
ids.push(fileList[i].response.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$emit('imagesChange', ids)
|
||||||
var os = this.onSuccess(res, file)
|
var os = this.onSuccess(res, file)
|
||||||
console.log(os)
|
|
||||||
if(os!=undefined && os==false){
|
if(os!=undefined && os==false){
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
var response = config.parseData(res)
|
var response = config.parseData(res)
|
||||||
file.url = response.src;
|
file.name = response.fileName
|
||||||
file.name = response.fileName;
|
file.url = response.src
|
||||||
this.$emit('uploadSuccess',fileList);
|
|
||||||
this.value = this.value+','+res.id;
|
|
||||||
|
|
||||||
},
|
},
|
||||||
error(err){
|
error(err){
|
||||||
this.$notify.error({
|
this.$notify.error({
|
||||||
|
@ -174,6 +177,8 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
beforeRemove(uploadFile){
|
beforeRemove(uploadFile){
|
||||||
|
debugger;
|
||||||
|
console.log(uploadFile)
|
||||||
return this.$confirm(`是否移除 ${uploadFile.name} ?`, '提示', {
|
return this.$confirm(`是否移除 ${uploadFile.name} ?`, '提示', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
@ -183,8 +188,22 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleRemove(file){
|
handleRemove(file){
|
||||||
this.$refs.uploader.handleRemove(file)
|
let list = this.defaultFileList;
|
||||||
//this.defaultFileList.splice(this.defaultFileList.findIndex(item => item.uid===file.uid), 1)
|
for(let i=0;i<list.length;i++){
|
||||||
|
if(list[i].response!==undefined){
|
||||||
|
if(list[i].response.path===file.url){
|
||||||
|
this.$emit('imagesDel', i)
|
||||||
|
this.$refs.uploader.handleRemove(file);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(list[i].url===file.url){
|
||||||
|
this.$emit('imagesDel', i)
|
||||||
|
this.$refs.uploader.handleRemove(file);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleExceed(){
|
handleExceed(){
|
||||||
this.$message.warning(`当前设置最多上传 ${this.limit} 个文件,请移除后上传!`)
|
this.$message.warning(`当前设置最多上传 ${this.limit} 个文件,请移除后上传!`)
|
||||||
|
@ -208,13 +227,14 @@
|
||||||
param.onProgress({percent: complete})
|
param.onProgress({percent: complete})
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
config.parseData(res);
|
var response = config.parseData(res);
|
||||||
// return {
|
console.log(res)
|
||||||
// fileName: res.name,//分析文件名称
|
console.log(response)
|
||||||
// src: res.path,//分析图片远程地址结构
|
if(res.id){
|
||||||
// }
|
param.onSuccess(res)
|
||||||
param.onSuccess(res)
|
}else{
|
||||||
debugger;
|
param.onError(response.msg || "未知错误")
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
param.onError(err)
|
param.onError(err)
|
||||||
})
|
})
|
||||||
|
|
|
@ -1776,7 +1776,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
//摄像头
|
//摄像头Marker
|
||||||
showCameraMarkers(list) {
|
showCameraMarkers(list) {
|
||||||
// debugger;
|
// debugger;
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -1815,7 +1815,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
//喇叭
|
//喇叭Marker
|
||||||
showSpeakersMarkers(list) {
|
showSpeakersMarkers(list) {
|
||||||
let that = this;
|
let that = this;
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
|
@ -1848,7 +1848,7 @@ export default {
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
//人员
|
//人员Marker
|
||||||
showUserMarkers(userList) {
|
showUserMarkers(userList) {
|
||||||
// debugger;
|
// debugger;
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -1862,9 +1862,9 @@ export default {
|
||||||
if (employeeType === 'employee') {
|
if (employeeType === 'employee') {
|
||||||
userImage = "/img/employee.png"
|
userImage = "/img/employee.png"
|
||||||
}else if (employeeType === 'driver') {
|
}else if (employeeType === 'driver') {
|
||||||
userImage = "/img/visitor.png"
|
userImage = "/img/driver.png"
|
||||||
} else if (employeeType === 'remployee') {
|
} else if (employeeType === 'remployee') {
|
||||||
userImage = "/img/employee.png"
|
userImage = "/img/driver.png"
|
||||||
}else {
|
}else {
|
||||||
userImage = "/img/visitor.png"
|
userImage = "/img/visitor.png"
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,6 +164,11 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="作业前照片">
|
||||||
|
<sc-upload-multiple v-model="fileurl2" @imagesDel="imagesDel" @imagesChange="imagesChange" draggable :limit="9" tip="最多上传9个文件,单个文件不要超过10M,请上传图像格式文件"></sc-upload-multiple>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin-bottom: 20px; text-align:center">
|
<div style="margin-bottom: 20px; text-align:center">
|
||||||
|
@ -526,6 +531,7 @@
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
fileurl2: "",
|
||||||
active: 0,
|
active: 0,
|
||||||
stepSuc: [0],
|
stepSuc: [0],
|
||||||
stepTitle: ["基本信息", "作业人员", "气体检测记录"],
|
stepTitle: ["基本信息", "作业人员", "气体检测记录"],
|
||||||
|
@ -645,6 +651,11 @@
|
||||||
getData() {
|
getData() {
|
||||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||||
this.form = res;
|
this.form = res;
|
||||||
|
let imgsLset =[];
|
||||||
|
for(let i=0;i<res.create_imgs_.length;i++){
|
||||||
|
imgsLset.push(res.create_imgs_[i].path)
|
||||||
|
}
|
||||||
|
this.fileurl2 =imgsLset.join(",");
|
||||||
this.oplId = res.id;
|
this.oplId = res.id;
|
||||||
this.oplcateId = res.cate;
|
this.oplcateId = res.cate;
|
||||||
this.operationId = res.operation;
|
this.operationId = res.operation;
|
||||||
|
@ -695,6 +706,18 @@
|
||||||
this.active = 0;
|
this.active = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesChange(data){
|
||||||
|
if(this.form.create_imgs){
|
||||||
|
this.form.create_imgs = this.form.create_imgs.concat(data);
|
||||||
|
}else{
|
||||||
|
this.form.create_imgs = data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesDel(index){
|
||||||
|
this.form.create_imgs.splice(index,1)
|
||||||
|
},
|
||||||
//组件点击下一步
|
//组件点击下一步
|
||||||
handleNextStep() {
|
handleNextStep() {
|
||||||
|
|
||||||
|
|
|
@ -163,6 +163,11 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="作业前照片">
|
||||||
|
<sc-upload-multiple v-model="fileurl2" @imagesDel="imagesDel" @imagesChange="imagesChange" draggable :limit="9" tip="最多上传9个文件,单个文件不要超过10M,请上传图像格式文件"></sc-upload-multiple>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin-bottom: 20px; text-align:center">
|
<div style="margin-bottom: 20px; text-align:center">
|
||||||
|
@ -525,6 +530,7 @@
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
fileurl2: "",
|
||||||
active: 0,
|
active: 0,
|
||||||
stepSuc: [0],
|
stepSuc: [0],
|
||||||
stepTitle: ["基本信息", "作业人员", "气体检测记录"],
|
stepTitle: ["基本信息", "作业人员", "气体检测记录"],
|
||||||
|
@ -643,6 +649,11 @@
|
||||||
getData() {
|
getData() {
|
||||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||||
this.form = res;
|
this.form = res;
|
||||||
|
let imgsLset =[];
|
||||||
|
for(let i=0;i<res.create_imgs_.length;i++){
|
||||||
|
imgsLset.push(res.create_imgs_[i].path)
|
||||||
|
}
|
||||||
|
this.fileurl2 =imgsLset.join(",");
|
||||||
this.oplId = res.id;
|
this.oplId = res.id;
|
||||||
this.oplcateId = res.cate;
|
this.oplcateId = res.cate;
|
||||||
this.operationId = res.operation;
|
this.operationId = res.operation;
|
||||||
|
@ -693,6 +704,18 @@
|
||||||
this.active = 0;
|
this.active = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesChange(data){
|
||||||
|
if(this.form.create_imgs){
|
||||||
|
this.form.create_imgs = this.form.create_imgs.concat(data);
|
||||||
|
}else{
|
||||||
|
this.form.create_imgs = data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesDel(index){
|
||||||
|
this.form.create_imgs.splice(index,1)
|
||||||
|
},
|
||||||
//组件点击下一步
|
//组件点击下一步
|
||||||
handleNextStep() {
|
handleNextStep() {
|
||||||
if (this.active == 0) {
|
if (this.active == 0) {
|
||||||
|
|
|
@ -176,6 +176,11 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="作业前照片">
|
||||||
|
<sc-upload-multiple v-model="fileurl2" @imagesDel="imagesDel" @imagesChange="imagesChange" draggable :limit="9" tip="最多上传9个文件,单个文件不要超过10M,请上传图像格式文件"></sc-upload-multiple>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin-bottom: 20px; text-align:center">
|
<div style="margin-bottom: 20px; text-align:center">
|
||||||
|
@ -538,6 +543,7 @@
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
fileurl2: "",
|
||||||
active: 0,
|
active: 0,
|
||||||
stepSuc: [0],
|
stepSuc: [0],
|
||||||
stepTitle: ["基本信息", "作业人员", "气体检测记录"],
|
stepTitle: ["基本信息", "作业人员", "气体检测记录"],
|
||||||
|
@ -656,6 +662,11 @@
|
||||||
getData() {
|
getData() {
|
||||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||||
this.form = res;
|
this.form = res;
|
||||||
|
let imgsLset =[];
|
||||||
|
for(let i=0;i<res.create_imgs_.length;i++){
|
||||||
|
imgsLset.push(res.create_imgs_[i].path)
|
||||||
|
}
|
||||||
|
this.fileurl2 =imgsLset.join(",");
|
||||||
this.oplId = res.id;
|
this.oplId = res.id;
|
||||||
this.oplcateId = res.cate;
|
this.oplcateId = res.cate;
|
||||||
this.operationId = res.operation;
|
this.operationId = res.operation;
|
||||||
|
@ -706,6 +717,18 @@
|
||||||
this.active = 0;
|
this.active = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesChange(data){
|
||||||
|
if(this.form.create_imgs){
|
||||||
|
this.form.create_imgs = this.form.create_imgs.concat(data);
|
||||||
|
}else{
|
||||||
|
this.form.create_imgs = data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesDel(index){
|
||||||
|
this.form.create_imgs.splice(index,1)
|
||||||
|
},
|
||||||
//组件点击下一步
|
//组件点击下一步
|
||||||
handleNextStep() {
|
handleNextStep() {
|
||||||
|
|
||||||
|
|
|
@ -172,6 +172,11 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="作业前照片">
|
||||||
|
<sc-upload-multiple v-model="fileurl2" @imagesDel="imagesDel" @imagesChange="imagesChange" draggable :limit="9" tip="最多上传9个文件,单个文件不要超过10M,请上传图像格式文件"></sc-upload-multiple>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin-bottom: 20px; text-align:center">
|
<div style="margin-bottom: 20px; text-align:center">
|
||||||
|
@ -364,6 +369,7 @@
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
fileurl2: "",
|
||||||
active: 0,
|
active: 0,
|
||||||
stepSuc: [0],
|
stepSuc: [0],
|
||||||
stepTitle: ["基本信息", "作业人员"],
|
stepTitle: ["基本信息", "作业人员"],
|
||||||
|
@ -483,6 +489,11 @@
|
||||||
getData() {
|
getData() {
|
||||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||||
this.form = res;
|
this.form = res;
|
||||||
|
let imgsLset =[];
|
||||||
|
for(let i=0;i<res.create_imgs_.length;i++){
|
||||||
|
imgsLset.push(res.create_imgs_[i].path)
|
||||||
|
}
|
||||||
|
this.fileurl2 =imgsLset.join(",");
|
||||||
this.oplId = res.id;
|
this.oplId = res.id;
|
||||||
this.oplcateId = res.cate;
|
this.oplcateId = res.cate;
|
||||||
this.operationId = res.operation;
|
this.operationId = res.operation;
|
||||||
|
@ -531,6 +542,18 @@
|
||||||
this.active = 0;
|
this.active = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesChange(data){
|
||||||
|
if(this.form.create_imgs){
|
||||||
|
this.form.create_imgs = this.form.create_imgs.concat(data);
|
||||||
|
}else{
|
||||||
|
this.form.create_imgs = data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesDel(index){
|
||||||
|
this.form.create_imgs.splice(index,1)
|
||||||
|
},
|
||||||
//组件点击下一步
|
//组件点击下一步
|
||||||
handleNextStep() {
|
handleNextStep() {
|
||||||
if (this.active == 0) {
|
if (this.active == 0) {
|
||||||
|
|
|
@ -172,6 +172,11 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="作业前照片">
|
||||||
|
<sc-upload-multiple v-model="fileurl2" @imagesDel="imagesDel" @imagesChange="imagesChange" draggable :limit="9" tip="最多上传9个文件,单个文件不要超过10M,请上传图像格式文件"></sc-upload-multiple>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin-bottom: 20px; text-align:center">
|
<div style="margin-bottom: 20px; text-align:center">
|
||||||
|
@ -364,6 +369,7 @@
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
fileurl2: "",
|
||||||
active: 0,
|
active: 0,
|
||||||
stepSuc: [0],
|
stepSuc: [0],
|
||||||
stepTitle: ["基本信息", "作业人员"],
|
stepTitle: ["基本信息", "作业人员"],
|
||||||
|
@ -482,6 +488,11 @@
|
||||||
getData() {
|
getData() {
|
||||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||||
this.form = res;
|
this.form = res;
|
||||||
|
let imgsLset =[];
|
||||||
|
for(let i=0;i<res.create_imgs_.length;i++){
|
||||||
|
imgsLset.push(res.create_imgs_[i].path)
|
||||||
|
}
|
||||||
|
this.fileurl2 =imgsLset.join(",");
|
||||||
this.oplId = res.id;
|
this.oplId = res.id;
|
||||||
this.oplcateId = res.cate;
|
this.oplcateId = res.cate;
|
||||||
this.operationId = res.operation;
|
this.operationId = res.operation;
|
||||||
|
@ -532,6 +543,18 @@
|
||||||
this.active = 0;
|
this.active = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesChange(data){
|
||||||
|
if(this.form.create_imgs){
|
||||||
|
this.form.create_imgs = this.form.create_imgs.concat(data);
|
||||||
|
}else{
|
||||||
|
this.form.create_imgs = data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesDel(index){
|
||||||
|
this.form.create_imgs.splice(index,1)
|
||||||
|
},
|
||||||
//组件点击下一步
|
//组件点击下一步
|
||||||
handleNextStep() {
|
handleNextStep() {
|
||||||
|
|
||||||
|
|
|
@ -138,8 +138,8 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="24" :sm="12" :xs="24">
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
<el-form-item label="作业前照片" prop="measures_checked">
|
<el-form-item label="作业前照片">
|
||||||
<sc-Upload-Multiple @uploadSuccess="uploadSuccess" v-model="create_imgs" :modelValue="imgList" title="证件照"></sc-Upload-Multiple>
|
<sc-upload-multiple v-model="fileurl2" @imagesDel="imagesDel" @imagesChange="imagesChange" draggable :limit="9" tip="最多上传9个文件,单个文件不要超过10M,请上传图像格式文件"></sc-upload-multiple>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -333,6 +333,7 @@
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
fileurl2: "",
|
||||||
active: 0,
|
active: 0,
|
||||||
stepSuc: [0],
|
stepSuc: [0],
|
||||||
stepTitle: ["基本信息", "作业人员"],
|
stepTitle: ["基本信息", "作业人员"],
|
||||||
|
@ -465,6 +466,11 @@
|
||||||
getData() {
|
getData() {
|
||||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||||
this.form = res;
|
this.form = res;
|
||||||
|
let imgsLset =[];
|
||||||
|
for(let i=0;i<res.create_imgs_.length;i++){
|
||||||
|
imgsLset.push(res.create_imgs_[i].path)
|
||||||
|
}
|
||||||
|
this.fileurl2 =imgsLset.join(",");
|
||||||
this.oplId = res.id;
|
this.oplId = res.id;
|
||||||
this.oplcateId = res.cate;
|
this.oplcateId = res.cate;
|
||||||
this.operationId = res.operation;
|
this.operationId = res.operation;
|
||||||
|
@ -515,6 +521,18 @@
|
||||||
this.active = 0;
|
this.active = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesChange(data){
|
||||||
|
if(this.form.create_imgs){
|
||||||
|
this.form.create_imgs = this.form.create_imgs.concat(data);
|
||||||
|
}else{
|
||||||
|
this.form.create_imgs = data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesDel(index){
|
||||||
|
this.form.create_imgs.splice(index,1)
|
||||||
|
},
|
||||||
//组件点击下一步
|
//组件点击下一步
|
||||||
handleNextStep() {
|
handleNextStep() {
|
||||||
// debugger;
|
// debugger;
|
||||||
|
|
|
@ -161,6 +161,11 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="作业前照片">
|
||||||
|
<sc-upload-multiple v-model="fileurl2" @imagesDel="imagesDel" @imagesChange="imagesChange" draggable :limit="9" tip="最多上传9个文件,单个文件不要超过10M,请上传图像格式文件"></sc-upload-multiple>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin-bottom: 20px; text-align:center">
|
<div style="margin-bottom: 20px; text-align:center">
|
||||||
|
@ -352,6 +357,7 @@
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
fileurl2: "",
|
||||||
active: 0,
|
active: 0,
|
||||||
stepSuc: [0],
|
stepSuc: [0],
|
||||||
stepTitle: ["基本信息", "作业人员"],
|
stepTitle: ["基本信息", "作业人员"],
|
||||||
|
@ -465,6 +471,11 @@
|
||||||
getData() {
|
getData() {
|
||||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||||
this.form = res;
|
this.form = res;
|
||||||
|
let imgsLset =[];
|
||||||
|
for(let i=0;i<res.create_imgs_.length;i++){
|
||||||
|
imgsLset.push(res.create_imgs_[i].path)
|
||||||
|
}
|
||||||
|
this.fileurl2 =imgsLset.join(",");
|
||||||
this.oplId = res.id;
|
this.oplId = res.id;
|
||||||
this.oplcateId = res.cate;
|
this.oplcateId = res.cate;
|
||||||
this.operationId = res.operation;
|
this.operationId = res.operation;
|
||||||
|
@ -515,6 +526,18 @@
|
||||||
this.active = 0;
|
this.active = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesChange(data){
|
||||||
|
if(this.form.create_imgs){
|
||||||
|
this.form.create_imgs = this.form.create_imgs.concat(data);
|
||||||
|
}else{
|
||||||
|
this.form.create_imgs = data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesDel(index){
|
||||||
|
this.form.create_imgs.splice(index,1)
|
||||||
|
},
|
||||||
//组件点击下一步
|
//组件点击下一步
|
||||||
handleNextStep() {
|
handleNextStep() {
|
||||||
|
|
||||||
|
|
|
@ -85,12 +85,12 @@
|
||||||
v-model="form.dept_do"
|
v-model="form.dept_do"
|
||||||
:options="deptoptions"
|
:options="deptoptions"
|
||||||
:props="{
|
:props="{
|
||||||
expandTrigger: 'hover', // 次级菜单的展开方式
|
expandTrigger: 'hover', // 次级菜单的展开方式
|
||||||
label: 'label', //
|
label: 'label', //
|
||||||
value: 'value', //
|
value: 'value', //
|
||||||
emitPath: false, // 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值
|
emitPath: false, // 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值
|
||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
}"
|
}"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -161,10 +161,10 @@
|
||||||
<el-col :md="24" :sm="12" :xs="24">
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
<el-card header="应急处置">
|
<el-card header="应急处置">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>1、管线被破坏时,应立即停止作业并报告相关部门,现场设置紧急隔离线,保护现场等待抢修。</p>
|
<p>1、管线被破坏时,应立即停止作业并报告相关部门,现场设置紧急隔离线,保护现场等待抢修。</p>
|
||||||
<p>2、发生人员受伤时应立即组织救援,救援过程中应避免二次伤害,根据伤情送医或拨打120。</p>
|
<p>2、发生人员受伤时应立即组织救援,救援过程中应避免二次伤害,根据伤情送医或拨打120。</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-form-item label="其他应急处置">
|
<el-form-item label="其他应急处置">
|
||||||
<el-input
|
<el-input
|
||||||
|
@ -174,6 +174,11 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="作业前照片">
|
||||||
|
<sc-upload-multiple v-model="fileurl2" @imagesDel="imagesDel" @imagesChange="imagesChange" draggable :limit="9" tip="最多上传9个文件,单个文件不要超过10M,请上传图像格式文件"></sc-upload-multiple>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin-bottom: 20px; text-align:center">
|
<div style="margin-bottom: 20px; text-align:center">
|
||||||
|
@ -357,15 +362,16 @@
|
||||||
opl: "",
|
opl: "",
|
||||||
};
|
};
|
||||||
const defaultformgas = {
|
const defaultformgas = {
|
||||||
id: "",
|
id: "",
|
||||||
check_time: null,
|
check_time: null,
|
||||||
opl:""
|
opl:""
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
name: "fire",
|
name: "fire",
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
fileurl2: "",
|
||||||
active: 0,
|
active: 0,
|
||||||
stepSuc: [0],
|
stepSuc: [0],
|
||||||
stepTitle: ["基本信息", "作业人员"],
|
stepTitle: ["基本信息", "作业人员"],
|
||||||
|
@ -389,9 +395,9 @@
|
||||||
oplcateCode: "",
|
oplcateCode: "",
|
||||||
oplId: "",
|
oplId: "",
|
||||||
leveloptions: [
|
leveloptions: [
|
||||||
{ id: "主干道", name: "主干道" },
|
{ id: "主干道", name: "主干道" },
|
||||||
{ id: "次干渠", name: "次干渠" }
|
{ id: "次干渠", name: "次干渠" }
|
||||||
],
|
],
|
||||||
deptoptions: [],
|
deptoptions: [],
|
||||||
useroptions: [],
|
useroptions: [],
|
||||||
risklist: [],
|
risklist: [],
|
||||||
|
@ -483,6 +489,11 @@
|
||||||
getData() {
|
getData() {
|
||||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||||
this.form = res;
|
this.form = res;
|
||||||
|
let imgsLset =[];
|
||||||
|
for(let i=0;i<res.create_imgs_.length;i++){
|
||||||
|
imgsLset.push(res.create_imgs_[i].path)
|
||||||
|
}
|
||||||
|
this.fileurl2 =imgsLset.join(",");
|
||||||
this.oplId = res.id;
|
this.oplId = res.id;
|
||||||
this.oplcateId = res.cate;
|
this.oplcateId = res.cate;
|
||||||
this.operationId = res.operation;
|
this.operationId = res.operation;
|
||||||
|
@ -533,6 +544,21 @@
|
||||||
this.active = 0;
|
this.active = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
imagesChange(data){
|
||||||
|
// debugger;
|
||||||
|
// console.log(data)
|
||||||
|
//合并新增的图片Ids
|
||||||
|
if(this.form.create_imgs){
|
||||||
|
this.form.create_imgs = this.form.create_imgs.concat(data);
|
||||||
|
}else{
|
||||||
|
this.form.create_imgs = data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
imagesDel(index){
|
||||||
|
//合并新增的图片Ids
|
||||||
|
this.form.create_imgs.splice(index,1)
|
||||||
|
//console.log(this.form.create_imgs)
|
||||||
|
},
|
||||||
//组件点击下一步
|
//组件点击下一步
|
||||||
handleNextStep() {
|
handleNextStep() {
|
||||||
|
|
||||||
|
@ -542,10 +568,10 @@
|
||||||
this.issave = true; //如果是创建许可证书
|
this.issave = true; //如果是创建许可证书
|
||||||
if (this.oplId == "") {
|
if (this.oplId == "") {
|
||||||
//基本信息提交
|
//基本信息提交
|
||||||
debugger;
|
// debugger;
|
||||||
this.form.cate = this.oplcateId;
|
this.form.cate = this.oplcateId;
|
||||||
this.form.operation = this.operationId;
|
this.form.operation = this.operationId;
|
||||||
console.log(this.form);
|
// console.log(this.form);
|
||||||
this.$API.opm.opl.create
|
this.$API.opm.opl.create
|
||||||
.req(this.form)
|
.req(this.form)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
@ -595,7 +621,7 @@
|
||||||
getworkerList() {
|
getworkerList() {
|
||||||
this.$API.opm.worker.list.req({opl: this.oplId, page: 0}).then((res) => {
|
this.$API.opm.worker.list.req({opl: this.oplId, page: 0}).then((res) => {
|
||||||
this.apiworkerObj = res;
|
this.apiworkerObj = res;
|
||||||
console.log(res);
|
// console.log(res);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//创建作业人员,显示Form
|
//创建作业人员,显示Form
|
||||||
|
|
|
@ -179,6 +179,11 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="作业前照片">
|
||||||
|
<sc-upload-multiple v-model="fileurl2" @imagesDel="imagesDel" @imagesChange="imagesChange" draggable :limit="9" tip="最多上传9个文件,单个文件不要超过10M,请上传图像格式文件"></sc-upload-multiple>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin-bottom: 20px; text-align:center">
|
<div style="margin-bottom: 20px; text-align:center">
|
||||||
|
@ -618,7 +623,8 @@
|
||||||
measures_checked: [
|
measures_checked: [
|
||||||
{required: true, message: '请选择'}
|
{required: true, message: '请选择'}
|
||||||
],
|
],
|
||||||
}
|
},
|
||||||
|
fileurl2: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -660,6 +666,11 @@
|
||||||
getData() {
|
getData() {
|
||||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||||
this.form = res;
|
this.form = res;
|
||||||
|
let imgsLset =[];
|
||||||
|
for(let i=0;i<res.create_imgs_.length;i++){
|
||||||
|
imgsLset.push(res.create_imgs_[i].path)
|
||||||
|
}
|
||||||
|
this.fileurl2 =imgsLset.join(",");
|
||||||
this.oplId = res.id;
|
this.oplId = res.id;
|
||||||
this.oplcateId = res.cate;
|
this.oplcateId = res.cate;
|
||||||
this.operationId = res.operation;
|
this.operationId = res.operation;
|
||||||
|
@ -710,6 +721,23 @@
|
||||||
this.active = 0;
|
this.active = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
imagesChange(data){
|
||||||
|
debugger;
|
||||||
|
console.log(this.form.create_imgs)
|
||||||
|
console.log(data)
|
||||||
|
//合并新增的图片Ids
|
||||||
|
if(this.form.create_imgs){
|
||||||
|
this.form.create_imgs = this.form.create_imgs.concat(data);
|
||||||
|
}else{
|
||||||
|
this.form.create_imgs = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
imagesDel(index){
|
||||||
|
//合并新增的图片Ids
|
||||||
|
this.form.create_imgs.splice(index,1)
|
||||||
|
//console.log(this.form.create_imgs)
|
||||||
|
},
|
||||||
//组件点击下一步
|
//组件点击下一步
|
||||||
handleNextStep() {
|
handleNextStep() {
|
||||||
if (this.active == 0) {
|
if (this.active == 0) {
|
||||||
|
|
|
@ -232,6 +232,11 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="作业前照片">
|
||||||
|
<sc-upload-multiple v-model="fileurl2" @imagesDel="imagesDel" @imagesChange="imagesChange" draggable :limit="9" tip="最多上传9个文件,单个文件不要超过10M,请上传图像格式文件"></sc-upload-multiple>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin-bottom: 20px; text-align:center">
|
<div style="margin-bottom: 20px; text-align:center">
|
||||||
|
@ -413,7 +418,7 @@ export default {
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
fileurl2: "",
|
||||||
active: 0,
|
active: 0,
|
||||||
stepSuc: [0],
|
stepSuc: [0],
|
||||||
stepTitle: ["基本信息", "作业人员"],
|
stepTitle: ["基本信息", "作业人员"],
|
||||||
|
@ -522,7 +527,11 @@ export default {
|
||||||
getData() {
|
getData() {
|
||||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||||
this.form = res;
|
this.form = res;
|
||||||
|
let imgsLset =[];
|
||||||
|
for(let i=0;i<res.create_imgs_.length;i++){
|
||||||
|
imgsLset.push(res.create_imgs_[i].path)
|
||||||
|
}
|
||||||
|
this.fileurl2 =imgsLset.join(",");
|
||||||
this.oplcateId = res.cate;
|
this.oplcateId = res.cate;
|
||||||
this.operationId = res.operation;
|
this.operationId = res.operation;
|
||||||
this.getOperation();
|
this.getOperation();
|
||||||
|
@ -575,6 +584,18 @@ export default {
|
||||||
this.active = 0;
|
this.active = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesChange(data){
|
||||||
|
if(this.form.create_imgs){
|
||||||
|
this.form.create_imgs = this.form.create_imgs.concat(data);
|
||||||
|
}else{
|
||||||
|
this.form.create_imgs = data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//合并新增的图片Ids
|
||||||
|
imagesDel(index){
|
||||||
|
this.form.create_imgs.splice(index,1)
|
||||||
|
},
|
||||||
//组件点击下一步
|
//组件点击下一步
|
||||||
handleNextStep() {
|
handleNextStep() {
|
||||||
if (this.active == 0) {
|
if (this.active == 0) {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-button type="primary" size="small"
|
<el-button type="primary" size="small"
|
||||||
v-if="form.state==30||form.state==40"
|
v-if="form.state==30||form.state==40"
|
||||||
@click="addWorker()">添加成员
|
@click="addWorker('add')">添加成员
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top:8px" shadow="hover">
|
<el-card style="margin-top:8px" shadow="hover">
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<el-table-column label="工作职责" prop="duty" width="100"></el-table-column>
|
<el-table-column label="工作职责" prop="duty" width="100"></el-table-column>
|
||||||
<el-table-column label="证书" prop="rcertificates">
|
<el-table-column label="证书" prop="rcertificates">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-for="cer in scope.row.certificates_" :key="cer.id">{{cer.name}}-{{cer.number }}/</span>
|
<span v-for="cer in scope.row.rcertificates_" :key="cer.id">{{cer.name}}-{{cer.number}}/</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="负责人" prop="is_manager" width="80">
|
<el-table-column label="负责人" prop="is_manager" width="80">
|
||||||
|
@ -59,8 +59,12 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" prop="note" width="100"></el-table-column>
|
<el-table-column label="备注" prop="note" width="100"></el-table-column>
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<el-button link type="primary" size="small"
|
||||||
|
v-if="form.state!==50&&form.state!==60"
|
||||||
|
@click="addWorker('edit',scope.row)" v-auth="'blt_bind.create'">编辑
|
||||||
|
</el-button>
|
||||||
<el-button link v-if="scope.row.blt_ == null&&(form.state==30||form.state==40)" type="primary" size="small"
|
<el-button link v-if="scope.row.blt_ == null&&(form.state==30||form.state==40)" type="primary" size="small"
|
||||||
@click="bindCard(scope.row, 10)" v-auth="'blt_bind.create'">绑卡
|
@click="bindCard(scope.row, 10)" v-auth="'blt_bind.create'">绑卡
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -112,12 +116,14 @@
|
||||||
<el-button type="primary" @click="preLeave" :loading="btnloading" :disabled="btnloading">确 定</el-button>
|
<el-button type="primary" @click="preLeave" :loading="btnloading" :disabled="btnloading">确 定</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog v-model="workerVisible" title="添加项目成员">
|
<!-- 人员添加编辑 -->
|
||||||
|
<el-dialog v-model="workerVisible" :title="workDialogTitle">
|
||||||
<el-form ref="workerForm" :model="formworker" label-width="120px">
|
<el-form ref="workerForm" :model="formworker" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="24" :sm="12" :xs="24">
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
<el-form-item label="项目成员">
|
<el-form-item label="项目成员">
|
||||||
<el-select
|
<el-select
|
||||||
|
v-if="workDialogType=='add'"
|
||||||
v-model="formworker.remployee"
|
v-model="formworker.remployee"
|
||||||
@change="selectWorker"
|
@change="selectWorker"
|
||||||
filterable
|
filterable
|
||||||
|
@ -130,11 +136,12 @@
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<el-input v-else v-model="formworker.remployee_name" type="text" disabled style="width:200px"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="24" :sm="12" :xs="24">
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
<el-form-item label="是否项目负责人">
|
<el-form-item label="是否项目负责人">
|
||||||
<el-radio-group v-model="formworker.is_manager">
|
<el-radio-group v-model="formworker.is_manager" :disabled="workDialogType=='edit'">
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-radio :label="true">是</el-radio>
|
||||||
<el-radio :label="false">否</el-radio>
|
<el-radio :label="false">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
@ -143,6 +150,7 @@
|
||||||
<el-col :md="24" :sm="12" :xs="24">
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
<el-form-item label="工作职责">
|
<el-form-item label="工作职责">
|
||||||
<el-input
|
<el-input
|
||||||
|
:disabled="workDialogType=='edit'"
|
||||||
v-model="formworker.duty"
|
v-model="formworker.duty"
|
||||||
type="text"
|
type="text"
|
||||||
clearable
|
clearable
|
||||||
|
@ -168,6 +176,7 @@
|
||||||
<el-col :md="24" :sm="12" :xs="24">
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
<el-form-item label="原因">
|
<el-form-item label="原因">
|
||||||
<el-input
|
<el-input
|
||||||
|
:disabled="workDialogType=='edit'"
|
||||||
v-model="formworker.reason"
|
v-model="formworker.reason"
|
||||||
type="text"
|
type="text"
|
||||||
clearable
|
clearable
|
||||||
|
@ -235,6 +244,8 @@ export default {
|
||||||
remployeeoptions:[],
|
remployeeoptions:[],
|
||||||
reason:"",
|
reason:"",
|
||||||
leaveId:"",
|
leaveId:"",
|
||||||
|
workDialogType:"add",
|
||||||
|
workDialogTitle:"添加项目成员"
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -319,37 +330,69 @@ export default {
|
||||||
this.certificatesOptions = res;
|
this.certificatesOptions = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
addWorker(row){
|
addWorker(type,row){
|
||||||
this.getremployee();
|
let that = this;
|
||||||
this.workerVisible = true;
|
that.workDialogType = type;
|
||||||
|
if(type=='add'){
|
||||||
|
that.workDialogTitle = "添加项目成员";
|
||||||
|
that.getremployee();
|
||||||
|
}else{
|
||||||
|
that.workDialogTitle = "项目成员编辑";
|
||||||
|
that.formworker = row;
|
||||||
|
that.formworker.remployee_name = row.remployee_.name;
|
||||||
|
debugger;
|
||||||
|
console.log(that.formworker)
|
||||||
|
that.selectWorker();
|
||||||
|
}
|
||||||
|
that.workerVisible = true;
|
||||||
},
|
},
|
||||||
//提交作业成员信息
|
//提交作业成员信息
|
||||||
submitWorker() {
|
submitWorker() {
|
||||||
this.btnloading = true;
|
let that = this;
|
||||||
this.formworker.rpj = this.form.id;
|
that.btnloading = true;
|
||||||
this.$refs.workerForm.validate(async (valid) => {
|
that.formworker.rpj = that.form.id;
|
||||||
this.$API.rpm.member.create
|
if(that.workDialogType=="add"){
|
||||||
.req(this.formworker)
|
that.$refs.workerForm.validate(async (valid) => {
|
||||||
.then((res) => {
|
that.$API.rpm.member.create
|
||||||
this.$message.success("项目成员添加成功");
|
.req(that.formworker)
|
||||||
this.workerVisible = false;
|
.then((res) => {
|
||||||
this.btnloading = false;
|
that.$message.success("项目成员添加成功");
|
||||||
this.getMemberList();
|
that.workerVisible = false;
|
||||||
})
|
that.btnloading = false;
|
||||||
.catch((err) => {
|
that.getMemberList();
|
||||||
this.btnloading = false;
|
})
|
||||||
return err;
|
.catch((err) => {
|
||||||
|
this.btnloading = false;
|
||||||
|
return err;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
}else{
|
||||||
|
let formworker = {};
|
||||||
|
formworker.is_manager = that.formworker.is_manager;
|
||||||
|
formworker.rcertificates = that.formworker.rcertificates;
|
||||||
|
that.$API.rpm.member.update
|
||||||
|
.req(that.formworker.id,formworker)
|
||||||
|
.then((res) => {
|
||||||
|
that.$message.success("项目成员证书添加成功");
|
||||||
|
that.workerVisible = false;
|
||||||
|
that.btnloading = false;
|
||||||
|
that.getMemberList();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
that.btnloading = false;
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
leaveDialog(row){
|
leaveDialog(row){
|
||||||
debugger;
|
// debugger;
|
||||||
this.leaveVisible = true;
|
this.leaveVisible = true;
|
||||||
this.leaveId=row.id;
|
this.leaveId=row.id;
|
||||||
console.log(this.leaveId)
|
console.log(this.leaveId)
|
||||||
},
|
},
|
||||||
preLeave(){
|
preLeave(){
|
||||||
debugger;
|
// debugger;
|
||||||
this.btnloading = true;
|
this.btnloading = true;
|
||||||
if(this.reason!=''){
|
if(this.reason!=''){
|
||||||
this.$API.rpm.member.leave.req(this.leaveId,{reason:this.reason}).then(res=>{
|
this.$API.rpm.member.leave.req(this.leaveId,{reason:this.reason}).then(res=>{
|
||||||
|
|
Loading…
Reference in New Issue