17 changed files with 4359 additions and 209 deletions
@ -0,0 +1,30 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
import qs from 'qs' |
||||
|
// 统一请求路径前缀
|
||||
|
const base = process.env.VUE_APP_URL |
||||
|
|
||||
|
// 文件上传接口
|
||||
|
export const uploadFile = '/api/customer/file/upload' |
||||
|
// export const uploadFile = process.env.VUE_APP_BASE_API + '/customer/file/upload'
|
||||
|
|
||||
|
|
||||
|
|
||||
|
// 上传图片
|
||||
|
// export function imageUpload(data) {
|
||||
|
// return request({
|
||||
|
// url: '/portal/file/upload',
|
||||
|
// method: 'post',
|
||||
|
// data,
|
||||
|
// headers: { 'Content-Type': 'multipart/form-data' }
|
||||
|
// })
|
||||
|
// }
|
||||
|
|
||||
|
// 移除图片
|
||||
|
export function deleteFilesOss(data) { |
||||
|
return request({ |
||||
|
url: '/base/v1/baseVehicleAppendixs/deleteFilesOss', |
||||
|
method: 'post', |
||||
|
data: qs.stringify(data), |
||||
|
// headers: { 'Content-Type': 'multipart/form-data' }
|
||||
|
}) |
||||
|
} |
@ -1,222 +1,226 @@ |
|||||
<template> |
<template> |
||||
<div> |
<div> |
||||
<el-upload ref="imgUpload" v-loading="loadding" class="avatar-uploader" :headers="accessToken" :action="uploadFile" :accept="accept" list-type="picture-card" :limit="limit" :file-list="files" :on-remove="removeImage" :on-preview="handlePictureCardPreview" :on-progress="uploadProgrees" :on-error="uploadError" :on-success="uploadImgSuccess_FuJian"> |
<el-upload ref="imgUpload" v-loading="loadding" class="avatar-uploader" :headers="accessToken" :action="uploadFile" |
||||
<i class="el-icon-plus avatar-uploader-icon"/> |
:accept="accept" list-type="picture-card" :limit="limit" :file-list="files" :on-remove="removeImage" |
||||
|
:on-preview="handlePictureCardPreview" :on-progress="uploadProgrees" |
||||
|
:on-error="uploadError" :on-success="uploadImgSuccess_FuJian"> |
||||
|
<i class="el-icon-plus avatar-uploader-icon" /> |
||||
</el-upload> |
</el-upload> |
||||
<el-dialog :visible.sync="dialogVisible" title="查看图片"> |
<el-dialog :visible.sync="dialogVisible" title="查看图片"> |
||||
<img width="100%" :src="dialogImageUrl" alt=""> |
<img width="100%" :src="dialogImageUrl" alt=""> |
||||
</el-dialog> |
</el-dialog> |
||||
</div> |
</div> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { uploadFile_yanchejiancha } from '@/api/portal/Upload' |
import { |
||||
import { getStorage } from '@/utils/auth.js' |
uploadFile |
||||
|
} from '@/api/portal/Upload' |
||||
|
import { |
||||
|
getStorage |
||||
|
} from '@/utils/auth.js' |
||||
|
|
||||
export default { |
export default { |
||||
model: { |
model: { |
||||
prop: 'name', |
prop: 'name', |
||||
event: 'change' |
event: 'change' |
||||
}, |
}, |
||||
props: { |
props: { |
||||
placeholder: { |
placeholder: { |
||||
type: String, |
type: String, |
||||
default: '' |
default: '' |
||||
}, |
}, |
||||
bucket: { |
bucket: { |
||||
type: String, |
type: String, |
||||
default: 'abc' |
default: 'abc' |
||||
}, |
}, |
||||
// 长度 |
// 长度 |
||||
width: { |
width: { |
||||
type: String, |
type: String, |
||||
default: '270px' |
default: '270px' |
||||
}, |
}, |
||||
limit: { |
limit: { |
||||
type: Number, |
type: Number, |
||||
default: '' |
default: '' |
||||
}, |
}, |
||||
accept: { |
accept: { |
||||
type: String, |
type: String, |
||||
default: '.jpg,.jpeg,.png,.JPG,.JPEG,' |
default: '.jpg,.jpeg,.png,.JPG,.JPEG,' |
||||
}, |
}, |
||||
// 文件名称 |
// 文件名称 |
||||
name: { |
name: { |
||||
type: Array, |
type: Array, |
||||
required: true |
required: true |
||||
}, |
}, |
||||
uploadData: { |
uploadData: { |
||||
type: Object, |
type: Object, |
||||
default: {} |
default: {} |
||||
} |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
dialogImageUrl: '', |
|
||||
dialogVisible: false, |
|
||||
accessToken: null, |
|
||||
uploadFile: uploadFile_yanchejiancha, |
|
||||
fileList_FuJian: [], |
|
||||
enclosure: '', |
|
||||
file_add: '', |
|
||||
file_catch: '', |
|
||||
files: [], |
|
||||
files_list: [], |
|
||||
filedUrl: '', |
|
||||
// fileUrl: fileUrl, |
|
||||
// showpicture:false, |
|
||||
isview: false, |
|
||||
nameArr: '', |
|
||||
loadding: false |
|
||||
} |
|
||||
}, |
|
||||
watch: { |
|
||||
name: { |
|
||||
deep: true, |
|
||||
immediate: true, |
|
||||
handler(newVal, oldVal) { |
|
||||
console.log('aaaa1', newVal) |
|
||||
this.files = newVal |
|
||||
console.log('aaaa2', this.files) |
|
||||
} |
} |
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.$nextTick(() => { |
|
||||
this.Init() |
|
||||
}) |
|
||||
}, |
|
||||
created() { |
|
||||
this.uploadFile = uploadFile_yanchejiancha // 接口 |
|
||||
this.accessToken = { |
|
||||
token: getStorage() |
|
||||
} |
|
||||
}, |
|
||||
methods: { |
|
||||
showImg(imgList) { |
|
||||
this.files = imgList |
|
||||
console.log('123123123', this.files) |
|
||||
}, |
|
||||
view() { |
|
||||
// window.open(this.filedUrl) |
|
||||
}, |
}, |
||||
// 页面第一次加载 |
data() { |
||||
Init() { |
return { |
||||
if (this.name !== undefined) { |
dialogImageUrl: '', |
||||
this.files = [] |
dialogVisible: false, |
||||
for (var i = 0; i < this.name.length; i++) { |
accessToken: null, |
||||
this.files.push({ |
uploadFile: uploadFile, |
||||
name: this.name[i], |
fileList_FuJian: [], |
||||
url: this.name[i] |
enclosure: '', |
||||
}) |
file_add: '', |
||||
} |
file_catch: '', |
||||
|
files: [], |
||||
|
files_list: [], |
||||
|
filedUrl: '', |
||||
|
// fileUrl: fileUrl, |
||||
|
// showpicture:false, |
||||
|
isview: false, |
||||
|
nameArr: '', |
||||
|
loadding: false |
||||
} |
} |
||||
}, |
}, |
||||
handlePictureCardPreview(file) { |
watch: { |
||||
this.dialogVisible = true |
name: { |
||||
this.dialogImageUrl = file.url |
deep: true, |
||||
}, |
immediate: true, |
||||
// 上传方案--成功后执行 |
handler(newVal, oldVal) { |
||||
uploadImgSuccess_FuJian(response, file, fileList) { |
this.files = newVal |
||||
console.log('您选择的file:', file) |
} |
||||
if (file.response.code === '200') { |
|
||||
this.loadding = false |
|
||||
// 返显图片 |
|
||||
this.filedUrl = this.fileUrl + file.response.data |
|
||||
// var uid = file.response.data |
|
||||
this.files.push({ |
|
||||
name: file.response.data.sourceFileName, |
|
||||
url: file.response.data.fullUrl, |
|
||||
size: file.response.data.size |
|
||||
}) |
|
||||
this.$emit('change', this.files) |
|
||||
this.$emit('eett', this.files) |
|
||||
} |
} |
||||
}, |
}, |
||||
|
mounted() { |
||||
removeImage(file, ImageFileList) { |
this.$nextTick(() => { |
||||
this.files.splice(this.files.indexOf(file), 1) |
this.Init() |
||||
const imgFiles = [] |
|
||||
this.files.forEach((o) => { |
|
||||
imgFiles.push(o.url) |
|
||||
}) |
}) |
||||
this.$emit('fileChange', this.files) |
|
||||
}, |
}, |
||||
handleRemove(file, fileList) { |
created() { |
||||
console.log('file:' + JSON.stringify(file)) |
this.uploadFile = uploadFile // 接口 |
||||
console.log('fileList:' + JSON.stringify(fileList)) |
this.accessToken = { |
||||
this.enclosure = '' |
token: getStorage() |
||||
// 1. 保存新增文件id(this.file_add) |
|
||||
this.getNewFileId(fileList) |
|
||||
// 2. 保存数据库读取的已有文件id(this.file_catch) |
|
||||
this.getCatchFileId(file) |
|
||||
// 3. 保存并拼接id |
|
||||
this.getFileId() |
|
||||
// 4. 返回拼接id |
|
||||
this.$emit('change', this.enclosure) |
|
||||
}, |
|
||||
// 返回this.file_add(新上传文件的id拼接集合) |
|
||||
getNewFileId(fileList) { |
|
||||
// debugger |
|
||||
this.file_add = '' |
|
||||
for (var i = 0; i < fileList.length; i++) { |
|
||||
if (fileList[i].response && fileList[i].response.code === '200') { |
|
||||
this.file_add = this.file_add + fileList[i].response.data + ',' |
|
||||
} |
|
||||
} |
} |
||||
if (this.file_add !== '') { |
|
||||
this.file_add = this.file_add.substring(0, this.file_add.length - 1) |
|
||||
} |
|
||||
// console.log('1. this.file_add: ' + this.file_add) |
|
||||
}, |
}, |
||||
// 返回this.file_catch(数库一寸照的文件的id的拼接集合) |
methods: { |
||||
getCatchFileId(file) { |
showImg(imgList) { |
||||
for (var i = 0; i < this.files_list.length; i++) { |
this.files = imgList |
||||
if (this.file_catch !== '') { |
}, |
||||
// 1. 检查当前删除的文件是否是修改文件列表里面的,如果是,将修改列表里去除此id |
view() { |
||||
if (this.files_list[i].name === file.name) { |
// window.open(this.filedUrl) |
||||
// 2. 拆开file_catch到fils_arry |
}, |
||||
var fils_arry = this.file_catch.split(',') |
// 页面第一次加载 |
||||
// 3. 从fils_arry去除 this.files_list[i].id |
Init() { |
||||
var arry = [] |
if (this.name !== undefined) { |
||||
fils_arry.forEach((element) => { |
this.files = [] |
||||
// 不加载文件里面的 |
for (var i = 0; i < this.name.length; i++) { |
||||
if (element !== this.files_list[i].id) { |
this.files.push({ |
||||
arry.push(element) |
name: this.name[i], |
||||
} |
url: this.name[i] |
||||
}) |
}) |
||||
// 4. 重新拼接成file_catch |
|
||||
this.file_catch = arry.join(',') |
|
||||
} |
} |
||||
} |
} |
||||
} |
}, |
||||
// console.log('2. this.file_catch:' + this.file_catch) |
handlePictureCardPreview(file) { |
||||
}, |
this.dialogVisible = true |
||||
// 保存并拼接id |
this.dialogImageUrl = file.url |
||||
getFileId() { |
}, |
||||
// console.log('3. this.file_catch:' + this.file_catch + ',this.file_add:' + this.file_add) |
// 上传方案--成功后执行 |
||||
if (this.file_catch !== '') { |
uploadImgSuccess_FuJian(response, file, fileList) { |
||||
|
console.log('您选择的file:', file) |
||||
|
if (file.response.code === '200') { |
||||
|
this.loadding = false |
||||
|
// 返显图片 |
||||
|
this.filedUrl = this.fileUrl + file.response.data |
||||
|
// var uid = file.response.data |
||||
|
this.files.push({ |
||||
|
name: file.response.data.sourceFileName, |
||||
|
url: file.response.data.fullUrl, |
||||
|
size: file.response.data.size |
||||
|
}) |
||||
|
this.$emit('change', this.files) |
||||
|
this.$emit('eett', this.files) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
removeImage(file, ImageFileList) { |
||||
|
this.files.splice(this.files.indexOf(file), 1) |
||||
|
const imgFiles = [] |
||||
|
this.files.forEach((o) => { |
||||
|
imgFiles.push(o.url) |
||||
|
}) |
||||
|
this.$emit('fileChange', this.files) |
||||
|
}, |
||||
|
handleRemove(file, fileList) { |
||||
|
console.log('file:' + JSON.stringify(file)) |
||||
|
console.log('fileList:' + JSON.stringify(fileList)) |
||||
|
this.enclosure = '' |
||||
|
// 1. 保存新增文件id(this.file_add) |
||||
|
this.getNewFileId(fileList) |
||||
|
// 2. 保存数据库读取的已有文件id(this.file_catch) |
||||
|
this.getCatchFileId(file) |
||||
|
// 3. 保存并拼接id |
||||
|
this.getFileId() |
||||
|
// 4. 返回拼接id |
||||
|
this.$emit('change', this.enclosure) |
||||
|
}, |
||||
|
// 返回this.file_add(新上传文件的id拼接集合) |
||||
|
getNewFileId(fileList) { |
||||
|
// debugger |
||||
|
this.file_add = '' |
||||
|
for (var i = 0; i < fileList.length; i++) { |
||||
|
if (fileList[i].response && fileList[i].response.code === '200') { |
||||
|
this.file_add = this.file_add + fileList[i].response.data + ',' |
||||
|
} |
||||
|
} |
||||
if (this.file_add !== '') { |
if (this.file_add !== '') { |
||||
this.enclosure = this.file_catch + ',' + this.file_add |
this.file_add = this.file_add.substring(0, this.file_add.length - 1) |
||||
|
} |
||||
|
// console.log('1. this.file_add: ' + this.file_add) |
||||
|
}, |
||||
|
// 返回this.file_catch(数库一寸照的文件的id的拼接集合) |
||||
|
getCatchFileId(file) { |
||||
|
for (var i = 0; i < this.files_list.length; i++) { |
||||
|
if (this.file_catch !== '') { |
||||
|
// 1. 检查当前删除的文件是否是修改文件列表里面的,如果是,将修改列表里去除此id |
||||
|
if (this.files_list[i].name === file.name) { |
||||
|
// 2. 拆开file_catch到fils_arry |
||||
|
var fils_arry = this.file_catch.split(',') |
||||
|
// 3. 从fils_arry去除 this.files_list[i].id |
||||
|
var arry = [] |
||||
|
fils_arry.forEach((element) => { |
||||
|
// 不加载文件里面的 |
||||
|
if (element !== this.files_list[i].id) { |
||||
|
arry.push(element) |
||||
|
} |
||||
|
}) |
||||
|
// 4. 重新拼接成file_catch |
||||
|
this.file_catch = arry.join(',') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
// console.log('2. this.file_catch:' + this.file_catch) |
||||
|
}, |
||||
|
// 保存并拼接id |
||||
|
getFileId() { |
||||
|
// console.log('3. this.file_catch:' + this.file_catch + ',this.file_add:' + this.file_add) |
||||
|
if (this.file_catch !== '') { |
||||
|
if (this.file_add !== '') { |
||||
|
this.enclosure = this.file_catch + ',' + this.file_add |
||||
|
} else { |
||||
|
this.enclosure = this.file_catch |
||||
|
} |
||||
} else { |
} else { |
||||
this.enclosure = this.file_catch |
this.enclosure = this.file_add |
||||
} |
} |
||||
} else { |
}, |
||||
this.enclosure = this.file_add |
// 上传失败 |
||||
} |
uploadError() { |
||||
}, |
this.loadding = false |
||||
// 上传失败 |
}, |
||||
uploadError() { |
uploadProgrees(event, file, fileList) { |
||||
this.loadding = false |
if (Number(event.percent) > 0) { |
||||
}, |
this.loadding = true |
||||
uploadProgrees(event, file, fileList) { |
} |
||||
if (Number(event.percent) > 0) { |
// console.log('event:', event) |
||||
this.loadding = true |
|
||||
} |
} |
||||
// console.log('event:', event) |
|
||||
} |
} |
||||
} |
} |
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style scoped></style> |
<style scoped></style> |
||||
|
File diff suppressed because it is too large
@ -0,0 +1,383 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>【查看】项目信息</div> |
||||
|
<div> |
||||
|
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd" style="padding-bottom: 50px;"> |
||||
|
<div class="titwu">项目信息表</div> |
||||
|
<el-collapse v-model="activeNames" style="margin-left: 50px; margin-right: 50px;"> |
||||
|
<el-collapse-item name="1" title="基础信息"> |
||||
|
<el-form ref="dataForm" :model="temp.baseInfo" label-position="top" label-width="190px" class="formadd" |
||||
|
style="margin-top: -10px;margin-left: -40px;margin-right: -40px;"> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">项目名称</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.entryName}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">所属行业</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.industryName}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">项目类型</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.typeName}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">质押率(%)</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.bankPledgeRate}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">贷款行</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.bankName}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">客户经理</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.bmanagerName}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">授信额度</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.creditLimit}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">授信日期</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.engaDate}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">签约日期</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.signingDate}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">放款日期</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.loanDate}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">项目说明</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="20"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.remarks}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">监管负责人</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.regulatoryLeader}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">监管主管</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.generalManager}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">结束日期</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.endDate}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">填表日期</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.fillInDate}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">项目状态</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.stateName}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">项目状态说明</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span>{{temp.baseInfo.stateRemarks}}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
</el-form> |
||||
|
</el-collapse-item> |
||||
|
</el-collapse> |
||||
|
|
||||
|
<el-collapse v-model="activeNames" style="margin-left: 50px; margin-right: 50px;margin-top: 10px;"> |
||||
|
<el-collapse-item name="2" title="关联仓库"> |
||||
|
|
||||
|
<el-table :data="temp.warehouse" border :row-style="{height:'50px'}"> |
||||
|
<el-table-column label="仓库名称" prop="name" align="center" /> |
||||
|
<el-table-column label="仓库地址" prop="address" align="center" /> |
||||
|
<el-table-column label="联系人" prop="linkerName" align="center" /> |
||||
|
<el-table-column label="联系电话" prop="linkerPhone" align="center" /> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-collapse-item> |
||||
|
</el-collapse> |
||||
|
|
||||
|
<el-collapse v-model="activeNames" style="margin-left: 50px; margin-right: 50px;margin-top: 10px;"> |
||||
|
<el-collapse-item name="3" title="关联企业"> |
||||
|
|
||||
|
<el-table :data="temp.enterpriseList" border :row-style="{height:'50px'}"> |
||||
|
<el-table-column label="关联类型" prop="type" align="center" /> |
||||
|
<el-table-column label="企业名称" prop="enterpriseName" align="center" /> |
||||
|
<el-table-column label="联系人" prop="contacts" align="center" /> |
||||
|
<el-table-column label="联系电话" prop="telephone" align="center" /> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-collapse-item> |
||||
|
</el-collapse> |
||||
|
|
||||
|
<el-collapse v-model="activeNames" style="margin-left: 50px; margin-right: 50px;margin-top: 10px;"> |
||||
|
<el-collapse-item name="4" title="关联账户"> |
||||
|
|
||||
|
<el-table :data="temp.bankList" border :row-style="{height:'50px'}"> |
||||
|
<el-table-column label="账户类型" prop="accountType" align="center" /> |
||||
|
<el-table-column label="所属企业" prop="enterpriseName" align="center" /> |
||||
|
<el-table-column label="银行账号" prop="accountNumber" align="center" /> |
||||
|
<el-table-column label="开户银行" prop="bank" align="center" /> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-collapse-item> |
||||
|
</el-collapse> |
||||
|
|
||||
|
<el-collapse v-model="activeNames" style="margin-left: 50px; margin-right: 50px;margin-top: 10px;"> |
||||
|
<el-collapse-item name="5" title="关联章证"> |
||||
|
|
||||
|
<el-table :data="temp.idCardList" border :row-style="{height:'50px'}"> |
||||
|
<el-table-column label="所属企业" prop="idCardEnterprise" align="center" /> |
||||
|
<el-table-column label="章证类型" prop="idCardType" align="center" /> |
||||
|
<el-table-column label="章证名称" prop="name" align="center" /> |
||||
|
<el-table-column label="章证图片" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-for="(item,index) in scope.row.imgList" :key="index"> |
||||
|
<el-popover placement="left" trigger="click" width="300"> |
||||
|
<img :src="item.url" width="100%" /> |
||||
|
<img slot="reference" :src="item.url" :alt="item.url" |
||||
|
style="max-height: 70px;max-width: 70px; padding: 5px" /> |
||||
|
</el-popover> |
||||
|
</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-collapse-item> |
||||
|
</el-collapse> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/project/project' |
||||
|
|
||||
|
export default { |
||||
|
name: 'CustomerManagementInfo', |
||||
|
data() { |
||||
|
return { |
||||
|
activeNames: ['1', "2", "3", "4", "5"], |
||||
|
temp: { |
||||
|
baseInfo: {} |
||||
|
}, |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
|
||||
|
}, |
||||
|
methods: { |
||||
|
showAdd(sid) { |
||||
|
req.getInfoBySid(sid) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
console.log(">>>>>>>>>2222222", resp.data) |
||||
|
this.temp = resp.data |
||||
|
} |
||||
|
|
||||
|
}) |
||||
|
.catch(e => { |
||||
|
this.$emit('doback') |
||||
|
}) |
||||
|
|
||||
|
// req.selectStoreHouseSid(sid).then((res) => { |
||||
|
// if (res.success) { |
||||
|
// this.temps = res.data |
||||
|
// } |
||||
|
// }) |
||||
|
}, |
||||
|
// 组件返回 |
||||
|
handleReturn() { |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
.trightb { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
text-align: ; |
||||
|
justify-content: center; |
||||
|
} |
||||
|
|
||||
|
.trightb_item { |
||||
|
padding-top: 5px; |
||||
|
} |
||||
|
|
||||
|
.span { |
||||
|
margin-left: 50px; |
||||
|
font-size: 15px; |
||||
|
font-weight: 400; |
||||
|
} |
||||
|
|
||||
|
/deep/ .el-collapse-item__header { |
||||
|
height: 40px; |
||||
|
padding: 10px; |
||||
|
font-weight: bold; |
||||
|
font-size: 20px; |
||||
|
text-align: left; |
||||
|
color: #ffffff; |
||||
|
background-color: #0294d7; |
||||
|
} |
||||
|
|
||||
|
/deep/ .el-collapse-item__content { |
||||
|
padding-bottom: 0; |
||||
|
} |
||||
|
|
||||
|
.Images { |
||||
|
width: 150px; |
||||
|
height: 100px; |
||||
|
float: left; |
||||
|
margin: 10px 20px 40px 10px; |
||||
|
} |
||||
|
|
||||
|
.Images img { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
} |
||||
|
|
||||
|
.Images:hover p { |
||||
|
color: #018ad2; |
||||
|
text-decoration: underline; |
||||
|
} |
||||
|
|
||||
|
.Images p { |
||||
|
color: #000; |
||||
|
text-align: center; |
||||
|
margin-top: -15px; |
||||
|
} |
||||
|
|
||||
|
.Images p .Atext { |
||||
|
text-decoration: none; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,513 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
|
||||
|
<button-bar ref="btnbar" view-title="推送详情" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
||||
|
<div class="main-content"> |
||||
|
<el-row class="mid"> |
||||
|
<el-col :span="8" class="item"> |
||||
|
<div class="listtop" style="width: 450px"> |
||||
|
<div class="tit">项目列表</div> |
||||
|
</div> |
||||
|
<el-table :data="formobj" border ref="multipleTab" max-height="500px" style="width: 450px;font-size: 16px" |
||||
|
highlight-current-row @row-click="singleElection" :show-header="false" :row-style="{height:'50px'}"> |
||||
|
<el-table-column prop="entryName" label="项目名称" /> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
<el-col :span="8" class="item" style="margin-left: 50px;"> |
||||
|
<div class="listtop" style="width: 100%"> |
||||
|
<div class="tit">关联人员</div> |
||||
|
<div |
||||
|
style="display: flex;flex-direction: row; align-items: center; justify-content: space-between;padding-left: 20px;padding-right: 20px;"> |
||||
|
<img src="../../../../public/image/association.png" style="width: 35px;height: 25px; margin-right: 10px;" /> |
||||
|
<span> 为已绑定微信公众号人员</span> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<div class="org-tree"> |
||||
|
<el-tree :data="sysorganList" node-key="sid" :props="props" ref="tree" highlight-current check-strictly |
||||
|
:default-checked-keys="uploadData.users" |
||||
|
:default-expanded-keys="['2','fd6435f2-0005-11ec-a033-48452053aa33','3042d730-64e8-4e34-b08a-44adca4da3a5']" |
||||
|
@node-click="handleNodeClick"> |
||||
|
|
||||
|
<div class="custom-tree-node" slot-scope="{ node, data }" |
||||
|
style=" width: 100%;display: flex;flex-direction: row; align-items: center;flex-shrink: 1;"> |
||||
|
<div :class="{ 'title': data.psid==='0' }">{{ node.label }}</div> |
||||
|
|
||||
|
<div style="flex: 1;"></div> |
||||
|
<div style="margin-right: 35px;display: flex;flex-direction: row; align-items: center;"> |
||||
|
|
||||
|
<!-- <span v-if="node.childNodes.length!=0" :class="{ 'title': data.psid==='0' }">[ {{ node.childNodes.length}} ]</span> --> |
||||
|
|
||||
|
<span v-if="data.psid==='0'" :class="{ 'title': data.psid==='0' }" style="margin-right: 20px;">微信名称 |
||||
|
</span> |
||||
|
|
||||
|
<div v-if="node.childNodes.length==0" |
||||
|
style="width: 100%;display: flex;flex-direction: row;align-items: center;"> |
||||
|
<div></div> |
||||
|
<img v-if="data.isOpenId=='2'" src="../../../../public/image/association.png" style="width: 35px;height: 25px;" /> |
||||
|
<span style="margin-left: 30px;width:100px; overflow: hidden;text-align: center; |
||||
|
white-space: nowrap; |
||||
|
text-overflow: ellipsis;">正在完善 </span> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
<!-- <span |
||||
|
v-if="node.childNodes.length===0" |
||||
|
class="history" |
||||
|
@click="jumpHistory(node.data)" |
||||
|
>查看历史录像 |
||||
|
</span> --> |
||||
|
</div> |
||||
|
|
||||
|
</el-tree> |
||||
|
</div> |
||||
|
<!-- <el-table ref="multipleTable" :data="dataListOne" highlight-current-row border max-height="500px" |
||||
|
style="width: 400px;height: 500px;" @row-click="singleElection2" tooltip-effect="dark" |
||||
|
:row-style="{height:'50px'}"> |
||||
|
|
||||
|
|
||||
|
<el-table-column label="ID" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<div |
||||
|
style="display: flex;flex-direction: row; align-items: center; justify-content: space-between;padding-left: 20px;padding-right: 20px;"> |
||||
|
<span>{{scope.row.name}}</span> |
||||
|
<img src="../../../public/image/association.png" style="width: 45px;height: 35px;" |
||||
|
v-show="scope.row.isOpenId=='2'" /> |
||||
|
</div> |
||||
|
|
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="orgName" label="单位" align="center" /> |
||||
|
</el-table> --> |
||||
|
</el-col> |
||||
|
|
||||
|
<el-col :span="8" class="item" style="margin-left: 50px;width:700px;"> |
||||
|
<div class="listtop"> |
||||
|
|
||||
|
<div class="tit">微信推送</div> |
||||
|
|
||||
|
<div> |
||||
|
<span |
||||
|
style="color: #fff;background: #018AD2; font-size: 16px; margin-right: 20px; border-radius: 5px;padding: 4px 12px;" |
||||
|
@click="saveData()">保存</span> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<div v-for="(item, index) in sysorganList2"> |
||||
|
|
||||
|
<div class="itemlay"> |
||||
|
<div |
||||
|
style="display: flex;flex-direction: row;align-items: center; background:#EDF1F7 ; height: 50px;padding: 10px;"> |
||||
|
<el-checkbox style="zoom: 150%;" :value="item.state === '2'" |
||||
|
@change="titlecheckbox(item.id,$event)"></el-checkbox> |
||||
|
<span style="margin-left: 10px;flex: 1; font-size: 18px;"> {{item.name}}</span> |
||||
|
|
||||
|
<span |
||||
|
style="color: #fff; margin-right: 20px;background: #018AD2; border-radius: 5px;padding: 4px 12px; font-size: 16px; " |
||||
|
@click="showList(item.id)" v-show="!item.Show">展开</span> |
||||
|
<span |
||||
|
style="color: #fff; margin-right: 20px;background: #018AD2; border-radius: 5px;padding: 4px 12px; font-size: 16px; " |
||||
|
@click="showList2(item.id)" v-show="item.Show">收起</span> |
||||
|
</div> |
||||
|
|
||||
|
<div style="padding: 10px 20px;"> |
||||
|
|
||||
|
<div v-for="(child,pos) in item.list" v-show="item.Show"> |
||||
|
|
||||
|
<el-col |
||||
|
style="padding-top: 5px;padding-bottom: 5px;display: flex;flex-direction: row;align-items: center;" |
||||
|
:span="6"> |
||||
|
|
||||
|
<el-checkbox style="zoom: 140%; " :value="child.state === '2'" |
||||
|
@change="itemChecbox(child,index,$event)"></el-checkbox> |
||||
|
<span |
||||
|
style="margin-left: 10px; width: 100%;display: inline-block; overflow: hidden;white-space: nowrap;text-overflow: ellipsis; ">{{child.name}}</span> |
||||
|
|
||||
|
</el-col> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/projectStaff/index' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
export default { |
||||
|
name: 'SupplierBankInfoIndex', |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
checkboxShow: true, |
||||
|
showText: "展开", |
||||
|
checked: false, |
||||
|
listLoading: false, |
||||
|
activeNames: ['1', "2"], |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
tableLoading: false, |
||||
|
formobj: [], |
||||
|
dataListOne: [], |
||||
|
props: { |
||||
|
label: 'name', |
||||
|
children: 'children' |
||||
|
}, |
||||
|
btnList: [{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
}], |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
typeName: '', |
||||
|
} |
||||
|
}, |
||||
|
sids: [], |
||||
|
templateSelection: "", |
||||
|
// 当前选择的行的数据 |
||||
|
checkList: [], |
||||
|
uploadData: { |
||||
|
userProjectSid: '', |
||||
|
templateSid: [] |
||||
|
}, |
||||
|
ValSids: [], |
||||
|
sysorganList: [], |
||||
|
sysorganList2: [], |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
formobj: function() { |
||||
|
this.$nextTick(function() { |
||||
|
this.$refs['multipleTab'].setCurrentRow(this.formobj[0]) |
||||
|
}) |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
|
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
loadList() { |
||||
|
req.projectinformation().then(res => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
|
||||
|
req.associationUserList(res.data[0].sid).then(res => { |
||||
|
this.sysorganList = res.data |
||||
|
// this.uploadData.userProjectSid = res.data[0].sid |
||||
|
|
||||
|
// req.templateMessage(this.dataListOne[0].sid).then(res => { |
||||
|
// if (res.success) { |
||||
|
// this.sysorganList2 = res.data |
||||
|
// //this.Array为数组名 |
||||
|
// this.sysorganList2.forEach(item => { |
||||
|
|
||||
|
// this.$set(item, 'Show', true) |
||||
|
|
||||
|
// }) |
||||
|
// console.log("aaaaaaaaaa", this.sysorganList2) |
||||
|
// } |
||||
|
// }) |
||||
|
|
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
|
||||
|
}, |
||||
|
singleElection(row) { |
||||
|
console.log("aaaaaaaaaa", row) |
||||
|
this.uploadData.userProjectSid = row.sid |
||||
|
req.associationUserList(row.sid).then(res => { |
||||
|
this.sysorganList = res.data |
||||
|
|
||||
|
this.uploadData.userProjectSid = res.data[0].sid |
||||
|
req.templateMessage(this.dataListOne[0].sid).then(res => { |
||||
|
if (res.success) { |
||||
|
this.sysorganList = res.data |
||||
|
|
||||
|
//this.Array为数组名 |
||||
|
this.sysorganList.forEach(item => { |
||||
|
|
||||
|
this.$set(item, 'Show', true) |
||||
|
|
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
singleElection2(row) { |
||||
|
console.log("aaaaaaaaaa", row) |
||||
|
this.uploadData.userProjectSid = row.sid |
||||
|
req.templateMessage(row.sid).then(res => { |
||||
|
if (res.success) { |
||||
|
this.sysorganList2 = res.data |
||||
|
//this.Array为数组名 |
||||
|
this.sysorganList2.forEach(item => { |
||||
|
|
||||
|
this.$set(item, 'Show', true) |
||||
|
|
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
showList(id) { |
||||
|
console.log("aaaaaaaaaa", id) |
||||
|
const item = this.sysorganList2.find((item => item.id == id)) |
||||
|
|
||||
|
item.Show = !item.Show |
||||
|
|
||||
|
console.log("aaaaaaaaaa", item) |
||||
|
}, |
||||
|
showList2(id) { |
||||
|
console.log("aaaaaaaaaa", id) |
||||
|
const item = this.sysorganList2.find((item => item.id == id)) |
||||
|
item.Show = !item.Show |
||||
|
console.log("aaaaaaaaaa", item) |
||||
|
}, |
||||
|
titlecheckbox(id, info) { |
||||
|
console.log("aaaaaaaaaa", id) |
||||
|
console.log("aaaaaaaaaa", info) |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
const item = this.sysorganList2.find((item => item.id == id)) |
||||
|
|
||||
|
item.state = info ? "2" : '1' |
||||
|
|
||||
|
item.list.forEach(item => { |
||||
|
|
||||
|
this.$set(item, 'state', info ? "2" : '1') |
||||
|
|
||||
|
}) |
||||
|
|
||||
|
|
||||
|
console.log("aaaaaaaaaa", item) |
||||
|
|
||||
|
|
||||
|
}, |
||||
|
itemChecbox(child, index, info) { |
||||
|
console.log("aaaaaaaaaa", child) |
||||
|
console.log("aaaaaaaaaa", index) |
||||
|
console.log("aaaaaaaaaa", info) |
||||
|
child.state = info ? "2" : "1" |
||||
|
|
||||
|
console.log("aaaaaaaaaa", this.sysorganList2[index].list) |
||||
|
|
||||
|
var newList = this.sysorganList2[index].list |
||||
|
|
||||
|
var count = 0 |
||||
|
for (var i = 0; i < newList.length; i++) { |
||||
|
var item = newList[i] |
||||
|
|
||||
|
if (item.state == '2') { |
||||
|
count++ |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
console.log("aaaaaaaaaa", count) |
||||
|
console.log("aaaaaaaaaa", newList.length) |
||||
|
this.sysorganList2[index].state = count == newList.length ? "2" : "1" |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
saveData() { |
||||
|
var newList = [] |
||||
|
|
||||
|
for (var i = 0; i < this.sysorganList2.length; i++) { |
||||
|
|
||||
|
var list = this.sysorganList2[i].list |
||||
|
|
||||
|
for (var j = 0; j < list.length; j++) { |
||||
|
|
||||
|
if (list[j].state == '2') |
||||
|
newList.push( |
||||
|
list[j].sid |
||||
|
) |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
console.log("newList", newList) |
||||
|
|
||||
|
|
||||
|
this.uploadData.templateSid = newList |
||||
|
console.log("uploadData", this.uploadData) |
||||
|
req.saveProjectTemplate(this.uploadData).then(res => { |
||||
|
if (res.success) { |
||||
|
this.$message({ |
||||
|
message: '保存成功', |
||||
|
type: 'success' |
||||
|
}); |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleNodeClick(val, num) { |
||||
|
|
||||
|
console.log("aaaaaaaaaa", val) |
||||
|
|
||||
|
|
||||
|
console.log("aaaaaaaaaa", num) |
||||
|
|
||||
|
var userProjectSid = val.userProjectSid |
||||
|
|
||||
|
if (userProjectSid) { |
||||
|
this.uploadData.userProjectSid = userProjectSid |
||||
|
req.templateMessage(userProjectSid).then(res => { |
||||
|
if (res.success) { |
||||
|
this.sysorganList2 = res.data |
||||
|
//this.Array为数组名 |
||||
|
this.sysorganList2.forEach(item => { |
||||
|
|
||||
|
this.$set(item, 'Show', true) |
||||
|
|
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped lang="scss"> |
||||
|
::v-deep .el-tree .el-tree-node .is-leaf+.el-checkbox .el-checkbox__inner { |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
::v-deep .el-tree .el-tree-node .el-checkbox .el-checkbox__inner { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
// 设置节点高度 |
||||
|
::v-deep .el-tree-node__content { |
||||
|
height: 35px; |
||||
|
} |
||||
|
|
||||
|
::v-deep .title { |
||||
|
font-size: 18px; |
||||
|
color: #000; |
||||
|
font-weight: 600; |
||||
|
font-family: sans-serif; |
||||
|
} |
||||
|
|
||||
|
::v-deep .el-checkbox__label { |
||||
|
width: 100%; |
||||
|
overflow: hidden; |
||||
|
white-space: nowrap; |
||||
|
text-overflow: ellipsis; |
||||
|
} |
||||
|
|
||||
|
.main-content { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
|
||||
|
.mid { |
||||
|
width: 100%; |
||||
|
margin-top: 30px; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
|
||||
|
.item { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
|
||||
|
.listtop { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
padding-top: 25px; |
||||
|
padding-bottom: 25px; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.org-tree { |
||||
|
width: 100%; |
||||
|
height: 450px; |
||||
|
box-sizing: border-box; |
||||
|
/*padding-right: 10px;*/ |
||||
|
border: 1px solid #edf1f7; |
||||
|
overflow: scroll; |
||||
|
overflow-x: hidden; |
||||
|
} |
||||
|
|
||||
|
.itemlay { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
::v-deep .el-collapse-item__header { |
||||
|
height: 40px; |
||||
|
padding: 10px; |
||||
|
font-size: 18px; |
||||
|
text-align: left; |
||||
|
color: #000; |
||||
|
background-color: #EDF1F7; |
||||
|
} |
||||
|
|
||||
|
::v-deep .el-collapse-item__content { |
||||
|
padding-bottom: 0; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,172 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
|
||||
|
<div class="tab-header webtop"> |
||||
|
<!-- 标题 --> |
||||
|
<div>项目行业信息</div> |
||||
|
<!-- start 添加修改按钮 --> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
<!-- end 添加修改按钮 --> |
||||
|
<!-- end 详情按钮 --> |
||||
|
</div> |
||||
|
|
||||
|
<div> |
||||
|
|
||||
|
<el-card class="box-card"> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">项目行业名称:</span> |
||||
|
<el-input v-model="formobj.industryName" placeholder="" class="item_input" clearable /> |
||||
|
</div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">项目行业说明:</span> |
||||
|
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable /> |
||||
|
</div> |
||||
|
|
||||
|
</el-card> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/dataDict/datadict' |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
submitdisabled: false, |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
industryName: '', |
||||
|
remarks: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
saveOrUpdate() { |
||||
|
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
||||
|
if (this.formobj.sid) { |
||||
|
req.updateindustry(this.formobj) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: resp.msg |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => {}) |
||||
|
} else { |
||||
|
req.saveindustry(this.formobj) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: resp.msg |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => {}) |
||||
|
} |
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
sid: '', |
||||
|
industryName: '', |
||||
|
remarks: '' |
||||
|
} |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
|
||||
|
showAdd() { |
||||
|
|
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
req.industryFetchBySid(row.sid) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.formobj = resp.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(e => { |
||||
|
this.formobj = row |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss"> |
||||
|
.box-card { |
||||
|
margin-left: 60px; |
||||
|
margin-right: 60px; |
||||
|
min-width: 70%; |
||||
|
margin-top: 20px; |
||||
|
|
||||
|
.item { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
margin-top: 15px; |
||||
|
height: 40px; |
||||
|
line-height: 40px; |
||||
|
|
||||
|
.item_text { |
||||
|
flex: 0.8; |
||||
|
font-size: 18px; |
||||
|
text-align: right; |
||||
|
} |
||||
|
|
||||
|
.item_input { |
||||
|
flex: 4; |
||||
|
font-size: 16px; |
||||
|
margin-left: 10px; |
||||
|
margin-right: 80px; |
||||
|
} |
||||
|
|
||||
|
.item_left_input { |
||||
|
width: 20%; |
||||
|
} |
||||
|
|
||||
|
.item_left_text { |
||||
|
height: 30px; |
||||
|
margin-left: 20px; |
||||
|
line-height: 30px; |
||||
|
color: #018AD2; |
||||
|
padding: 0px 15px; |
||||
|
border: 1.5px solid #018AD2; |
||||
|
border-radius: 5px; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.item_right { |
||||
|
flex: 1; |
||||
|
justify-items: center; |
||||
|
|
||||
|
.item_right_list_text { |
||||
|
font-size: 16px; |
||||
|
} |
||||
|
|
||||
|
.item_right_list_delect { |
||||
|
color: #5E94FF; |
||||
|
margin-left: 20px; |
||||
|
font-size: 16px; |
||||
|
text-decoration: underline; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</style> |
@ -0,0 +1,238 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar ref="btnbar" view-title="项目行业维护" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
||||
|
{{ searchxianshitit }} |
||||
|
</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form :inline="true" class="tab-header"> |
||||
|
<el-form-item label="项目行业名称"> |
||||
|
<el-input v-model="queryParams.params.industryName" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Start 项目列表头部 --> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">项目行业列表</div> |
||||
|
</div> |
||||
|
<!-- End 项目列表头部 --> |
||||
|
<!-- Start 项目列表 --> |
||||
|
<div class=""> |
||||
|
<el-table |
||||
|
v-loading="tableLoading" |
||||
|
:data="dataList" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<!-- <el-table-column fixed width="50" type="selection" align="center" /> --> |
||||
|
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" /> |
||||
|
<el-table-column label="操作" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button> |
||||
|
<el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="industryName" label="项目行业名称" align="center" /> |
||||
|
<el-table-column prop="remarks" label="项目行业说明" align="center" /> |
||||
|
|
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination |
||||
|
v-show="dataList.length > 0" |
||||
|
:total="queryParams.total" |
||||
|
:page.sync="queryParams.current" |
||||
|
:limit.sync="queryParams.size" |
||||
|
class="pagination" |
||||
|
@pagination="loadList" |
||||
|
/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- End 查询和其列表部分 --> |
||||
|
<!-- 新增修改部分组件 --> |
||||
|
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/dataDict/datadict' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import divAdd from './industryAdd' |
||||
|
export default { |
||||
|
name: 'SupplierBankInfoIndex', |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
divAdd |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
tableLoading: false, |
||||
|
dataList: [], |
||||
|
btnList: [{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAdd', |
||||
|
btnLabel: '新增' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
industryName: '' |
||||
|
} |
||||
|
}, |
||||
|
sids: [] |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
loadList() { |
||||
|
this.tableLoading = true |
||||
|
req.industryListPage(this.queryParams).then((resp) => { |
||||
|
this.tableLoading = false |
||||
|
if (resp.success) { |
||||
|
const data = resp.data |
||||
|
this.queryParams.total = data.total |
||||
|
this.dataList = data.records |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
this.dataList = [] |
||||
|
this.queryParams.total = 0 |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.tableLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
handleSelectionChange(row) { |
||||
|
const aa = [] |
||||
|
row.forEach((element) => { |
||||
|
aa.push(element.sid) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
}, |
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
dosearch() { |
||||
|
this.queryParams.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.queryParams = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
code: '', |
||||
|
name: '' |
||||
|
} |
||||
|
} |
||||
|
this.loadList() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divadd'].showAdd() |
||||
|
}, |
||||
|
|
||||
|
toRelevancy(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(row) |
||||
|
}, |
||||
|
toRelevancyInfo(row) { |
||||
|
const tip = '请确认是否删除所选记录?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.industryDelBySids(row.sid).then((resp) => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: resp.msg, |
||||
|
showClose: true |
||||
|
}) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,434 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
|
||||
|
<button-bar ref="btnbar" view-title="设置关联人员" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
||||
|
<div class="main-content"> |
||||
|
<el-row class="mid"> |
||||
|
<el-col :span="8" class="left"> |
||||
|
<div class="listtop" style="width: 400px"> |
||||
|
<div class="tit">项目列表</div> |
||||
|
</div> |
||||
|
<el-table :data="formobj" border ref="multipleTab" max-height="560px" style="width: 400px;font-size: 16px" |
||||
|
highlight-current-row @row-click="singleElection" :row-style="{height:'50px'}" :show-header="false"> |
||||
|
<el-table-column prop="entryName" label="项目名称" /> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
<el-col :span="16" class="rigth"> |
||||
|
<div class="rihthGl"> |
||||
|
<div class="rigthJg"> |
||||
|
<div class="listtop" style="width: 100%"> |
||||
|
<span>关联人员</span> |
||||
|
<button class="Waiting" @click="getWaiting">取消关联</button> |
||||
|
</div> |
||||
|
<!-- <el-table ref="multipleTable" :data="dataListOne" border max-height="440px" style="width: 450px" |
||||
|
@selection-change="handlChange" tooltip-effect="dark" :row-style="{height:'50px'}" > |
||||
|
<el-table-column type="selection" width="55" align="center"/> |
||||
|
<el-table-column prop="name" label="ID" align="center" /> |
||||
|
<el-table-column prop="orgName" label="单位" align="center" /> |
||||
|
</el-table> --> |
||||
|
|
||||
|
<div class="org-tree"> |
||||
|
<el-tree :data="sysorganList" show-checkbox node-key="sid" :props="props" ref="tree" highlight-current |
||||
|
check-strictly :default-checked-keys="uploadData.users" |
||||
|
:default-expanded-keys="['2','fd6435f2-0005-11ec-a033-48452053aa33','3042d730-64e8-4e34-b08a-44adca4da3a5']" |
||||
|
@check="handleNodeClick1"> |
||||
|
|
||||
|
<div class="custom-tree-node" slot-scope="{ node, data }" |
||||
|
style=" width: 100%;display: flex;flex-direction: row; align-items: center;flex-shrink: 1;"> |
||||
|
<div :class="{ 'title': data.psid==='0' }">{{ node.label }}</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</el-tree> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="rigthYh"> |
||||
|
<div class="listtop" style="width: 100%"> |
||||
|
<span>未关联人员</span> |
||||
|
<button class="relevance" @click="getRelevance">关联</button> |
||||
|
</div> |
||||
|
<div class="org-tree"> |
||||
|
<eltree :data="sysorganList2" show-checkbox node-key="sid" :props="props" ref="tree2" highlight-current |
||||
|
check-strictly :default-checked-keys="uploadData.users" |
||||
|
:default-expanded-keys="['2','fd6435f2-0005-11ec-a033-48452053aa33','3042d730-64e8-4e34-b08a-44adca4da3a5']" |
||||
|
@check="handleNodeClick2"> |
||||
|
<div class="custom-tree-node" slot-scope="{ node, data }" |
||||
|
style=" width: 100%;display: flex;flex-direction: row; align-items: center;flex-shrink: 1;" |
||||
|
:class="{'checkbox':data.isOrg==='1'}"> |
||||
|
<div :class="{ 'title': data.psid==='0' }">{{ node.label }}</div> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</eltree> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- <div class="Btn"> |
||||
|
<el-button type="primary" @click="getPurchaseList">保存</el-button> |
||||
|
<el-button type="primary" style="margin-left: 40px;" @click="getCancel">取消</el-button> |
||||
|
</div> --> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import eltree from '@/utils/tree/src/tree.vue' |
||||
|
import req from '@/api/projectStaff/index' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
export default { |
||||
|
name: 'SupplierBankInfoIndex', |
||||
|
components: { |
||||
|
eltree, |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
tableLoading: false, |
||||
|
formobj: [], |
||||
|
dataListOne: [], |
||||
|
props: { |
||||
|
sid: 'sid', |
||||
|
psid: "psid", |
||||
|
label: 'name', |
||||
|
children: 'children' |
||||
|
}, |
||||
|
btnList: [{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
}], |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
typeName: '', |
||||
|
} |
||||
|
}, |
||||
|
sids: [], |
||||
|
templateSelection: "", |
||||
|
// 当前选择的行的数据 |
||||
|
checkList: [], |
||||
|
uploadData: { |
||||
|
projectSid: '', |
||||
|
users: [], |
||||
|
}, |
||||
|
ValSid: [], |
||||
|
ValSids: [], |
||||
|
sysorganList: [], |
||||
|
sysorganList2: [], |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
formobj: function() { |
||||
|
this.$nextTick(function() { |
||||
|
this.$refs['multipleTab'].setCurrentRow(this.formobj[0]) |
||||
|
}) |
||||
|
}, |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
loadList() { |
||||
|
req.projectinformation().then(res => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
this.uploadData.projectSid = res.data[0].sid |
||||
|
console.log("aaaaaaaaaa", this.uploadData.projectSid) |
||||
|
req.associationUserList(this.uploadData.projectSid).then(res => { |
||||
|
if (res.success) { |
||||
|
this.sysorganList = res.data |
||||
|
} |
||||
|
}) |
||||
|
req.sysorganization(this.uploadData.projectSid).then(res => { |
||||
|
if (res.success) { |
||||
|
this.sysorganList2 = res.data |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
singleElection(row) { |
||||
|
// this.clearList() |
||||
|
this.uploadData.projectSid = row.sid |
||||
|
req.associationUserList(this.uploadData.projectSid).then(res => { |
||||
|
if (res.success) { |
||||
|
this.sysorganList = res.data |
||||
|
} |
||||
|
}) |
||||
|
req.sysorganization(this.uploadData.projectSid).then(res => { |
||||
|
if (res.success) { |
||||
|
this.sysorganList2 = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
handleNodeClick1(val, num) { |
||||
|
console.log("aaaaaaaaaa", val) |
||||
|
console.log("aaaaaaaaaa", num) |
||||
|
|
||||
|
this.uploadData.users = num.checkedKeys |
||||
|
|
||||
|
}, |
||||
|
// 点击取消关联 |
||||
|
getWaiting() { |
||||
|
console.log("aaaaaaaaaa", this.uploadData) |
||||
|
|
||||
|
req.usercancellation(this.uploadData).then(res => { |
||||
|
if (res.success) { |
||||
|
this.$message({ |
||||
|
message: '取消关联成功', |
||||
|
type: 'success' |
||||
|
}); |
||||
|
|
||||
|
req.associationUserList(this.uploadData.projectSid).then(res => { |
||||
|
if (res.success) { |
||||
|
this.sysorganList = res.data |
||||
|
} |
||||
|
}) |
||||
|
req.sysorganization(this.uploadData.projectSid).then(res => { |
||||
|
if (res.success) { |
||||
|
this.sysorganList2 = res.data |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
this.$nextTick(() => { |
||||
|
|
||||
|
this.$refs['tree'].setCheckedKeys([]) |
||||
|
this.$refs['tree2'].setCheckedKeys([]) |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
}, |
||||
|
handleNodeClick2(val, num) { |
||||
|
console.log("aaaaaaaaaa", val) |
||||
|
console.log("aaaaaaaaaa", num) |
||||
|
|
||||
|
console.log("aaaaaaaaaa", val) |
||||
|
console.log("aaaaaaaaaa", num) |
||||
|
|
||||
|
this.uploadData.users = num.checkedKeys |
||||
|
}, |
||||
|
// 点击关联 |
||||
|
getRelevance() { |
||||
|
console.log("aaaaaaaaaa", this.uploadData) |
||||
|
|
||||
|
req.userprojectSave(this.uploadData).then(res => { |
||||
|
if (res.success) { |
||||
|
this.$message({ |
||||
|
message: '关联成功', |
||||
|
type: 'success' |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
req.associationUserList(this.uploadData.projectSid).then(res => { |
||||
|
if (res.success) { |
||||
|
this.sysorganList = res.data |
||||
|
} |
||||
|
}) |
||||
|
req.sysorganization(this.uploadData.projectSid).then(res => { |
||||
|
if (res.success) { |
||||
|
console.log("aaaaaaaaaa", res.data) |
||||
|
this.sysorganList2 = [] |
||||
|
this.sysorganList2 = res.data |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
this.$nextTick(() => { |
||||
|
|
||||
|
this.$refs['tree'].setCheckedKeys([]) |
||||
|
this.$refs['tree2'].setCheckedKeys([]) |
||||
|
|
||||
|
}); |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped lang="scss"> |
||||
|
::v-deep .el-tree .el-tree-node .is-leaf+.el-checkbox .el-checkbox__inner { |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
::v-deep .el-tree .el-tree-node .el-checkbox .el-checkbox__inner { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
// 设置节点高度 |
||||
|
::v-deep .el-tree-node__content { |
||||
|
height: 35px; |
||||
|
} |
||||
|
|
||||
|
::v-deep .title { |
||||
|
font-size: 18px; |
||||
|
color: #000; |
||||
|
font-weight: 600; |
||||
|
font-family: sans-serif; |
||||
|
} |
||||
|
|
||||
|
// 树形结构 三角图标 设在右侧 |
||||
|
// ::v-deep .el-tree-node__expand-icon { |
||||
|
// position: absolute; |
||||
|
// right: 2%; |
||||
|
// } |
||||
|
|
||||
|
.main-content { |
||||
|
.mid { |
||||
|
width: 100%; |
||||
|
height: 540px; |
||||
|
margin-top: 30px; |
||||
|
|
||||
|
.left { |
||||
|
.listtop { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
padding-top: 25px; |
||||
|
padding-bottom: 25px; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.rigth { |
||||
|
margin-left: -50px; |
||||
|
height: 600px; |
||||
|
border: 1px solid #dfe6ec; |
||||
|
position: relative; |
||||
|
|
||||
|
.rihthGl { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
display: flex; |
||||
|
justify-content: space-around; |
||||
|
|
||||
|
.rigthJg { |
||||
|
margin-top: 30px; |
||||
|
width: 450px; |
||||
|
|
||||
|
.org-tree { |
||||
|
width: 100%; |
||||
|
height: 450px; |
||||
|
box-sizing: border-box; |
||||
|
/*padding-right: 10px;*/ |
||||
|
border: 1px solid #edf1f7; |
||||
|
overflow: scroll; |
||||
|
overflow-x: hidden; |
||||
|
|
||||
|
.checkbox .is-leaf + .el-checkbox .el-checkbox__inner { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.listtop { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
padding-top: 25px; |
||||
|
padding-bottom: 25px; |
||||
|
|
||||
|
.Waiting { |
||||
|
padding: 5px 10px; |
||||
|
border: 2px solid #018ad2; |
||||
|
color: #018ad2; |
||||
|
font-size: 14px; |
||||
|
border-radius: 5px; |
||||
|
margin-right: 20px; |
||||
|
} |
||||
|
|
||||
|
.Waiting:hover { |
||||
|
background-color: #fff; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.rigthYh { |
||||
|
margin-top: 30px; |
||||
|
width: 450px; |
||||
|
|
||||
|
.org-tree { |
||||
|
width: 100%; |
||||
|
height: 450px; |
||||
|
box-sizing: border-box; |
||||
|
/*padding-right: 10px;*/ |
||||
|
border: 1px solid #edf1f7; |
||||
|
overflow: scroll; |
||||
|
overflow-x: hidden; |
||||
|
} |
||||
|
|
||||
|
.listtop { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
padding-top: 25px; |
||||
|
padding-bottom: 25px; |
||||
|
|
||||
|
.relevance { |
||||
|
padding: 5px 10px; |
||||
|
border: 2px solid #018ad2; |
||||
|
color: #018ad2; |
||||
|
font-size: 14px; |
||||
|
border-radius: 5px; |
||||
|
margin-right: 20px; |
||||
|
} |
||||
|
|
||||
|
.relevance:hover { |
||||
|
background-color: #fff; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.Btn { |
||||
|
position: absolute; |
||||
|
left: 45%; |
||||
|
top: 92%; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</style> |
@ -0,0 +1,172 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
|
||||
|
<div class="tab-header webtop"> |
||||
|
<!-- 标题 --> |
||||
|
<div>项目状态信息</div> |
||||
|
<!-- start 添加修改按钮 --> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
<!-- end 添加修改按钮 --> |
||||
|
<!-- end 详情按钮 --> |
||||
|
</div> |
||||
|
|
||||
|
<div> |
||||
|
|
||||
|
<el-card class="box-card"> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">项目状态名称:</span> |
||||
|
<el-input v-model="formobj.name" placeholder="" class="item_input" clearable /> |
||||
|
</div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">项目状态说明:</span> |
||||
|
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable /> |
||||
|
</div> |
||||
|
|
||||
|
</el-card> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/dataDict/datadict' |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
submitdisabled: false, |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
name: '', |
||||
|
remarks: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
saveOrUpdate() { |
||||
|
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
||||
|
if (this.formobj.sid) { |
||||
|
req.updateprojectstated(this.formobj) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: resp.msg |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => {}) |
||||
|
} else { |
||||
|
req.saveprojectstated(this.formobj) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: resp.msg |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => {}) |
||||
|
} |
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
sid: '', |
||||
|
name: '', |
||||
|
remarks: '' |
||||
|
} |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
|
||||
|
showAdd() { |
||||
|
|
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
req.projectstatedBySid(row.sid) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.formobj = resp.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(e => { |
||||
|
this.formobj = row |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss"> |
||||
|
.box-card { |
||||
|
margin-left: 60px; |
||||
|
margin-right: 60px; |
||||
|
min-width: 70%; |
||||
|
margin-top: 20px; |
||||
|
|
||||
|
.item { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
margin-top: 15px; |
||||
|
height: 40px; |
||||
|
line-height: 40px; |
||||
|
|
||||
|
.item_text { |
||||
|
flex: 0.8; |
||||
|
font-size: 18px; |
||||
|
text-align: right; |
||||
|
} |
||||
|
|
||||
|
.item_input { |
||||
|
flex: 4; |
||||
|
font-size: 16px; |
||||
|
margin-left: 10px; |
||||
|
margin-right: 80px; |
||||
|
} |
||||
|
|
||||
|
.item_left_input { |
||||
|
width: 20%; |
||||
|
} |
||||
|
|
||||
|
.item_left_text { |
||||
|
height: 30px; |
||||
|
margin-left: 20px; |
||||
|
line-height: 30px; |
||||
|
color: #018AD2; |
||||
|
padding: 0px 15px; |
||||
|
border: 1.5px solid #018AD2; |
||||
|
border-radius: 5px; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.item_right { |
||||
|
flex: 1; |
||||
|
justify-items: center; |
||||
|
|
||||
|
.item_right_list_text { |
||||
|
font-size: 16px; |
||||
|
} |
||||
|
|
||||
|
.item_right_list_delect { |
||||
|
color: #5E94FF; |
||||
|
margin-left: 20px; |
||||
|
font-size: 16px; |
||||
|
text-decoration: underline; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</style> |
@ -0,0 +1,237 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar ref="btnbar" view-title="项目状态维护" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
||||
|
{{ searchxianshitit }} |
||||
|
</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form :inline="true" class="tab-header"> |
||||
|
<el-form-item label="项目状态名称"> |
||||
|
<el-input v-model="queryParams.params.name" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Start 项目列表头部 --> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">项目状态列表</div> |
||||
|
</div> |
||||
|
<!-- End 项目列表头部 --> |
||||
|
<!-- Start 项目列表 --> |
||||
|
<div class=""> |
||||
|
<el-table |
||||
|
v-loading="tableLoading" |
||||
|
:data="dataList" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<!-- <el-table-column fixed width="50" type="selection" align="center" /> --> |
||||
|
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" /> |
||||
|
<el-table-column label="操作" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button> |
||||
|
<el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="name" label="项目状态名称" align="center" /> |
||||
|
<el-table-column prop="remarks" label="项目状态说明" align="center" /> |
||||
|
|
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination |
||||
|
v-show="dataList.length > 0" |
||||
|
:total="queryParams.total" |
||||
|
:page.sync="queryParams.current" |
||||
|
:limit.sync="queryParams.size" |
||||
|
class="pagination" |
||||
|
@pagination="loadList" |
||||
|
/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- End 查询和其列表部分 --> |
||||
|
<!-- 新增修改部分组件 --> |
||||
|
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/dataDict/datadict' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import divAdd from './projectStateAdd' |
||||
|
export default { |
||||
|
name: 'SupplierBankInfoIndex', |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
divAdd |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
tableLoading: false, |
||||
|
dataList: [], |
||||
|
btnList: [{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAdd', |
||||
|
btnLabel: '新增' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
name: '' |
||||
|
} |
||||
|
}, |
||||
|
sids: [] |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
loadList() { |
||||
|
this.tableLoading = true |
||||
|
req.projectstatedListPage(this.queryParams).then((resp) => { |
||||
|
this.tableLoading = false |
||||
|
if (resp.success) { |
||||
|
const data = resp.data |
||||
|
this.queryParams.total = data.total |
||||
|
this.dataList = data.records |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
this.dataList = [] |
||||
|
this.queryParams.total = 0 |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.tableLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
handleSelectionChange(row) { |
||||
|
const aa = [] |
||||
|
row.forEach((element) => { |
||||
|
aa.push(element.sid) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
}, |
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
dosearch() { |
||||
|
this.queryParams.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.queryParams = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
name: '' |
||||
|
} |
||||
|
} |
||||
|
this.loadList() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divadd'].showAdd() |
||||
|
}, |
||||
|
|
||||
|
toRelevancy(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(row) |
||||
|
}, |
||||
|
toRelevancyInfo(row) { |
||||
|
const tip = '请确认是否删除所选记录?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.projectstatedDelBySids(row.sid).then((resp) => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: resp.msg, |
||||
|
showClose: true |
||||
|
}) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,173 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
|
||||
|
<div class="tab-header webtop"> |
||||
|
<!-- 标题 --> |
||||
|
<div>项目类型信息</div> |
||||
|
<!-- start 添加修改按钮 --> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
<!-- end 添加修改按钮 --> |
||||
|
<!-- end 详情按钮 --> |
||||
|
</div> |
||||
|
|
||||
|
<div> |
||||
|
|
||||
|
<el-card class="box-card"> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">项目类型名称:</span> |
||||
|
<el-input v-model="formobj.typeName" placeholder="" class="item_input" clearable /> |
||||
|
</div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">项目类型说明:</span> |
||||
|
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable /> |
||||
|
</div> |
||||
|
|
||||
|
</el-card> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/dataDict/datadict' |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
submitdisabled: false, |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
typeName: '', |
||||
|
remarks: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
saveOrUpdate() { |
||||
|
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
||||
|
if (this.formobj.sid) { |
||||
|
req.updateClass(this.formobj) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: resp.msg |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => {}) |
||||
|
} else { |
||||
|
req.saveClass(this.formobj) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: resp.msg |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => {}) |
||||
|
} |
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
sid: '', |
||||
|
typeName: '', |
||||
|
remarks: '' |
||||
|
} |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
|
||||
|
showAdd() { |
||||
|
|
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
req.classFetchBySid(row.sid) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.formobj = resp.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(e => { |
||||
|
this.formobj = row |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss"> |
||||
|
.box-card { |
||||
|
margin-left: 60px; |
||||
|
margin-right: 60px; |
||||
|
min-width: 70%; |
||||
|
margin-top: 20px; |
||||
|
|
||||
|
.item { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
margin-top: 15px; |
||||
|
height: 40px; |
||||
|
line-height: 40px; |
||||
|
|
||||
|
.item_text { |
||||
|
flex: 0.8; |
||||
|
font-size: 18px; |
||||
|
text-align: right; |
||||
|
} |
||||
|
|
||||
|
.item_input { |
||||
|
flex: 4; |
||||
|
font-size: 16px; |
||||
|
margin-left: 10px; |
||||
|
margin-right: 80px; |
||||
|
} |
||||
|
|
||||
|
.item_left_input { |
||||
|
width: 20%; |
||||
|
} |
||||
|
|
||||
|
.item_left_text { |
||||
|
height: 30px; |
||||
|
margin-left: 20px; |
||||
|
line-height: 30px; |
||||
|
color: #018AD2; |
||||
|
padding: 0px 15px; |
||||
|
border: 1.5px solid #018AD2; |
||||
|
border-radius: 5px; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.item_right { |
||||
|
flex: 1; |
||||
|
justify-items: center; |
||||
|
|
||||
|
.item_right_list_text { |
||||
|
font-size: 16px; |
||||
|
} |
||||
|
|
||||
|
.item_right_list_delect { |
||||
|
color: #5E94FF; |
||||
|
margin-left: 20px; |
||||
|
font-size: 16px; |
||||
|
text-decoration: underline; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</style> |
||||
|
|
@ -0,0 +1,225 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar ref="btnbar" view-title="项目类型维护" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
||||
|
{{ searchxianshitit }} |
||||
|
</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form :inline="true" class="tab-header"> |
||||
|
<el-form-item label="项目类型名称"> |
||||
|
<el-input v-model="queryParams.params.typeName" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Start 项目列表头部 --> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">项目类型列表</div> |
||||
|
</div> |
||||
|
<!-- End 项目列表头部 --> |
||||
|
<!-- Start 项目列表 --> |
||||
|
<div class=""> |
||||
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
||||
|
@selection-change="handleSelectionChange"> |
||||
|
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" /> |
||||
|
<el-table-column label="操作" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button> |
||||
|
<el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="typeName" label="项目类型名称" align="center" /> |
||||
|
<el-table-column prop="remarks" label="项目类型说明" align="center" /> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
||||
|
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- End 查询和其列表部分 --> |
||||
|
<!-- 新增修改部分组件 --> |
||||
|
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/dataDict/datadict' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import divAdd from './projectTypeAdd' |
||||
|
export default { |
||||
|
name: 'SupplierBankInfoIndex', |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
divAdd |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
tableLoading: false, |
||||
|
dataList: [], |
||||
|
btnList: [{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAdd', |
||||
|
btnLabel: '新增' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
typeName: '', |
||||
|
} |
||||
|
}, |
||||
|
sids: [] |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
loadList() { |
||||
|
this.tableLoading = true |
||||
|
req.classListPage(this.queryParams).then((resp) => { |
||||
|
this.tableLoading = false |
||||
|
if (resp.success) { |
||||
|
const data = resp.data |
||||
|
this.queryParams.total = data.total |
||||
|
this.dataList = data.records |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
this.dataList = [] |
||||
|
this.queryParams.total = 0 |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.tableLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
handleSelectionChange(row) { |
||||
|
const aa = [] |
||||
|
row.forEach((element) => { |
||||
|
aa.push(element.sid) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
}, |
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
dosearch() { |
||||
|
this.queryParams.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.queryParams = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
typeName: '', |
||||
|
} |
||||
|
} |
||||
|
this.loadList() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divadd'].showAdd() |
||||
|
}, |
||||
|
|
||||
|
toRelevancy(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(row) |
||||
|
}, |
||||
|
toRelevancyInfo(row) { |
||||
|
|
||||
|
const tip = '请确认是否删除所选记录?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.classDelBySids(row.sid).then((resp) => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: resp.msg, |
||||
|
showClose: true |
||||
|
}) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
Loading…
Reference in new issue