领料申请

This commit is contained in:
jjLv 2024-11-12 10:28:11 +08:00
parent 65aff8c6d7
commit a170b129cc
7 changed files with 312 additions and 320 deletions

View File

@ -9,6 +9,15 @@ export function getListLeaseApply(query) {
})
}
// 领料申请到货-新增
export function addApplyInfo(data) {
return request({
url: '/material/lease_apply_info',
method: 'post',
data: data,
})
}
//新购到货-二级列表详情
export function getPurchaseCheckInfo(query) {
return request({
@ -56,11 +65,3 @@ export function uploadPurchaseFile(data) {
}
// // 状态信息下拉框-
// export function queryStatusDataApi(query) {
// return request({
// url: '/system/lease_apply_status/listNoPage',
// method: 'get',
// params: query
// })
// }

View File

@ -85,10 +85,7 @@
</el-collapse>
</el-card>
</el-col>
</el-row>
</div>
</template>

View File

@ -2,7 +2,12 @@
<div class="container">
<div class="login">
<div class="login-form">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<el-form
ref="loginForm"
:model="loginForm"
:rules="loginRules"
class="login-form"
>
<h3 class="title">博诺思后台管理系统</h3>
<template v-if="loginMethod === 'password'">
<el-form-item prop="username">
@ -10,9 +15,15 @@
v-model="loginForm.username"
type="text"
auto-complete="off"
:placeholder="`用户名${config.loginConfig.phonePassword ? '/手机号' : ''}${config.loginConfig.emailPassword ? '/邮箱' : ''}`"
:placeholder="`用户名${
config.loginConfig.phonePassword ? '/手机号' : ''
}${config.loginConfig.emailPassword ? '/邮箱' : ''}`"
>
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon"/>
<svg-icon
slot="prefix"
icon-class="user"
class="el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<el-form-item prop="password">
@ -23,7 +34,11 @@
placeholder="密码"
@keyup.enter.native="handleLogin"
>
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon"/>
<svg-icon
slot="prefix"
icon-class="password"
class="el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="captchaEnabled">
@ -34,25 +49,38 @@
style="width: 63%"
@keyup.enter.native="handleLogin"
>
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon"/>
<svg-icon
slot="prefix"
icon-class="validCode"
class="el-input__icon input-icon"
/>
</el-input>
<div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
<img :src="codeUrl" @click="getCode" class="login-code-img" />
</div>
</el-form-item>
<el-form-item v-show="isAdmin" prop="verificationCode">
<el-input v-model="loginForm.verificationCode" placeholder="请输入验证码">
<el-input
v-model="loginForm.verificationCode"
placeholder="请输入验证码"
>
<template slot="append">
<el-button
type="primary"
@click="sendAdminCode"
:disabled="isSendingCode || captchaEnabled?!loginForm.code:false"
:disabled="
isSendingCode || captchaEnabled ? !loginForm.code : false
"
class="send-code-button"
>
{{ countdown === 0 ? '获取验证码' : `${countdown}s` }}
{{ countdown === 0 ? "获取验证码" : `${countdown}s` }}
</el-button>
</template>
<svg-icon slot="prefix" icon-class="message" class="el-input__icon input-icon"/>
<svg-icon
slot="prefix"
icon-class="message"
class="el-input__icon input-icon"
/>
</el-input>
</el-form-item>
</template>
@ -62,9 +90,15 @@
v-model="loginForm.mobile"
type="text"
auto-complete="off"
:placeholder="`${config.loginConfig.phoneCode ? '手机号' : '/'}${config.loginConfig.emailCode ? '邮箱' : ''}`"
:placeholder="`${
config.loginConfig.phoneCode ? '手机号' : '/'
}${config.loginConfig.emailCode ? '邮箱' : ''}`"
>
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon"/>
<svg-icon
slot="prefix"
icon-class="user"
class="el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="captchaEnabled">
@ -75,54 +109,80 @@
style="width: 63%"
@keyup.enter.native="handleLogin"
>
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon"/>
<svg-icon
slot="prefix"
icon-class="validCode"
class="el-input__icon input-icon"
/>
</el-input>
<div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
<img :src="codeUrl" @click="getCode" class="login-code-img" />
</div>
</el-form-item>
<el-form-item prop="verificationCode">
<el-input v-model="loginForm.verificationCode" placeholder="请输入验证码">
<el-input
v-model="loginForm.verificationCode"
placeholder="请输入验证码"
>
<template slot="append">
<el-button
type="primary"
@click="sendCode"
:disabled="isSendingCode || captchaEnabled?!loginForm.code:false"
:disabled="
isSendingCode || captchaEnabled ? !loginForm.code : false
"
class="send-code-button"
>
{{ countdown === 0 ? '获取验证码' : `${countdown}s` }}
{{ countdown === 0 ? "获取验证码" : `${countdown}s` }}
</el-button>
</template>
<svg-icon slot="prefix" icon-class="message" class="el-input__icon input-icon"/>
<svg-icon
slot="prefix"
icon-class="message"
class="el-input__icon input-icon"
/>
</el-input>
</el-form-item>
</template>
<div class="login-form-center">
<el-link v-if="config.loginConfig.emailCode ||config.loginConfig.phoneCode " @click="toggleLoginMethod">
{{ loginMethod === 'password' ? '短信登录' : '密码登录' }}
<el-link
v-if="
config.loginConfig.emailCode || config.loginConfig.phoneCode
"
@click="toggleLoginMethod"
>
{{ loginMethod === "password" ? "短信登录" : "密码登录" }}
</el-link>
<router-link v-if="config.registersConfig.emailRegisters || config.registersConfig.phoneRegisters" to="/register">
<router-link
v-if="
config.registersConfig.emailRegisters ||
config.registersConfig.phoneRegisters
"
to="/register"
>
<el-link>注册账号</el-link>
</router-link>
<el-checkbox v-model="loginForm.rememberMe">记住密码</el-checkbox>
</div>
<el-form-item style="width: 100%;">
<el-button v-if="!isAdmin"
:loading="loading"
size="medium"
type="primary"
style="width: 100%;"
@click="loginMethod === 'password' ?IsAdmin():isLogin()"
<el-form-item style="width: 100%">
<el-button
v-if="!isAdmin"
:loading="loading"
size="medium"
type="primary"
style="width: 100%"
@click="loginMethod === 'password' ? IsAdmin() : isLogin()"
>
<span v-if="!loading"> </span>
<span v-else> 中...</span>
</el-button>
<el-button v-if="isAdmin"
:loading="loading"
size="medium"
type="primary"
style="width: 100%;"
@click="isLogin()"
<el-button
v-if="isAdmin"
:loading="loading"
size="medium"
type="primary"
style="width: 100%"
@click="isLogin()"
>
<span v-if="!loading"> </span>
<span v-else> 中...</span>
@ -132,13 +192,13 @@
<div class="login-divider">第三方登录</div>
<div class="login-icons">
<div class="login-icon">
<img :src="dingding" alt="Weibo">
<img :src="dingding" alt="Weibo" />
</div>
<div class="login-icon">
<img :src="wx" alt="WeChat">
<img :src="wx" alt="WeChat" />
</div>
<div class="login-icon">
<img :src="qq" alt="QQ">
<img :src="qq" alt="QQ" />
</div>
</div>
</el-form-item>
@ -149,233 +209,268 @@
</template>
<script>
import { getCodeImg } from '@/api/login'
import Cookies from 'js-cookie'
import { decrypt, encrypt } from '@/utils/jsencrypt'
import dingding from '@/assets/images/dingding.svg'
import wx from '@/assets/images/wx.svg'
import qq from '@/assets/images/QQ.svg'
import { getCodeImg } from "@/api/login";
import Cookies from "js-cookie";
import { decrypt, encrypt } from "@/utils/jsencrypt";
import dingding from "@/assets/images/dingding.svg";
import wx from "@/assets/images/wx.svg";
import qq from "@/assets/images/QQ.svg";
export default {
name: 'Login',
name: "Login",
data() {
return {
dingding: dingding,
wx: wx,
qq: qq,
codeUrl: '',
codeUrl: "",
isAdmin: false,
loginForm: {
username: '',
password: '',
username: "",
password: "",
rememberMe: false,
code: '',
mobile: '',
verificationCode: '',
uuid: '',
loginType: '',
phoneUuid: '',
mobileCodeType: 'LOGIN'
code: "",
mobile: "",
verificationCode: "",
uuid: "",
loginType: "",
phoneUuid: "",
mobileCodeType: "LOGIN",
},
passwordLoginRules: {
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }],
code: [{ required: true, trigger: 'change', message: '请输入验证码' }]
username: [
{ required: true, trigger: "blur", message: "请输入您的账号" },
],
password: [
{ required: true, trigger: "blur", message: "请输入您的密码" },
],
code: [{ required: true, trigger: "change", message: "请输入验证码" }],
},
mobileLoginRules: {
mobile: [{ required: true, trigger: 'blur', message: '请输入您的手机号' }],
verificationCode: [{ required: true, trigger: 'blur', message: '请输入验证码' }]
mobile: [
{ required: true, trigger: "blur", message: "请输入您的手机号" },
],
verificationCode: [
{ required: true, trigger: "blur", message: "请输入验证码" },
],
},
loading: false,
captchaEnabled: true,
redirect: undefined,
isSendingCode: false,
countdown: 0,
loginMethod: 'password', // 'password' or 'mobile'
loginMethod: "password", // 'password' or 'mobile'
supportsPhoneLogin: false,
supportsEmailLogin: false
}
supportsEmailLogin: false,
};
},
computed: {
config() {
return JSON.parse(localStorage.getItem('systemConfig')) || {loginConfig:{
phonePassword: true,
emailPassword: true,
phoneCode: false,
emailCode: false
},registersConfig: {
phoneRegisters: true,
emailRegisters: true
}}; // JSON
return (
JSON.parse(localStorage.getItem("systemConfig")) || {
loginConfig: {
phonePassword: true,
emailPassword: true,
phoneCode: false,
emailCode: false,
},
registersConfig: {
phoneRegisters: true,
emailRegisters: true,
},
}
); // JSON
},
loginRules() {
return this.loginMethod === 'password' ? this.passwordLoginRules : this.mobileLoginRules
}
return this.loginMethod === "password"
? this.passwordLoginRules
: this.mobileLoginRules;
},
},
watch: {
$route: {
handler(route) {
this.redirect = route.query && route.query.redirect
this.redirect = route.query && route.query.redirect;
},
immediate: true
}
immediate: true,
},
},
created() {
this.getCode()
this.getCookie()
this.getCode();
this.getCookie();
},
methods: {
getCode() {
getCodeImg().then(res => {
this.captchaEnabled = res.captchaEnabled !== undefined ? res.captchaEnabled : true
getCodeImg().then((res) => {
this.captchaEnabled =
res.captchaEnabled !== undefined ? res.captchaEnabled : true;
if (this.captchaEnabled) {
this.codeUrl = 'data:image/gif;base64,' + res.img
this.loginForm.uuid = res.uuid
this.codeUrl = "data:image/gif;base64," + res.img;
this.loginForm.uuid = res.uuid;
}
})
});
},
getCookie() {
const username = Cookies.get('username')
const password = Cookies.get('password')
const rememberMe = Cookies.get('rememberMe')
this.loginForm.username = username || ''
this.loginForm.password = password ? decrypt(password) : ''
this.loginForm.rememberMe = rememberMe === 'true'
const username = Cookies.get("username");
const password = Cookies.get("password");
const rememberMe = Cookies.get("rememberMe");
this.loginForm.username = username || "";
this.loginForm.password = password ? decrypt(password) : "";
this.loginForm.rememberMe = rememberMe === "true";
},
handleLogin() {
this.$refs.loginForm.validate(valid => {
this.$refs.loginForm.validate((valid) => {
if (valid) {
this.loading = true
this.loading = true;
if (this.loginForm.rememberMe) {
Cookies.set('username', this.loginForm.username, { expires: 30 })
Cookies.set('password', encrypt(this.loginForm.password), { expires: 30 })
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 })
Cookies.set("username", this.loginForm.username, { expires: 30 });
Cookies.set("password", encrypt(this.loginForm.password), {
expires: 30,
});
Cookies.set("rememberMe", this.loginForm.rememberMe, {
expires: 30,
});
} else {
Cookies.remove('username')
Cookies.remove('password')
Cookies.remove('rememberMe')
Cookies.remove("username");
Cookies.remove("password");
Cookies.remove("rememberMe");
}
this.loginForm.loginMethod = this.loginMethod
this.$store.dispatch('Login', this.loginForm)
.then(() => this.$router.push({ path: this.redirect || '/' }))
this.loginForm.loginMethod = this.loginMethod;
this.$store
.dispatch("Login", this.loginForm)
.then(() => this.$router.push({ path: this.redirect || "/" }))
.catch(() => {
this.loading = false
if (this.captchaEnabled) this.getCode()
})
this.loading = false;
if (this.captchaEnabled) this.getCode();
});
}
})
});
},
IsAdmin() {
this.loginForm.loginMethod = this.loginMethod
this.$store.dispatch('IsAdmin', this.loginForm).then(res => {
this.loginForm.loginMethod = this.loginMethod;
this.$store.dispatch("IsAdmin", this.loginForm).then((res) => {
if (res.data) {
this.isAdmin = res.data
this.$message.success('检测到您是超级管理账号,需进行手机检验')
this.isAdmin = res.data;
this.$message.success("检测到您是超级管理账号,需进行手机检验");
} else {
this.isLogin()
this.isLogin();
}
})
});
},
isLogin() {
this.$refs.loginForm.validate(valid => {
this.$refs.loginForm.validate((valid) => {
if (valid) {
this.loading = true
let that = this
this.loginForm.loginMethod = this.loginMethod
this.$store.dispatch('IsLogin', this.loginForm)
.then(res => {
this.loading = true;
let that = this;
this.loginForm.loginMethod = this.loginMethod;
this.$store
.dispatch("IsLogin", this.loginForm)
.then((res) => {
if (res.data) {
this.$modal.confirm('账号已在其他地方登录是否继续登录!!!!').then(function() {
return that.handleLogin()
}).then(() => {
this.loading = false
}).catch(() => {
this.loading = false
})
this.$modal
.confirm("账号已在其他地方登录是否继续登录!!!!")
.then(function () {
return that.handleLogin();
})
.then(() => {
this.loading = false;
})
.catch(() => {
this.loading = false;
});
} else {
that.handleLogin()
that.handleLogin();
}
})
.catch(() => {
this.loading = false
if (this.captchaEnabled) this.getCode()
})
this.loading = false;
if (this.captchaEnabled) this.getCode();
});
}
})
});
},
sendAdminCode() {
this.loginForm.mobile = this.loginForm.username
this.$store.dispatch('GetPhoneCode', this.loginForm)
.then(res => {
this.loginForm.mobile = this.loginForm.username;
this.$store
.dispatch("GetPhoneCode", this.loginForm)
.then((res) => {
if (res.code === 200) {
this.loginForm.phoneUuid = res.data
this.$message.success('验证码发送成功')
this.isSendingCode = true
this.countdown = 60
this.loginForm.phoneUuid = res.data;
this.$message.success("验证码发送成功");
this.isSendingCode = true;
this.countdown = 60;
const timer = setInterval(() => {
this.countdown -= 1
this.countdown -= 1;
if (this.countdown <= 0) {
clearInterval(timer)
this.isSendingCode = false
clearInterval(timer);
this.isSendingCode = false;
}
}, 1000)
}, 1000);
}
})
.catch(() => {
this.loading = false
this.loading = false;
//
if (this.captchaEnabled) {
this.getCode()
this.getCode();
}
//
this.isSendingCode = false
this.countdown = 0
})
this.isSendingCode = false;
this.countdown = 0;
});
},
sendCode() {
if (this.captchaEnabled ? !this.loginForm.code : false) {
this.$message.error('请先填写验证码')
return
this.$message.error("请先填写验证码");
return;
}
if (!this.loginForm.mobile) {
this.$message.error('请先填写'+this.config.loginConfig.phoneCode ? '手机号' : '/' + this.config.loginConfig.emailCode ? '邮箱' : '')
return
this.$message.error(
"请先填写" + this.config.loginConfig.phoneCode
? "手机号"
: "/" + this.config.loginConfig.emailCode
? "邮箱"
: ""
);
return;
}
this.$store.dispatch('GetPhoneCode', this.loginForm)
this.$store
.dispatch("GetPhoneCode", this.loginForm)
.then(() => {
this.isSendingCode = true
this.countdown = 60
this.isSendingCode = true;
this.countdown = 60;
const timer = setInterval(() => {
this.countdown -= 1
this.countdown -= 1;
if (this.countdown <= 0) {
clearInterval(timer)
this.isSendingCode = false
clearInterval(timer);
this.isSendingCode = false;
}
}, 1000)
}, 1000);
})
.catch(() => {
this.loading = false
this.loading = false;
//
if (this.captchaEnabled) {
this.getCode()
this.getCode();
}
//
this.isSendingCode = false
this.countdown = 0
})
this.isSendingCode = false;
this.countdown = 0;
});
},
toggleLoginMethod() {
this.loginMethod = this.loginMethod === 'password' ? 'mobile' : 'password'
this.loginForm.username = ''
this.loginForm.password = ''
this.loginForm.code = ''
this.loginForm.verificationCode = ''
this.loginForm.loginMethod = ''
this.isAdmin = false
this.getCode()
}
}
}
this.loginMethod =
this.loginMethod === "password" ? "mobile" : "password";
this.loginForm.username = "";
this.loginForm.password = "";
this.loginForm.code = "";
this.loginForm.verificationCode = "";
this.loginForm.loginMethod = "";
this.isAdmin = false;
this.getCode();
},
},
};
</script>
<style lang="scss">
@ -478,17 +573,17 @@ export default {
.login-divider::before,
.login-divider::after {
content: '';
content: "";
flex: 1;
border-bottom: 1px solid #ccc;
}
.login-divider:not(:empty)::before {
margin-right: .25em;
margin-right: 0.25em;
}
.login-divider:not(:empty)::after {
margin-left: .25em;
margin-left: 0.25em;
}
.login-icons {

View File

@ -41,9 +41,9 @@
/>
</el-select>
</el-form-item>
<el-form-item label="领料人" prop="taxRate">
<el-form-item label="领料人" prop="leasePerson">
<el-input
v-model="maForm.taxRate"
v-model="maForm.leasePerson"
placeholder="请输入领料人"
clearable
maxlength="50"
@ -53,9 +53,9 @@
/>
</el-form-item>
<el-form-item label="联系电话" prop="taxRate">
<el-form-item label="联系电话" prop="phone">
<el-input
v-model="maForm.taxRate"
v-model="maForm.phone"
placeholder="请输入联系电话"
clearable
maxlength="50"
@ -68,7 +68,7 @@
<el-form-item label="类型规格" prop="deviceType">
<el-cascader
:key="propsKey"
v-model="deviceType"
v-model="maForm.deviceType"
:show-all-levels="false"
:options="equipmentTypeList"
:props="deviceTypeTreeProps"
@ -163,7 +163,7 @@
import {
getPurchaseCheckInfo,
equipmentTypeTree,
addPurchaseCheckInfo,
addApplyInfo,
updatePurchaseCheckInfo,
} from "@/api/purchase/goodsArrived";
import { getListFacturer } from "@/api/ma/supplier";
@ -273,10 +273,10 @@ export default {
// trigger: 'blur',
// },
// ],
arrivalTime: [
deviceType: [
{
required: true,
message: "请选择到货日期",
message: "请选择规格型号",
trigger: "blur",
},
],
@ -496,7 +496,7 @@ export default {
// path: '/store/newBuy/newDevicesList',
// })
this.$emit("addToolsSuccessApply");
this.$emit("addToolsSuccess");
}
this.loading = false;
});
@ -504,9 +504,9 @@ export default {
console.log("新增");
// console.log(this.equipmentList)
this.loading = true;
addPurchaseCheckInfo({
purchaseCheckDetailsList: this.equipmentList,
purchaseCheckInfo: this.maForm,
addApplyInfo({
leaseApplyDetailsList: this.equipmentList,
leaseApplyInfo: this.maForm,
}).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("新增成功");
@ -514,7 +514,7 @@ export default {
// path: '/store/newBuy/newDevicesList',
// })
this.$emit("addToolsSuccessApply");
this.$emit("addToolsSuccess");
}
this.loading = false;
});

View File

@ -182,7 +182,7 @@
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.purchase_task_status"
:options="dict.type.lease_apply_status"
:value="scope.row.status"
/>
</template>
@ -218,7 +218,7 @@
size="mini"
style="margin-bottom: 10px"
type="success"
@click="handleNotice(scope.row)"
@click="handleSend(scope.row)"
v-if="scope.row.status == '0'"
v-hasPermi="['purchase:person:notice']"
>发布</el-button
@ -646,6 +646,11 @@ export default {
},
},
//
handleSend(row) {
console.log("发布");
},
watch: {
$route: {
handler(to) {

View File

@ -15,7 +15,7 @@
<el-table v-loading="loading" :data="equipmentList">
<el-table-column label="序号" align="center" type="index" />
<el-table-column
label="物资名称"
label="类型名称"
align="center"
prop="maTypeName"
:show-overflow-tooltip="true"
@ -27,144 +27,38 @@
:show-overflow-tooltip="true"
/>
<el-table-column
label="单位"
label="计量单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
label="采购数量"
label="当前库存"
align="center"
prop="purchaseNum"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
label="购置单价(元含税)"
label="预领数量"
align="center"
prop="purchaseTaxPrice"
:show-overflow-tooltip="true"
/>
<el-table-column
label="购置单价(元不含税)"
label="出库数量"
align="center"
prop="purchasePrice"
:show-overflow-tooltip="true"
/>
<el-table-column
label="是否未固定资产"
label="备注"
align="center"
prop="fixCode"
prop="remark"
:show-overflow-tooltip="true"
/>
<el-table-column
label="出厂日期"
align="center"
prop="productionTime"
:show-overflow-tooltip="true"
/>
<el-table-column label="相关配套资料" align="center" prop="">
<template slot-scope="scope">
<div
style="color: rgb(2, 167, 240); cursor: pointer"
@click="openFileDialog(scope.row)"
>
报告管理
</div>
</template>
</el-table-column>
<el-table-column
label="状态"
align="center"
prop="status"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.purchase_task_status"
:value="scope.row.status"
/>
</template>
</el-table-column>
</el-table>
<el-dialog
title="报告管理"
:visible.sync="open"
width="900px"
append-to-body
>
<el-table :data="fileDataList" width="100%" height="350px">
<el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column
label="报告类型"
align="center"
prop="dictLabel"
:show-overflow-tooltip="true"
/>
<el-table-column
label="文件名称"
align="center"
prop="name"
:show-overflow-tooltip="true"
/>
<el-table-column
label="类型名称"
align="center"
:show-overflow-tooltip="true"
>
<template>
<div>{{ this.rowData.maTypeName }}</div>
</template>
</el-table-column>
<el-table-column
label="规格型号"
align="center"
:show-overflow-tooltip="true"
>
<template>
<div>{{ this.rowData.typeName }}</div>
</template>
</el-table-column>
<!-- <el-table-column label="报告日期" align="center" prop="orgName" :show-overflow-tooltip="true"/>
<el-table-column label="截止有效期" align="center" prop="orgName" :show-overflow-tooltip="true"/> -->
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<div
style="
display: flex;
align-items: center;
justify-content: space-between;
"
>
<!-- <el-upload ref="upload" :limit="1" :headers="upload.headers"
:action="upload.url" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
:on-success="handleFileSuccess" :auto-upload="true"
>
<el-button size="mini" type="text" @click="beforeFileUpload(scope.row)">
上传
</el-button>
</el-upload> -->
<el-button
size="mini"
type="text"
@click="picturePreview(scope.row)"
v-if="scope.row.url"
>
查看
</el-button>
</div>
</template>
</el-table-column>
</el-table>
</el-dialog>
<!-- 图片查看弹窗 -->
<el-dialog :visible.sync="dialogVisible" width="500px" height="500px">
<img width="100%" height="500px" :src="dialogImageUrl" />
</el-dialog>
</div>
</template>

View File

@ -1,12 +1,12 @@
<script>
export default {
created() {
const { params, query } = this.$route
const { path } = params
this.$router.replace({ path: '/' + path, query })
const { params, query } = this.$route;
const { path } = params;
this.$router.replace({ path: "/" + path, query });
},
render: function(h) {
return h() // avoid warning message
}
}
render: function (h) {
return h(); // avoid warning message
},
};
</script>