style: 代码格式调整
parent
93205d5bb8
commit
f949002ed6
|
@ -70,6 +70,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
|
@ -122,8 +123,8 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="page-btn-group">
|
||||
<div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -186,24 +187,27 @@ export default {
|
|||
this.getList(this.ROLE_ID)
|
||||
},
|
||||
methods: {
|
||||
/** 获取行数据 Key,用于优化 table 表格的渲染 */
|
||||
getRowKey(row) {
|
||||
return row.INSPECTION_ID
|
||||
},
|
||||
/** 转换检验的状态 */
|
||||
translateInspection(id) {
|
||||
for (var i = 0; i < this.inspectionStatusList.length; i++) {
|
||||
if (this.inspectionStatusList[i].ID == id) return this.inspectionStatusList[i].NAME
|
||||
}
|
||||
},
|
||||
// 搜索
|
||||
/** 执行参数搜索 */
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
/** 执行重置 */
|
||||
goKeyReset() {
|
||||
this.resetSearch()
|
||||
this.getQuery()
|
||||
},
|
||||
// 获取列表
|
||||
/** 获取列表 */
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
// requestFN(
|
||||
|
@ -230,22 +234,24 @@ export default {
|
|||
this.total = archiveList.length
|
||||
}, 400)
|
||||
},
|
||||
// 查看
|
||||
/** 查看指定项 */
|
||||
goDetail(row) {
|
||||
this.$parent.activeName = 'Info'
|
||||
this.$parent.INSPECTION_ID = row.INSPECTION_ID
|
||||
},
|
||||
/** 处理指派逻辑 */
|
||||
goAssign(row) {
|
||||
this.$parent.activeName = 'HiddenList'
|
||||
// 是否可以指派
|
||||
this.$parent.assign = row.INSPECTED_SITEUSER_ID.includes(this.USER_ID) ? '0' : '1'
|
||||
this.$parent.INSPECTION_ID = row.INSPECTION_ID
|
||||
},
|
||||
/** 处理验收 */
|
||||
goAccept(row) {
|
||||
this.$parent.activeName = 'HiddenList'
|
||||
this.$parent.INSPECTION_ID = row.INSPECTION_ID
|
||||
},
|
||||
|
||||
/** 处理删除 */
|
||||
handleDelete(id) {
|
||||
this.$confirm('确定要删除吗?', {
|
||||
confirmButtonText: '确定',
|
||||
|
@ -273,7 +279,7 @@ export default {
|
|||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
/** 处理批量删除 */
|
||||
batchDel() {
|
||||
const _selectData = this.$refs.multipleTable.selection
|
||||
if (_selectData == null || _selectData.length == 0) {
|
||||
|
@ -314,8 +320,8 @@ export default {
|
|||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 判断按钮权限,用于是否显示按钮
|
||||
hasButton: function() {
|
||||
/** 判断按钮权限,用于是否显示按钮 */
|
||||
hasButton() {
|
||||
var keys = 'safetyenvironmental:add,safetyenvironmental:del,safetyenvironmental:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
|
@ -330,8 +336,8 @@ export default {
|
|||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 获取数据字典数据
|
||||
getDict: function() {
|
||||
/** 获取数据字典数据 */
|
||||
getDict() {
|
||||
requestFN(
|
||||
'/dictionaries/listSelectTree',
|
||||
{
|
||||
|
@ -343,6 +349,7 @@ export default {
|
|||
|
||||
})
|
||||
},
|
||||
/** 重置搜索状态 */
|
||||
resetSearch() {
|
||||
this.search = {
|
||||
INSPECTED_DEPARTMENT_NAME: '', // 被检查单位
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
|
@ -136,6 +137,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="page-btn-group">
|
||||
<div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
|
@ -179,7 +181,6 @@
|
|||
<el-dialog :visible.sync="dialogWriteSign" title="手写签字" width="600px" @close="dialogWriteSign = false">
|
||||
<WriteSign :width="600" :height="300" @subCanvas="subCanvas"/>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -260,10 +261,12 @@ export default {
|
|||
this.getEditMyInfo()
|
||||
},
|
||||
methods: {
|
||||
/** 获取行数据 Key,用于优化 table 表格的渲染 */
|
||||
getRowKey(row) {
|
||||
return row.INSPECTION_ID
|
||||
},
|
||||
getEditMyInfo() { // 获取登录人信息
|
||||
/** 获取登录人信息 */
|
||||
getEditMyInfo() {
|
||||
requestFN(
|
||||
'/user/goEditMyInfo',
|
||||
{}
|
||||
|
@ -276,16 +279,17 @@ export default {
|
|||
|
||||
})
|
||||
},
|
||||
// 搜索
|
||||
/** 执行参数搜索 */
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
/** 执行重置 */
|
||||
goKeyReset() {
|
||||
this.resetSearch()
|
||||
this.getQuery()
|
||||
},
|
||||
// 获取列表
|
||||
/** 获取列表 */
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
// requestFN(
|
||||
|
@ -311,17 +315,18 @@ export default {
|
|||
this.total = inspectedList.length
|
||||
}, 400)
|
||||
},
|
||||
// 查看
|
||||
/** 查看 */
|
||||
goDetail(row) {
|
||||
this.$parent.activeName = 'InspectionInfo'
|
||||
this.$parent.INSPECTION_ID = row.INSPECTION_ID
|
||||
},
|
||||
// 修改
|
||||
/** 处理确认按钮 */
|
||||
handleConfirm(row) {
|
||||
this.resetForm(row)
|
||||
this.hiddenCount(row.INSPECTION_ID) // 查询安环检查是否有隐患
|
||||
this.hiddenCount(row.INSPECTION_ID)
|
||||
this.dialogFormEdit = true
|
||||
},
|
||||
/** 上传文件前的钩子处理函数 */
|
||||
beforeFileUpload(file) {
|
||||
var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
|
||||
const extension = testmsg === 'pdf'
|
||||
|
@ -335,6 +340,7 @@ export default {
|
|||
return false
|
||||
}
|
||||
},
|
||||
/** 查询安环检查是否有隐患 */
|
||||
hiddenCount(INSPECTION_ID) {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
|
@ -349,11 +355,11 @@ export default {
|
|||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
/** 手写板*/
|
||||
/** 手写板弹框打开 */
|
||||
showModal() {
|
||||
this.dialogWriteSign = true
|
||||
},
|
||||
// 完成
|
||||
/** 手写板完成 */
|
||||
subCanvas(img64) {
|
||||
console.info('img64:' + img64)
|
||||
this.form.INSPECTED_SITEUSER_SIGN_IMG = img64
|
||||
|
@ -361,8 +367,7 @@ export default {
|
|||
console.info(this.form)
|
||||
this.dialogWriteSign = false
|
||||
},
|
||||
|
||||
// 保存
|
||||
/** 表单保存 */
|
||||
confirm(INSPECTION_STATUS) {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
|
@ -408,9 +413,8 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 判断按钮权限,用于是否显示按钮
|
||||
hasButton: function() {
|
||||
/** 判断按钮权限,用于是否显示按钮 */
|
||||
hasButton() {
|
||||
var keys = 'safetyenvironmentalinspector:add,safetyenvironmentalinspector:del,safetyenvironmentalinspector:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
|
@ -425,8 +429,8 @@ export default {
|
|||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 获取数据字典数据
|
||||
getDict: function() {
|
||||
/** 获取数据字典数据 */
|
||||
getDict() {
|
||||
requestFN(
|
||||
'/dictionaries/listSelectTree',
|
||||
{
|
||||
|
@ -438,6 +442,7 @@ export default {
|
|||
|
||||
})
|
||||
},
|
||||
/** 重置搜索状态 */
|
||||
resetSearch() {
|
||||
this.search = {
|
||||
INSPECTED_DEPARTMENT_NAME: '', // 被检查单位
|
||||
|
@ -450,6 +455,7 @@ export default {
|
|||
}
|
||||
this.$refs.tree_InspectionType.clearHandle()
|
||||
},
|
||||
/** 重置表单数据 */
|
||||
resetForm(row) {
|
||||
this.form = {
|
||||
INSPECTION_STATUS: '3',
|
||||
|
@ -461,14 +467,13 @@ export default {
|
|||
file: '' // 申辩附件
|
||||
}
|
||||
},
|
||||
/** 格式化日期时间 */
|
||||
formatDate(date, format) {
|
||||
return formatDate(date, format)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.uo-flex {
|
||||
display: flex;
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
|
@ -88,8 +89,9 @@
|
|||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
fiexd="left"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" fiexd="left" />
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="INSPECTED_DEPARTMENT_NAMES" show-overflow-tooltip label="被检查单位" align="center" />
|
||||
<el-table-column prop="INSPECTION_DEPARTMENT_NAME" show-overflow-tooltip label="检查部门" align="center" />
|
||||
<el-table-column prop="INSPECTION_ORIGINATOR_NAME" show-overflow-tooltip label="检查发起人" align="center" />
|
||||
|
@ -127,6 +129,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="page-btn-group">
|
||||
<div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
|
@ -156,7 +159,6 @@
|
|||
<el-dialog :visible.sync="dialogWriteSign" title="手写签字" width="600px" @close="dialogWriteSign = false">
|
||||
<WriteSign :width="600" :height="300" @subCanvas="subCanvas"/>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -233,19 +235,21 @@ export default {
|
|||
this.getList(this.ROLE_ID)
|
||||
},
|
||||
methods: {
|
||||
/** 获取行数据 Key,用于优化 table 表格的渲染 */
|
||||
getRowKey(row) {
|
||||
return row.INSPECTION_ID
|
||||
},
|
||||
// 搜索
|
||||
/** 执行参数搜索 */
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
/** 执行重置 */
|
||||
goKeyReset() {
|
||||
this.resetSearch()
|
||||
this.getQuery()
|
||||
},
|
||||
// 获取列表
|
||||
/** 获取列表 */
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
// requestFN(
|
||||
|
@ -271,30 +275,28 @@ export default {
|
|||
this.listLoading = false
|
||||
}, 400)
|
||||
},
|
||||
// 查看
|
||||
/** 查看指定检查项 */
|
||||
goDetail(row) {
|
||||
this.$parent.activeName = 'InspectionInfo'
|
||||
this.$parent.INSPECTION_ID = row.INSPECTION_ID
|
||||
},
|
||||
// 修改
|
||||
/** 处理核实逻辑 */
|
||||
handleVerify(row) {
|
||||
this.resetForm(row)
|
||||
this.dialogFormEdit = true
|
||||
},
|
||||
/** 手写板*/
|
||||
/** 手写板弹框打开 */
|
||||
showModal() {
|
||||
this.dialogWriteSign = true
|
||||
},
|
||||
// 完成
|
||||
/** 手写板完成 */
|
||||
subCanvas(img64) {
|
||||
console.info('img64:' + img64)
|
||||
this.form.INSPECTION_USER_SIGN_IMG = img64
|
||||
this.$set(this.form, 'INSPECTION_USER_SIGN_TIME', formatDate(new Date(), 'YYYY-MM-DD HH:mm'))
|
||||
console.info(this.form)
|
||||
this.dialogWriteSign = false
|
||||
},
|
||||
|
||||
// 保存
|
||||
/** 表单保存 */
|
||||
confirm(INSPECTION_STATUS) {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
|
@ -338,9 +340,8 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 判断按钮权限,用于是否显示按钮
|
||||
hasButton: function() {
|
||||
/** 判断按钮权限,用于是否显示按钮 */
|
||||
hasButton() {
|
||||
var keys = 'safetyenvironmentalinspector:add,safetyenvironmentalinspector:del,safetyenvironmentalinspector:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
|
@ -355,8 +356,8 @@ export default {
|
|||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 获取数据字典数据
|
||||
getDict: function() {
|
||||
/** 获取数据字典数据 */
|
||||
getDict() {
|
||||
requestFN(
|
||||
'/dictionaries/listSelectTree',
|
||||
{
|
||||
|
@ -364,10 +365,9 @@ export default {
|
|||
}
|
||||
).then((data) => {
|
||||
this.inspectionTypeList = JSON.parse(data.zTreeNodes)
|
||||
}).catch((e) => {
|
||||
|
||||
})
|
||||
}).catch((e) => { })
|
||||
},
|
||||
/** 重置搜索状态 */
|
||||
resetSearch() {
|
||||
this.search = {
|
||||
INSPECTED_DEPARTMENT_NAME: '', // 被检查单位
|
||||
|
@ -380,6 +380,7 @@ export default {
|
|||
}
|
||||
this.$refs.tree_InspectionType.clearHandle()
|
||||
},
|
||||
/** 重置表单数据 */
|
||||
resetForm(row) {
|
||||
console.log(row)
|
||||
this.form = {
|
||||
|
@ -391,6 +392,7 @@ export default {
|
|||
INSPECTION_USER_SIGN_TIME: ''// 检查人签字时间
|
||||
}
|
||||
},
|
||||
/** 格式化日期时间 */
|
||||
formatDate(date, format) {
|
||||
return formatDate(date, format)
|
||||
}
|
||||
|
|
|
@ -109,8 +109,8 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="page-btn-group">
|
||||
<div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
|
||||
|
@ -140,7 +140,6 @@
|
|||
</el-dialog>
|
||||
|
||||
<trajectory ref="trakectory"/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -150,6 +149,7 @@ import WriteSign from '@/components/WriteSign'
|
|||
import waves from '@/directive/waves' // waves directive
|
||||
import formatDate from '@/utils/dateformat'
|
||||
import trajectory from './trajectory'
|
||||
|
||||
export default {
|
||||
components: { Pagination, WriteSign, trajectory },
|
||||
directives: { waves },
|
||||
|
@ -208,19 +208,21 @@ export default {
|
|||
this.getList(this.ROLE_ID)
|
||||
},
|
||||
methods: {
|
||||
/** 获取行数据 Key,用于优化 table 表格的渲染 */
|
||||
getRowKey(row) {
|
||||
return row.INSPECTION_ID
|
||||
},
|
||||
// 搜索
|
||||
/** 执行参数搜索 */
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
/** 执行重置 */
|
||||
goKeyReset() {
|
||||
this.resetSearch()
|
||||
this.getQuery()
|
||||
},
|
||||
// 获取列表
|
||||
/** 获取列表 */
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
// requestFN(
|
||||
|
@ -246,29 +248,28 @@ export default {
|
|||
this.total = 0
|
||||
}, 400)
|
||||
},
|
||||
// 查看
|
||||
/** 查看指定项 */
|
||||
goDetail(row) {
|
||||
this.$parent.activeName = 'InspectionInfo'
|
||||
this.$parent.INSPECTION_ID = row.INSPECTION_ID
|
||||
},
|
||||
// 修改
|
||||
handleVerify(row) {
|
||||
this.resetForm(row)
|
||||
this.dialogFormEdit = true
|
||||
},
|
||||
/** 手写板*/
|
||||
/** 处理核实逻辑 */
|
||||
// handleVerify(row) {
|
||||
// this.resetForm(row)
|
||||
// this.dialogFormEdit = true
|
||||
// },
|
||||
/** 手写板弹框打开 */
|
||||
showModal() {
|
||||
this.dialogWriteSign = true
|
||||
},
|
||||
// 完成
|
||||
/** 手写板完成 */
|
||||
subCanvas(img64) {
|
||||
console.info('img64:' + img64)
|
||||
this.form.INSPECTION_USER_SIGN_IMG = img64
|
||||
this.$set(this.form, 'INSPECTION_USER_SIGN_TIME', formatDate(new Date(), 'YYYY-MM-DD HH:mm'))
|
||||
this.dialogWriteSign = false
|
||||
},
|
||||
|
||||
// 保存
|
||||
/** 表单保存 */
|
||||
confirm(INSPECTION_STATUS) {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
|
@ -312,9 +313,8 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 判断按钮权限,用于是否显示按钮
|
||||
hasButton: function() {
|
||||
/** 判断按钮权限,用于是否显示按钮 */
|
||||
hasButton() {
|
||||
var keys = 'safetyenvironmentalinspector:add,safetyenvironmentalinspector:del,safetyenvironmentalinspector:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
|
@ -329,8 +329,8 @@ export default {
|
|||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 获取数据字典数据
|
||||
getDict: function() {
|
||||
/** 获取数据字典数据 */
|
||||
getDict() {
|
||||
requestFN(
|
||||
'/dictionaries/getLevels',
|
||||
{
|
||||
|
@ -342,6 +342,7 @@ export default {
|
|||
|
||||
})
|
||||
},
|
||||
/** 重置搜索状态 */
|
||||
resetSearch() {
|
||||
this.search = {
|
||||
INSPECTED_DEPARTMENT_NAME: '', // 被检查单位
|
||||
|
@ -352,6 +353,7 @@ export default {
|
|||
INSPECTION_STATUS: '' // 检查状态
|
||||
}
|
||||
},
|
||||
/** 重置表单数据 */
|
||||
resetForm(row) {
|
||||
this.form = {
|
||||
INSPECTION_INSPECTOR_ID: row.INSPECTION_INSPECTOR_ID, // 安全环保检查人员主键ID
|
||||
|
@ -362,10 +364,11 @@ export default {
|
|||
INSPECTION_USER_SIGN_TIME: ''// 检查人签字时间
|
||||
}
|
||||
},
|
||||
/** 格式化日期时间 */
|
||||
formatDate(date, format) {
|
||||
return formatDate(date, format)
|
||||
},
|
||||
|
||||
/** 申辩记录进入,此时会调用 trajectory 所在子组件内的 init 方法,并传入 id 执行 init 方法的逻辑 */
|
||||
openTrajectory(id) {
|
||||
this.$refs.trakectory.init(id)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue