|
@@ -1,290 +1,290 @@
|
|
|
-<template>
|
|
|
- <el-dialog
|
|
|
- :close-on-click-modal="false"
|
|
|
- :close-on-press-escape="false"
|
|
|
- :title="title"
|
|
|
- :append-to-body="true"
|
|
|
- :visible.sync="isVisible"
|
|
|
- width="550px"
|
|
|
- top="50px"
|
|
|
- >
|
|
|
- <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px">
|
|
|
- <!-- 包含CNC程序 -->
|
|
|
- <el-form-item :label='$t("resource.searchForm.isCNC")+":"' prop="cncProgram">
|
|
|
- <template>
|
|
|
- <el-radio v-model="tenant.cncProgram" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
- <el-radio v-model="tenant.cncProgram" label="0">{{$t("common.no")}}</el-radio>
|
|
|
- </template>
|
|
|
- </el-form-item>
|
|
|
- <!-- 包含刀具库 -->
|
|
|
- <el-form-item :label='$t("resource.searchForm.isDao")+":"' prop="toolLib">
|
|
|
- <template>
|
|
|
- <el-radio v-model="tenant.toolLib" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
- <el-radio v-model="tenant.toolLib" label="0">{{$t("common.no")}}</el-radio>
|
|
|
- </template>
|
|
|
- </el-form-item>
|
|
|
- <!-- 具备进度条 -->
|
|
|
- <el-form-item :label='$t("resource.searchForm.idJindu")+":"' prop="processBar">
|
|
|
- <template>
|
|
|
- <el-radio v-model="tenant.processBar" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
- <el-radio v-model="tenant.processBar" label="0">{{$t("common.no")}}</el-radio>
|
|
|
- </template>
|
|
|
- </el-form-item>
|
|
|
- <!-- 具备状态 -->
|
|
|
- <el-form-item :label='$t("resource.searchForm.isStatus")+":"' prop="showStatus">
|
|
|
- <template>
|
|
|
- <el-radio v-model="tenant.showStatus" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
- <el-radio v-model="tenant.showStatus" label="0">{{$t("common.no")}}</el-radio>
|
|
|
- </template>
|
|
|
- </el-form-item>
|
|
|
- <!-- 产线控制状态 -->
|
|
|
- <el-form-item :label='$t("resource.searchForm.isProStaus")+":"' prop="productionLineControl">
|
|
|
- <template>
|
|
|
- <el-radio v-model="tenant.productionLineControl" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
- <el-radio v-model="tenant.productionLineControl" label="0">{{$t("common.no")}}</el-radio>
|
|
|
- </template>
|
|
|
- </el-form-item>
|
|
|
- <!-- 每日最多加工-小时 -->
|
|
|
- <el-form-item :label='$t("resource.searchForm.maxTime")+":"' prop="maxWorkHours">
|
|
|
- <el-input-number v-model="tenant.maxWorkHours" :min="1" :max="10"></el-input-number>
|
|
|
- <span>{{ $t("resource.common.maxWorkHours") }}</span>
|
|
|
- </el-form-item>
|
|
|
- <!-- 临近保养-小时(不派任务) -->
|
|
|
- <el-form-item :label='$t("resource.searchForm.baoyang")+":"' prop="stopTaskHours">
|
|
|
- <el-input-number v-model="tenant.stopTaskHours" :min="1" :max="10"></el-input-number>
|
|
|
- <span>{{ $t("resource.common.stopTaskHours") }}</span>
|
|
|
- </el-form-item>
|
|
|
- <!-- 是否工序节点 -->
|
|
|
- <el-form-item :label='$t("resource.searchForm.isAutoCode")+":"' prop="productionLineControl">
|
|
|
- <template>
|
|
|
- <el-radio v-model="tenant.isAutoCode" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
- <el-radio v-model="tenant.isAutoCode" label="0">{{$t("common.no")}}</el-radio>
|
|
|
- </template>
|
|
|
- </el-form-item>
|
|
|
- <!-- 是否显示 -->
|
|
|
- <el-form-item :label='$t("resource.common.displayStatus")+":"' prop="displayStatus">
|
|
|
- <template>
|
|
|
- <el-radio v-model="tenant.displayStatus" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
- <el-radio v-model="tenant.displayStatus" label="0">{{$t("common.no")}}</el-radio>
|
|
|
- </template>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button plain type="warning" @click="isVisible = false">{{ $t('common.cancel') }}</el-button>
|
|
|
- <el-button plain type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('common.confirm') }}</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
-</template>
|
|
|
-<script>
|
|
|
-// 【区域管理】-API
|
|
|
-import areaMgrApi from "@/api/resourceProductMgr/areaMgr"
|
|
|
-// 【生产资源配置】-API
|
|
|
-import equipmentConfigApi from "@/api/resourceProductMgr/equipmentConfig"
|
|
|
-
|
|
|
-export default {
|
|
|
- name: 'TenantEdit',
|
|
|
- props: {
|
|
|
- dialogVisible: {
|
|
|
- type: Boolean,
|
|
|
- default: false
|
|
|
- },
|
|
|
- title: {
|
|
|
- type: String,
|
|
|
- default: ''
|
|
|
- }
|
|
|
- },
|
|
|
- data () {
|
|
|
- return {
|
|
|
- type: 'add',
|
|
|
- tenant: this.initTenant(),
|
|
|
- screenWidth: 0,
|
|
|
- width: this.initWidth(),
|
|
|
- confirmDisabled: false,
|
|
|
- dicts:{
|
|
|
- NATION: {}
|
|
|
- },
|
|
|
- roles: [],
|
|
|
- rules: {
|
|
|
- cncProgram: [
|
|
|
- { required: true, message: this.$t("rules.require"), trigger: 'blur' }
|
|
|
- ],
|
|
|
- toolLib: [
|
|
|
- { required: true, message: this.$t("rules.require"), trigger: 'blur' }
|
|
|
- ],
|
|
|
- processBar: [
|
|
|
- { required: true, message: this.$t("rules.require"), trigger: 'blur' }
|
|
|
- ],
|
|
|
- showStatus: [
|
|
|
- { required: true, message: this.$t("rules.require"), trigger: 'blur' }
|
|
|
- ],
|
|
|
- productionLineControl: [
|
|
|
- { required: true, message: this.$t("rules.require"), trigger: 'change' }
|
|
|
- ],
|
|
|
- maxWorkHours: [
|
|
|
- { required: true, message: this.$t("rules.require"), trigger: 'blur' }
|
|
|
- ],
|
|
|
- displayStatus: [
|
|
|
- { required: true, message: this.$t("rules.require"), trigger: 'blur' }
|
|
|
- ]
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- isVisible: {
|
|
|
- get () {
|
|
|
- return this.dialogVisible
|
|
|
- },
|
|
|
- set () {
|
|
|
- this.close()
|
|
|
- this.reset()
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- mounted () {
|
|
|
- window.onresize = () => {
|
|
|
- return (() => {
|
|
|
- this.width = this.initWidth()
|
|
|
- })()
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- initTenant () {
|
|
|
- return {
|
|
|
- id: '',
|
|
|
- name: '',
|
|
|
- status: '1'
|
|
|
- }
|
|
|
- },
|
|
|
- initWidth () {
|
|
|
- this.screenWidth = document.body.clientWidth
|
|
|
- if (this.screenWidth < 991) {
|
|
|
- return '90%'
|
|
|
- } else if (this.screenWidth < 1400) {
|
|
|
- return '45%'
|
|
|
- } else {
|
|
|
- return '800px'
|
|
|
- }
|
|
|
- },
|
|
|
- setTenant (val, dicts) {
|
|
|
- if(val){
|
|
|
- // this.tenant = { ...val }
|
|
|
- // 查询表单数据
|
|
|
- this.getFormData(val)
|
|
|
- }
|
|
|
- // 字典表
|
|
|
- this.dicts = dicts
|
|
|
- },
|
|
|
- getFormData(obj){
|
|
|
- equipmentConfigApi.getByResourceId({resourceId: obj.id}).then(res => {
|
|
|
- res = res.data
|
|
|
- // console.log("虎丘的数据:", res)
|
|
|
- if(res.isSuccess){
|
|
|
- // 如果查询到数据
|
|
|
- if(res.data){
|
|
|
- this.tenant = res.data
|
|
|
- }else{
|
|
|
- // 如果没有查询到数据,就是【新增】
|
|
|
- this.type="add"
|
|
|
- this.tenant.resourceId = obj.id
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
- },
|
|
|
- close () {
|
|
|
- this.$emit('close')
|
|
|
- },
|
|
|
- reset () {
|
|
|
- // 先清除校验,再清除表单,不然有奇怪的bug
|
|
|
- this.$refs.form.clearValidate()
|
|
|
- this.$refs.form.resetFields()
|
|
|
- this.tenant = this.initTenant()
|
|
|
- },
|
|
|
- submitForm () {
|
|
|
- this.$refs.form.validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.confirmDisabled = true
|
|
|
- if (this.type === 'add') {
|
|
|
- this.save()
|
|
|
- } else {
|
|
|
- this.update()
|
|
|
- }
|
|
|
- } else {
|
|
|
- return false
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- save () {
|
|
|
- equipmentConfigApi.save(this.tenant)
|
|
|
- .then((response) => {
|
|
|
- const res = response.data
|
|
|
- if (res.isSuccess) {
|
|
|
- this.isVisible = false
|
|
|
- this.$message({
|
|
|
- message: this.$t('tips.createSuccess'),
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- // 通知列表
|
|
|
- this.$emit("success");
|
|
|
- // 通知列表-并关闭弹出框
|
|
|
- this.$emit("close");
|
|
|
- }
|
|
|
- }).finally(() => {
|
|
|
- this.confirmDisabled = false
|
|
|
- return true
|
|
|
- })
|
|
|
- },
|
|
|
- update () {
|
|
|
- equipmentConfigApi.update(this.tenant)
|
|
|
- .then((response) => {
|
|
|
- const res = response.data
|
|
|
- if (res.isSuccess) {
|
|
|
- this.isVisible = false
|
|
|
- this.$message({
|
|
|
- message: this.$t('tips.updateSuccess'),
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- // 通知列表
|
|
|
- this.$emit("success");
|
|
|
- // 通知列表-并关闭弹出框
|
|
|
- this.$emit("close");
|
|
|
- }
|
|
|
- }).finally(() => {
|
|
|
- this.confirmDisabled = false
|
|
|
- return true
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-}
|
|
|
-</script>
|
|
|
-<style lang="scss" >
|
|
|
-.avatar-uploader .el-upload {
|
|
|
- border: 1px dashed #d9d9d9;
|
|
|
- border-radius: 6px;
|
|
|
- cursor: pointer;
|
|
|
- position: relative;
|
|
|
- overflow: hidden;
|
|
|
-}
|
|
|
-.avatar-uploader .el-upload:hover {
|
|
|
- border-color: #409eff;
|
|
|
-}
|
|
|
-.avatar-uploader-icon {
|
|
|
- font-size: 28px;
|
|
|
- color: #8c939d;
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- line-height: 100px;
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
-.avatar {
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- display: block;
|
|
|
-}
|
|
|
-.checkUsed{
|
|
|
- display: inline-block;
|
|
|
- margin-left: 10px;
|
|
|
- color: #1890ff;
|
|
|
-}
|
|
|
-</style>
|
|
|
+<template>
|
|
|
+ <el-dialog
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ :title="title"
|
|
|
+ :append-to-body="true"
|
|
|
+ :visible.sync="isVisible"
|
|
|
+ width="550px"
|
|
|
+ top="50px"
|
|
|
+ >
|
|
|
+ <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px">
|
|
|
+ <!-- 包含CNC程序 -->
|
|
|
+ <el-form-item :label='$t("resource.searchForm.isCNC")+":"' prop="cncProgram">
|
|
|
+ <template>
|
|
|
+ <el-radio v-model="tenant.cncProgram" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
+ <el-radio v-model="tenant.cncProgram" label="0">{{$t("common.no")}}</el-radio>
|
|
|
+ </template>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- 包含刀具库 -->
|
|
|
+ <el-form-item :label='$t("resource.searchForm.isDao")+":"' prop="toolLib">
|
|
|
+ <template>
|
|
|
+ <el-radio v-model="tenant.toolLib" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
+ <el-radio v-model="tenant.toolLib" label="0">{{$t("common.no")}}</el-radio>
|
|
|
+ </template>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- 具备进度条 -->
|
|
|
+ <el-form-item :label='$t("resource.searchForm.idJindu")+":"' prop="processBar">
|
|
|
+ <template>
|
|
|
+ <el-radio v-model="tenant.processBar" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
+ <el-radio v-model="tenant.processBar" label="0">{{$t("common.no")}}</el-radio>
|
|
|
+ </template>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- 具备状态 -->
|
|
|
+ <el-form-item :label='$t("resource.searchForm.isStatus")+":"' prop="showStatus">
|
|
|
+ <template>
|
|
|
+ <el-radio v-model="tenant.showStatus" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
+ <el-radio v-model="tenant.showStatus" label="0">{{$t("common.no")}}</el-radio>
|
|
|
+ </template>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- 产线控制状态 -->
|
|
|
+ <el-form-item :label='$t("resource.searchForm.isProStaus")+":"' prop="productionLineControl">
|
|
|
+ <template>
|
|
|
+ <el-radio v-model="tenant.productionLineControl" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
+ <el-radio v-model="tenant.productionLineControl" label="0">{{$t("common.no")}}</el-radio>
|
|
|
+ </template>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- 每日最多加工-小时 -->
|
|
|
+ <el-form-item :label='$t("resource.searchForm.maxTime")+":"' prop="maxWorkHours">
|
|
|
+ <el-input-number v-model="tenant.maxWorkHours" :min="1" :max="24"></el-input-number>
|
|
|
+ <span>{{ $t("resource.common.maxWorkHours") }}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- 临近保养-小时(不派任务) -->
|
|
|
+ <el-form-item :label='$t("resource.searchForm.baoyang")+":"' prop="stopTaskHours">
|
|
|
+ <el-input-number v-model="tenant.stopTaskHours" :min="1" :max="24"></el-input-number>
|
|
|
+ <span>{{ $t("resource.common.stopTaskHours") }}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- 是否工序节点 -->
|
|
|
+ <el-form-item :label='$t("resource.searchForm.isAutoCode")+":"' prop="productionLineControl">
|
|
|
+ <template>
|
|
|
+ <el-radio v-model="tenant.isAutoCode" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
+ <el-radio v-model="tenant.isAutoCode" label="0">{{$t("common.no")}}</el-radio>
|
|
|
+ </template>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- 是否显示 -->
|
|
|
+ <el-form-item :label='$t("resource.common.displayStatus")+":"' prop="displayStatus">
|
|
|
+ <template>
|
|
|
+ <el-radio v-model="tenant.displayStatus" label="1">{{$t("common.yes")}}</el-radio>
|
|
|
+ <el-radio v-model="tenant.displayStatus" label="0">{{$t("common.no")}}</el-radio>
|
|
|
+ </template>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button plain type="warning" @click="isVisible = false">{{ $t('common.cancel') }}</el-button>
|
|
|
+ <el-button plain type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('common.confirm') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+// 【区域管理】-API
|
|
|
+import areaMgrApi from "@/api/resourceProductMgr/areaMgr"
|
|
|
+// 【生产资源配置】-API
|
|
|
+import equipmentConfigApi from "@/api/resourceProductMgr/equipmentConfig"
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'TenantEdit',
|
|
|
+ props: {
|
|
|
+ dialogVisible: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
+ title: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ type: 'add',
|
|
|
+ tenant: this.initTenant(),
|
|
|
+ screenWidth: 0,
|
|
|
+ width: this.initWidth(),
|
|
|
+ confirmDisabled: false,
|
|
|
+ dicts:{
|
|
|
+ NATION: {}
|
|
|
+ },
|
|
|
+ roles: [],
|
|
|
+ rules: {
|
|
|
+ cncProgram: [
|
|
|
+ { required: true, message: this.$t("rules.require"), trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ toolLib: [
|
|
|
+ { required: true, message: this.$t("rules.require"), trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ processBar: [
|
|
|
+ { required: true, message: this.$t("rules.require"), trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ showStatus: [
|
|
|
+ { required: true, message: this.$t("rules.require"), trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ productionLineControl: [
|
|
|
+ { required: true, message: this.$t("rules.require"), trigger: 'change' }
|
|
|
+ ],
|
|
|
+ maxWorkHours: [
|
|
|
+ { required: true, message: this.$t("rules.require"), trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ displayStatus: [
|
|
|
+ { required: true, message: this.$t("rules.require"), trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ isVisible: {
|
|
|
+ get () {
|
|
|
+ return this.dialogVisible
|
|
|
+ },
|
|
|
+ set () {
|
|
|
+ this.close()
|
|
|
+ this.reset()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ window.onresize = () => {
|
|
|
+ return (() => {
|
|
|
+ this.width = this.initWidth()
|
|
|
+ })()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ initTenant () {
|
|
|
+ return {
|
|
|
+ id: '',
|
|
|
+ name: '',
|
|
|
+ status: '1'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ initWidth () {
|
|
|
+ this.screenWidth = document.body.clientWidth
|
|
|
+ if (this.screenWidth < 991) {
|
|
|
+ return '90%'
|
|
|
+ } else if (this.screenWidth < 1400) {
|
|
|
+ return '45%'
|
|
|
+ } else {
|
|
|
+ return '800px'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ setTenant (val, dicts) {
|
|
|
+ if(val){
|
|
|
+ // this.tenant = { ...val }
|
|
|
+ // 查询表单数据
|
|
|
+ this.getFormData(val)
|
|
|
+ }
|
|
|
+ // 字典表
|
|
|
+ this.dicts = dicts
|
|
|
+ },
|
|
|
+ getFormData(obj){
|
|
|
+ equipmentConfigApi.getByResourceId({resourceId: obj.id}).then(res => {
|
|
|
+ res = res.data
|
|
|
+ // console.log("虎丘的数据:", res)
|
|
|
+ if(res.isSuccess){
|
|
|
+ // 如果查询到数据
|
|
|
+ if(res.data){
|
|
|
+ this.tenant = res.data
|
|
|
+ }else{
|
|
|
+ // 如果没有查询到数据,就是【新增】
|
|
|
+ this.type="add"
|
|
|
+ this.tenant.resourceId = obj.id
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ close () {
|
|
|
+ this.$emit('close')
|
|
|
+ },
|
|
|
+ reset () {
|
|
|
+ // 先清除校验,再清除表单,不然有奇怪的bug
|
|
|
+ this.$refs.form.clearValidate()
|
|
|
+ this.$refs.form.resetFields()
|
|
|
+ this.tenant = this.initTenant()
|
|
|
+ },
|
|
|
+ submitForm () {
|
|
|
+ this.$refs.form.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.confirmDisabled = true
|
|
|
+ if (this.type === 'add') {
|
|
|
+ this.save()
|
|
|
+ } else {
|
|
|
+ this.update()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ save () {
|
|
|
+ equipmentConfigApi.save(this.tenant)
|
|
|
+ .then((response) => {
|
|
|
+ const res = response.data
|
|
|
+ if (res.isSuccess) {
|
|
|
+ this.isVisible = false
|
|
|
+ this.$message({
|
|
|
+ message: this.$t('tips.createSuccess'),
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ // 通知列表
|
|
|
+ this.$emit("success");
|
|
|
+ // 通知列表-并关闭弹出框
|
|
|
+ this.$emit("close");
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.confirmDisabled = false
|
|
|
+ return true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ update () {
|
|
|
+ equipmentConfigApi.update(this.tenant)
|
|
|
+ .then((response) => {
|
|
|
+ const res = response.data
|
|
|
+ if (res.isSuccess) {
|
|
|
+ this.isVisible = false
|
|
|
+ this.$message({
|
|
|
+ message: this.$t('tips.updateSuccess'),
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ // 通知列表
|
|
|
+ this.$emit("success");
|
|
|
+ // 通知列表-并关闭弹出框
|
|
|
+ this.$emit("close");
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.confirmDisabled = false
|
|
|
+ return true
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang="scss" >
|
|
|
+.avatar-uploader .el-upload {
|
|
|
+ border: 1px dashed #d9d9d9;
|
|
|
+ border-radius: 6px;
|
|
|
+ cursor: pointer;
|
|
|
+ position: relative;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+.avatar-uploader .el-upload:hover {
|
|
|
+ border-color: #409eff;
|
|
|
+}
|
|
|
+.avatar-uploader-icon {
|
|
|
+ font-size: 28px;
|
|
|
+ color: #8c939d;
|
|
|
+ width: 100px;
|
|
|
+ height: 100px;
|
|
|
+ line-height: 100px;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.avatar {
|
|
|
+ width: 100px;
|
|
|
+ height: 100px;
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+.checkUsed{
|
|
|
+ display: inline-block;
|
|
|
+ margin-left: 10px;
|
|
|
+ color: #1890ff;
|
|
|
+}
|
|
|
+</style>
|