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