Commit 74651e5d authored by 张伯涛's avatar 张伯涛

修改

parent 90b9b2af
...@@ -416,7 +416,8 @@ export default { ...@@ -416,7 +416,8 @@ export default {
// 状态修改 // 状态修改
handleStatusChange(row) { handleStatusChange(row) {
const text = row.flag === '0' ? '停用' : '启用' const text = row.flag === '0' ? '停用' : '启用'
this.$confirm(`“${row.deptName}”部门即将被${text},是否继续?`, '提示', { // this.$confirm(`“${row.deptName}”部门即将被${text},是否继续?`, '提示', {
this.$confirm('是否确认"' + text + '"所选数据?', '警告', {
confirmButtonText: '确定 Confirm', confirmButtonText: '确定 Confirm',
cancelButtonText: '取消 Cancel', cancelButtonText: '取消 Cancel',
type: 'warning' type: 'warning'
......
...@@ -373,7 +373,8 @@ export default { ...@@ -373,7 +373,8 @@ export default {
/** 状态修改方法 **/ /** 状态修改方法 **/
handleStatusChange(row) { handleStatusChange(row) {
const text = row.flag === '0' ? '停用' : '启用' const text = row.flag === '0' ? '停用' : '启用'
this.$confirm(`“${row.deviceName}”设备即将被${text},是否继续?`, '提示', { // this.$confirm(`“${row.deviceName}”设备即将被${text},是否继续?`, '提示', {
this.$confirm('是否确认"' + text + '"所选数据?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
cancelButtonClass: 'btn-custom-cancel', cancelButtonClass: 'btn-custom-cancel',
......
...@@ -363,7 +363,8 @@ export default { ...@@ -363,7 +363,8 @@ export default {
// 状态 // 状态
changeStatus(row) { changeStatus(row) {
const text = row.flag === '1' ? '启用' : '停用' const text = row.flag === '1' ? '启用' : '停用'
this.$confirm('确认要"' + text + '""' + row.dictLabel + '"吗?', '提示', { // this.$confirm('确认要"' + text + '""' + row.dictLabel + '"吗?', '提示', {
this.$confirm('是否确认"' + text + '"所选数据?', '警告', {
confirmButtonText: '确定 Confirm', confirmButtonText: '确定 Confirm',
cancelButtonText: '取消 Cancel', cancelButtonText: '取消 Cancel',
type: 'warning' type: 'warning'
......
...@@ -478,7 +478,8 @@ export default { ...@@ -478,7 +478,8 @@ export default {
}, },
handleStatusChange(row) { handleStatusChange(row) {
const text = row.flag === '1' ? '启用' : '停用' const text = row.flag === '1' ? '启用' : '停用'
this.$confirm('确认要"' + text + '""' + row.dictName + '"吗?', '提示', { // this.$confirm('确认要"' + text + '""' + row.dictName + '"吗?', '提示', {
this.$confirm('是否确认"' + text + '"所选数据?', '警告', {
confirmButtonText: '确定 Confirm', confirmButtonText: '确定 Confirm',
cancelButtonText: '取消 Cancel', cancelButtonText: '取消 Cancel',
type: 'warning' type: 'warning'
......
...@@ -576,7 +576,8 @@ export default { ...@@ -576,7 +576,8 @@ export default {
}, },
handleStatusChange(row) { handleStatusChange(row) {
const text = row.flag === '0' ? '停用' : '启用' const text = row.flag === '0' ? '停用' : '启用'
this.$confirm(`“${row.menuName}”菜单即将被${text},是否继续?`, '提示', { // this.$confirm(`“${row.menuName}”菜单即将被${text},是否继续?`, '提示', {
this.$confirm('是否确认"' + text + '"所选数据?', '警告', {
confirmButtonText: '确定 Confirm', confirmButtonText: '确定 Confirm',
cancelButtonText: '取消 Cancel', cancelButtonText: '取消 Cancel',
type: 'warning' type: 'warning'
......
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button class="canleBtn" @click="cancel">取 消 Cancel</el-button> <el-button class="canleBtn" @click="cancel">取 消 Cancel</el-button>
<el-button type="danger" class="redBtn" @click="submitForm">确 定 Confirm</el-button> <el-button :loading="confirmLoading" type="danger" class="redBtn" @click="submitForm">确 定 Confirm</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -331,6 +331,7 @@ export default { ...@@ -331,6 +331,7 @@ export default {
name: 'Role', name: 'Role',
data() { data() {
return { return {
confirmLoading: false,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
...@@ -516,7 +517,8 @@ export default { ...@@ -516,7 +517,8 @@ export default {
// 角色状态修改 // 角色状态修改
handleStatusChange(row) { handleStatusChange(row) {
const text = row.flag === '1' ? '启用' : '停用' const text = row.flag === '1' ? '启用' : '停用'
this.$confirm('确认要"' + text + '""' + row.roleName + '"角色吗?', '警告', { // this.$confirm('确认要"' + text + '""' + row.roleName + '"角色吗?', '警告', {
this.$confirm('是否确认"' + text + '"所选数据?', '警告', {
confirmButtonText: '确定 Confirm', confirmButtonText: '确定 Confirm',
cancelButtonText: '取消 Cancel', cancelButtonText: '取消 Cancel',
type: 'warning' type: 'warning'
...@@ -669,11 +671,13 @@ export default { ...@@ -669,11 +671,13 @@ export default {
submitForm: function() { submitForm: function() {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
this.confirmLoading = true
if (this.form.businessId !== undefined) { if (this.form.businessId !== undefined) {
this.form.menuIds = this.getMenuAllCheckedKeys() this.form.menuIds = this.getMenuAllCheckedKeys()
updateRole(this.form).then(response => { updateRole(this.form).then(response => {
this.msgSuccess('修改成功') this.msgSuccess('修改成功')
this.open = false this.open = false
this.confirmLoading = false
this.getList() this.getList()
}) })
} else { } else {
...@@ -681,6 +685,7 @@ export default { ...@@ -681,6 +685,7 @@ export default {
addRole(this.form).then(response => { addRole(this.form).then(response => {
this.msgSuccess('新增成功') this.msgSuccess('新增成功')
this.open = false this.open = false
this.confirmLoading = false
this.getList() this.getList()
}) })
} }
......
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
<div class="labelName">劳务</div> <div class="labelName">劳务</div>
<div class="labelName">Labour</div> <div class="labelName">Labour</div>
</div> </div>
<el-input v-model.trim="form.nltLw" show-word-limit :maxlength="90" placeholder="请输入劳务" /> <el-input v-model.trim="form.nltLw" show-word-limit :maxlength="50" placeholder="请输入劳务" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -469,7 +469,7 @@ ...@@ -469,7 +469,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button class="resetBtn" @click="cancel">取 消 Cancel</el-button> <el-button class="resetBtn" @click="cancel">取 消 Cancel</el-button>
<el-button type="danger" class="redBtn" @click="submitForm">确 定 Confirm</el-button> <el-button :loading="confirmLoading" type="danger" class="redBtn" @click="submitForm">确 定 Confirm</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 用户导入对话框 --> <!-- 用户导入对话框 -->
...@@ -608,6 +608,7 @@ export default { ...@@ -608,6 +608,7 @@ export default {
} }
} }
return { return {
confirmLoading: false,
deptTreeData: [], deptTreeData: [],
pwdTypeMap: { pwdTypeMap: {
text: true, text: true,
...@@ -873,7 +874,8 @@ export default { ...@@ -873,7 +874,8 @@ export default {
// 用户状态修改 // 用户状态修改
handleStatusChange(row) { handleStatusChange(row) {
const text = row.flag === '1' ? '启用' : '停用' const text = row.flag === '1' ? '启用' : '停用'
this.$confirm('确认要"' + text + '""' + row.username + '"用户吗?', '警告', { // this.$confirm('确认要"' + text + '""' + row.username + '"用户吗?', '警告', {
this.$confirm('是否确认"' + text + '"所选数据?', '警告', {
confirmButtonText: '确定 Confirm', confirmButtonText: '确定 Confirm',
cancelButtonText: '取消 Cancel', cancelButtonText: '取消 Cancel',
cancelButtonClass: 'btn-custom-cancel', cancelButtonClass: 'btn-custom-cancel',
...@@ -1033,6 +1035,7 @@ export default { ...@@ -1033,6 +1035,7 @@ export default {
submitForm() { submitForm() {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
this.confirmLoading = true
// this.form.deptId = this.form.deptId.join(',') // this.form.deptId = this.form.deptId.join(',')
if (this.form.businessId !== undefined) { if (this.form.businessId !== undefined) {
console.log('form', this.form) console.log('form', this.form)
...@@ -1042,6 +1045,7 @@ export default { ...@@ -1042,6 +1045,7 @@ export default {
type: 'success' type: 'success'
}) })
this.open = false this.open = false
this.confirmLoading = false
this.getList() this.getList()
}) })
} else { } else {
...@@ -1050,6 +1054,7 @@ export default { ...@@ -1050,6 +1054,7 @@ export default {
message: '新增成功', type: 'success' message: '新增成功', type: 'success'
}) })
this.open = false this.open = false
this.confirmLoading = false
this.getList() this.getList()
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment