897 操作 没有提示

896 加重置
895 没有删除功能吗 删除掉测试数据
894 新增 加判空以及红星
893 新增的时候没有限制连点 加loading
892 重置按钮 不好使
890 操作成功没有提示
889 新增人员掉线
liujun0703-新项目开发
liujun 2024-09-07 16:51:45 +08:00
parent 1b46f3b192
commit cbdce13b4e
10 changed files with 111 additions and 36 deletions

View File

@ -23,7 +23,7 @@
</template>
</el-table-column>
<el-table-column prop="LEVELNAME" label="事故级别" width="180" />
<el-table-column prop="CONTENT" label="内容" show-overflow-tooltip="true" />
<el-table-column :show-overflow-tooltip="true" prop="CONTENT" label="内容" />
<el-table-column prop="DEPARTMENT_NAME" width="180" align="center" label="附件" >
<template v-if="row.FILE_URL" slot-scope="{row}">
<el-button type="primary" icon="el-icon-down" size="mini" @click="download(row)"></el-button>
@ -34,7 +34,7 @@
<template slot-scope="{row}">
<el-button type="text" icon="el-icon-document" size="mini" @click="handleDetail(row)"></el-button>
<el-button type="text" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button type="text" style="color: red" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID,row.NAME)"></el-button>
<el-button type="text" style="color: red" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID,row.TITLE)"></el-button>
</template>
</el-table-column>
</el-table>
@ -107,7 +107,7 @@
<td class="tbg">附件</td>
<td><a @click="download(form)"></a></td>
</tr>
<tr><td colspan="2" style="text-align: center">案件总</td></tr>
<tr v-if="caseSummaryList && caseSummaryList.length !== 0"><td colspan="2" style="text-align: center"></td></tr>
<tbody v-for="item in caseSummaryList" :key="item.ID" >
<tr >
<td class="tbg">内容</td>
@ -322,6 +322,7 @@ export default {
this.dialogFormEdit = false
this.varList = []
this.listQuery.page = 1
this.$message.success('保存成功')
this.getList()
}).catch((e) => {
this.listLoading = false
@ -341,11 +342,13 @@ export default {
id: id
}
).then((data) => {
if (data.result == 'success') {
if (data.result === 'success') {
this.listLoading = false
this.$message.success('删除成功')
this.getList()
}
}).catch((e) => {
this.$message.error(e)
this.listLoading = false
})
}).catch(() => {
@ -382,8 +385,10 @@ export default {
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.$message.success('删除成功')
this.getList()
}).catch((e) => {
this.$message.error(e)
this.listLoading = false
})
}).catch(() => {

View File

@ -11,20 +11,19 @@
</div>
</div>
<el-table ref="multipleTable" :data="varList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="CONTENT" label="内容" show-overflow-tooltip="true" />
<el-table-column :show-overflow-tooltip="true" prop="CONTENT" label="内容" />
<el-table-column prop="DEPARTMENT_NAME" width="180" align="center" label="附件" >
<template v-if="row.FILE_URL" slot-scope="{row}">
<el-button type="primary" icon="el-icon-down" size="mini" @click="download(row)"></el-button>
<el-button type="text" icon="el-icon-down" size="mini" @click="download(row)"></el-button>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300">
<el-table-column label="操作" align="center" width="250">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-document" size="mini" @click="handleDetail(row)"></el-button>
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID,row.NAME)"></el-button>
<el-button type="text" icon="el-icon-document" size="mini" @click="handleDetail(row)"></el-button>
<el-button type="text" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button type="text" style="color: red" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID,row.NAME)"></el-button>
</template>
</el-table-column>
</el-table>
@ -32,7 +31,6 @@
<div>
<template>
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
<!-- <el-button type="danger" icon="el-icon-delete" plain @click="makeAll('0')"></el-button>-->
</template>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
@ -160,8 +158,13 @@ export default {
this.FFILE = fileList
},
upload(fun) {
const loading = this.$loading({
lock: true,
text: '正在上传',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
for (let i = 0; i < this.FFILE.length; i++) {
if (this.FFILE[i].raw) {
formData.append('FFILE', this.FFILE[i].raw)
@ -172,7 +175,11 @@ export default {
formData
).then((data) => {
fun(data.fileurl)
this.$message.success('保存成功')
loading.close()
}).catch((e) => {
this.$message.error('保存失败')
loading.close()
})
},
//* *************************************************
@ -253,7 +260,7 @@ export default {
},
//* *************************************************************
handleDelete(id, name) {
this.$confirm('确定要删除[' + name + ']吗?', {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -265,11 +272,13 @@ export default {
id: id
}
).then((data) => {
if (data.result == 'success') {
if (data.result === 'success') {
this.listLoading = false
this.getList()
this.$message.success('删除成功')
}
}).catch((e) => {
this.$message.error(e)
this.listLoading = false
})
}).catch(() => {

View File

@ -253,8 +253,10 @@ export default {
this.dialogFormEdit = false
this.varList = []
this.listQuery.page = 1
this.$message.success('保存成功')
this.getList()
}).catch((e) => {
this.$message.error(e)
this.listLoading = false
})
},
@ -272,11 +274,13 @@ export default {
id: id
}
).then((data) => {
if (data.result == 'success') {
if (data.result === 'success') {
this.listLoading = false
this.$message.success('删除成功')
this.getList()
}
}).catch((e) => {
this.$message.error(e)
this.listLoading = false
})
}).catch(() => {
@ -284,8 +288,6 @@ export default {
},
makeAll() {
const _selectData = this.$refs.multipleTable.selection
console.info('_selectData')
console.info(_selectData)
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '请选中要删除的项...',
@ -313,8 +315,10 @@ export default {
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.$message.success('删除成功')
this.getList()
}).catch((e) => {
this.$message.error(e)
this.listLoading = false
})
}).catch(() => {

View File

@ -256,7 +256,9 @@ export default {
this.varList = []
this.listQuery.page = 1
this.getList()
this.$message.success('保存成功')
}).catch((e) => {
this.$message.error(e)
this.listLoading = false
})
},
@ -274,11 +276,13 @@ export default {
id: id
}
).then((data) => {
if (data.result == 'success') {
if (data.result === 'success') {
this.listLoading = false
this.$message.success('删除成功')
this.getList()
}
}).catch((e) => {
this.$message.error(e)
this.listLoading = false
})
}).catch(() => {

View File

@ -228,7 +228,9 @@ export default {
this.varList = []
this.listQuery.page = 1
this.getList()
this.$message.success('保存成功')
}).catch((e) => {
this.$message.error(e)
this.listLoading = false
})
},
@ -246,11 +248,13 @@ export default {
id: id
}
).then((data) => {
if (data.result == 'success') {
if (data.result === 'success') {
this.listLoading = false
this.getList()
this.$message.success('删除成功')
}
}).catch((e) => {
this.$message.error(e)
this.listLoading = false
})
}).catch(() => {
@ -287,8 +291,10 @@ export default {
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.$message.success('删除成功')
this.getList()
}).catch((e) => {
this.$message.error(e)
this.listLoading = false
})
}).catch(() => {

View File

@ -34,7 +34,7 @@
<el-table-column label="操作" align="center" width="200">
<template slot-scope="{row}">
<el-button type="text" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button type="text" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID, row.NAME)">删除</el-button>
<el-button type="text" icon="el-icon-delete" size="mini" style="color: red" @click="handleDelete(row.ID, row.NAME)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -195,9 +195,10 @@ export default {
this.listLoading = false
this.dialogFormAdd = false
this.getList(this.DICTIONARIES_ID, 1)
this.$message.success('保存成功')
this.msg = 'add'
}).catch((e) => {
this.$message.error(e)
this.resMsg = e.resMsg
this.listLoading = false
})
@ -214,7 +215,9 @@ export default {
this.dialogFormAdd = false
this.getList(this.DICTIONARIES_ID, 1)
this.msg = 'add'
this.$message.success('保存成功')
}).catch((e) => {
this.$message.error(e)
this.resMsg = e.resMsg
this.listLoading = false
})
@ -229,8 +232,6 @@ export default {
this.FFILE = fileList
},
confirm() {
debugger
// this.form.TYPE_DIC_ID = this.DICTIONARIES_ID
if (this.form.TYPE_DIC_ID === '' || this.form.TYPE_DIC_ID === null) {
this.$message({
message: '请选择法规类型...',
@ -243,7 +244,6 @@ export default {
if (this.FFILE.length > 0) {
this.upload((v) => {
this.$refs.upload.clearFiles()
this.uploadfileurl = v
if (this.form.ID) {
this.RegulationsEdit()
@ -264,8 +264,13 @@ export default {
})
},
upload(fun) {
const loading = this.$loading({
lock: true,
text: '正在上传文件,请稍候...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
for (let i = 0; i < this.FFILE.length; i++) {
if (this.FFILE[i].raw) {
formData.append('FFILE', this.FFILE[i].raw)
@ -276,7 +281,10 @@ export default {
formData
).then((data) => {
fun(data.fileurl)
loading.close()
}).catch((e) => {
this.$message.error(e)
loading.close()
})
},
//* ********************************************************
@ -395,11 +403,13 @@ export default {
id: id
}
).then((data) => {
if (data.result == 'success') {
if (data.result === 'success') {
this.listLoading = false
this.getList(this.DICTIONARIES_ID, 1)
this.$message.success('删除成功')
}
}).catch((e) => {
this.$message.error(e)
this.listLoading = false
})
}).catch(() => {

View File

@ -1,7 +1,7 @@
<template>
<el-dialog :visible.sync="visible" :title="title" :v-loading="loading" :before-close="handleClose" width="600px">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="100px">
<el-form-item label="图标名称:" prop="NAME">
<el-form-item label="图标名称:" prop="NAME" required>
<el-input v-model="form.NAME" prop="NAME" style="width: 300px"/>
</el-form-item>
<el-form-item v-if="false" label="类型:" prop="TYPE">
@ -13,7 +13,7 @@
:value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
<el-form-item label="图标:" prop="FILE_PATH">
<el-form-item label="图标:" prop="FILE_PATH" required>
<upload-img
:file-list.sync="form.file"
:multiple="false"
@ -51,10 +51,11 @@ export default {
NAME: '',
TYPE: '',
TYPE_NAME: '',
FILE_PATH: [],
FILE_PATH: '',
file: []
},
rules: {},
rules: {
},
tree: [],
typeList: []
}
@ -74,7 +75,23 @@ export default {
this.$parent.activeName = 'list'
},
uploadFile() {
this.loading = true
if (!this.form.NAME) {
this.$message.error('请输入图标名称')
return
}
if (!this.form.file[0]) {
console.log(this.form.FILE_PATH)
if ((!this.form.FILE_PATH) || (this.form.FILE_PATH === '')) {
this.$message.error('请上传图标')
return
}
}
const loading = this.$loading({
lock: true,
text: '正在上传',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
if (this.form.file[0] && this.form.file[0].raw) {
for (let i = 0; i < this.form.file.length; i++) {
@ -84,8 +101,9 @@ export default {
}
upload('/file/upload', formData).then((data) => {
this.confirm(data.fileurl)
loading.close()
}).catch((e) => {
console.log(e)
loading.close()
})
} else {
this.confirm(this.form.FILE_PATH)
@ -99,7 +117,9 @@ export default {
this.loading = false
this.handleClose()
this.$emit('refresh')
this.$message.success('保存成功')
}).catch((e) => {
this.$message.error(e)
this.loading = false
})
},
@ -120,7 +140,7 @@ export default {
NAME: '',
TYPE: '',
TYPE_NAME: '',
FILE_PATH: [],
FILE_PATH: '',
file: []
}
this.visible = false

View File

@ -567,12 +567,13 @@ export default {
'/workingSchedule/upload',
formData
).then((data) => {
if (data.code === '200') {
if (data.code === 200) {
this.$message.success('导入成功')
} else {
this.$message.error(data.msg)
}
loading.close()
this.getList()
fun()
}).catch((e) => {
console.log(e)

View File

@ -127,6 +127,19 @@ export default {
this.$message.success('保存成功')
this.visible = false
this.$emit('flush', 'flush')
this.form = {
YJ_EMERGENCY_TEAM_USER_ID: '',
YJ_EMERGENCY_TEAM_INFO_ID: '',
NAME: '',
SEX: '',
AGE: '',
PHONE: '',
TELEPHONE: '',
REMARK: '',
TEAM_POSITION: '',
COMPANY_NAME: '',
COMPANY_POSITION: ''
}
})
.catch((e) => {
console.error(e)

View File

@ -5,7 +5,7 @@
<el-form label-width="90px">
<el-col :span="6">
<el-form-item label="队伍名称:" prop="RESCUE_TEAM_NAME">
<el-input v-model="RESCUE_TEAM_NAME" placeholder="机构名称" class="filter-item" />
<el-input v-model="RESCUE_TEAM_NAME" placeholder="队伍名称" class="filter-item" />
</el-form-item>
</el-col>
<el-col :span="6">
@ -775,7 +775,9 @@ export default {
this.varList = []
this.listQuery.page = 1
this.getList()
this.$message.success('保存成功')
}).catch((e) => {
this.$message.error('保存失败')
this.listLoading = false
})
},
@ -799,6 +801,7 @@ export default {
this.getList()
}
}).catch((e) => {
this.$message.error(e)
this.listLoading = false
})
}).catch(() => {