添加质量检查类型页面
This commit is contained in:
parent
d961c59029
commit
3eae249163
@ -28,6 +28,12 @@ export const addInspectTypeApi = data => post('xmgl/inspectType/add', data);
|
||||
export const editInspectTypeApi = data => post('xmgl/inspectType/edit', data);
|
||||
export const deleteInspectTypeApi = data => post('xmgl/inspectType/delete', data);
|
||||
|
||||
// 质量类型管理
|
||||
export const getQualityInspectTypeListApi = data => post('xmgl/qualityInspectType/list', data);
|
||||
export const addQualityInspectTypeApi = data => post('xmgl/qualityInspectType/add', data);
|
||||
export const editQualityInspectTypeApi = data => post('xmgl/qualityInspectType/edit', data);
|
||||
export const deleteQualityInspectTypeApi = data => post('xmgl/qualityInspectType/delete', data);
|
||||
|
||||
// 隐患库管理
|
||||
export const getinspectHiddenDangerLibraryListApi = data => post('xmgl/inspectHiddenDangerLibrary/selectLibraryList', data);
|
||||
export const addinspectHiddenDangerLibraryApi = data => post('xmgl/inspectHiddenDangerLibrary/add', data);
|
||||
|
||||
@ -175,12 +175,12 @@ if (process.env.NODE_ENV == "development") {
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28890/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = "http://192.168.34.221:9111/"; //郭圣雄本地
|
||||
axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// axios.defaults.baseURL = 'http://182.90.224.237:51234/' //郭圣雄远程
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
|
||||
// axios.defaults.baseURL ='http://183.249.224.118:9000/' //嘉兴王江泾公用码头
|
||||
// axios.defaults.baseURL = 'http://101.43.164.214:11111/' // 百色三标段项目
|
||||
axios.defaults.baseURL = 'http://101.43.164.214:11111/' // 百色三标段项目
|
||||
// axios.defaults.baseURL = 'http://125.88.207.86:8088/'//中建四局线上(最新)地址
|
||||
// axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址
|
||||
|
||||
@ -3701,6 +3701,14 @@ const routes2 = [{
|
||||
"../views/companyAdmin/qualityAndSafety/hiddenDangerLibrary.vue"
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "/companyAdmin/qualityAndSafety/qualityCheckTypes",
|
||||
name: "qualityCheckTypes",
|
||||
component: () =>
|
||||
import (
|
||||
"../views/companyAdmin/basicSetup/qualityCheckTypes.vue"
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "/companyAdmin/qualityAndSafety/securityCheckTypes",
|
||||
name: "securityCheckTypes",
|
||||
|
||||
@ -46,8 +46,8 @@ export default new Vuex.Store({
|
||||
|
||||
state: {
|
||||
PAGESIZRS: [10, 20, 30, 50],
|
||||
UPLOADURL: "http://222.80.185.228:6090/upload/image/", // 木垒
|
||||
FILEURL: "http://222.80.185.228:6090/image/", //木垒
|
||||
// UPLOADURL: "http://222.80.185.228:6090/upload/image/", // 木垒
|
||||
// FILEURL: "http://222.80.185.228:6090/image/", //木垒
|
||||
// UPLOADURL: 'http://192.168.9.249:9820/upload/image/', // 四川网城
|
||||
// FILEURL: ' http://192.168.9.249:9820/image/', // 四川网城
|
||||
// UPLOADURL: 'http://192.168.9.249:9809/upload/image/', // 同济
|
||||
@ -56,8 +56,8 @@ export default new Vuex.Store({
|
||||
// FILEURL: 'http://1.13.185.209:9820/image/', // 中科佳成
|
||||
// UPLOADURL: 'http://8.136.222.164:8808/upload/image/', // 中科安信
|
||||
// FILEURL: 'http://8.136.222.164:8808/image/', // 中科安信
|
||||
// UPLOADURL: ' http://101.43.164.214:11111/upload/image/', // 百色
|
||||
// FILEURL: ' http://101.43.164.214:11111/image/', // 百色
|
||||
UPLOADURL: 'http://101.43.164.214:11111/upload/image/', // 百色
|
||||
FILEURL: 'http://101.43.164.214:11111/image/', // 百色
|
||||
// UPLOADURL:'http://182.90.224.237:51234/upload/image/',
|
||||
// FILEURL:'http://182.90.224.237:51234/image/',
|
||||
// UPLOADURL: "http://http://192.168.34.155:19111/upload/image/", // 洁本地
|
||||
|
||||
172
src/views/companyAdmin/basicSetup/qualityCheckTypes.vue
Normal file
172
src/views/companyAdmin/basicSetup/qualityCheckTypes.vue
Normal file
@ -0,0 +1,172 @@
|
||||
<template>
|
||||
<div class="fullHeight">
|
||||
<div class="searchBox whiteBlock">
|
||||
<el-button size="medium" type="primary" @click="addBefore">{{$t('message.workType.operate.add')}}
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="table_wrap whiteBlock">
|
||||
<vue-scroll>
|
||||
<el-table class="tables" :data="workerList">
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="50"
|
||||
align="center"
|
||||
:label="$t('message.personnelPosition.beaconManage.table.index')"
|
||||
></el-table-column>
|
||||
<el-table-column prop="inspectTypeName" :label="'类型名称'"></el-table-column>
|
||||
<el-table-column prop="description" :label="'描述'"></el-table-column>
|
||||
<el-table-column width="200">
|
||||
<template slot-scope="scope">
|
||||
<div class="tableBtns">
|
||||
<div @click="editBefore(scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-edit.png" width="15px" height="15px"/>
|
||||
<span>{{$t('message.workType.edit')}}</span>
|
||||
</div>
|
||||
<div @click="deleteBefore(scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-delete.png" width="15px" height="15px"/>
|
||||
<span>{{$t('message.workType.delete')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
<!--:title="type==='add'?'添加工种':type==='edit'?'编辑工种':type==='delete'?'删除工种':''"-->
|
||||
<el-dialog
|
||||
:modal-append-to-body="false"
|
||||
:title="$t('message.workType.operate')[type]"
|
||||
:visible.sync="dialogVisible"
|
||||
width="667px">
|
||||
<div class="dialog_content">
|
||||
<el-form label-width="120px" size="medium" class="dialogFormBox" ref="addEditForm" :model="workerInfo">
|
||||
<el-form-item :label="'类型名称'" prop="inspectTypeName" :rules="[
|
||||
{ required: true, message: '请输入', trigger: 'blur' }
|
||||
]">
|
||||
<el-input v-model="workerInfo.inspectTypeName"
|
||||
:placeholder="$t('message.workType.placeholder')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="'描述'" prop="description">
|
||||
<el-input v-model="workerInfo.description" type="textarea"
|
||||
:placeholder="$t('message.workType.placeholder')"></el-input>
|
||||
</el-form-item>
|
||||
<div class="dialog-footer">
|
||||
<el-button
|
||||
class="cancleBtn"
|
||||
@click="dialogVisible = false"
|
||||
icon="el-icon-circle-close"
|
||||
size="medium"
|
||||
>{{$t('message.personnelPosition.cancel')}}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
@click="addWorker"
|
||||
size="medium"
|
||||
>{{$t('message.personnelPosition.determine')}}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {addQualityInspectTypeApi, editQualityInspectTypeApi, deleteQualityInspectTypeApi, getQualityInspectTypeListApi} from '@/assets/js/api/safeManage'
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
this.getWorkerList();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: 'add',
|
||||
workerInfo: {inspectTypeName: '',description:''},
|
||||
workerList: [],
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addWorker() {
|
||||
if (this.type === 'add') {
|
||||
this.$refs['addEditForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
addQualityInspectTypeApi({
|
||||
sn: this.$store.state.userInfo.headquartersSn,
|
||||
inspectTypeName: this.workerInfo.inspectTypeName,
|
||||
description:this.workerInfo.description
|
||||
}).then(result => {
|
||||
if (result.success) {
|
||||
this.dialogVisible = false;
|
||||
this.$message.success(result.message);
|
||||
this.getWorkerList();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
} else if (this.type === 'edit') {
|
||||
this.$refs['addEditForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
editQualityInspectTypeApi(this.workerInfo).then(result => {
|
||||
if (result.success) {
|
||||
this.dialogVisible = false;
|
||||
this.$message.success(result.message);
|
||||
this.getWorkerList();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
} else if (this.type === 'delete') {
|
||||
deleteQualityInspectTypeApi({id: this.workerInfo.id}).then(result => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message);
|
||||
this.getWorkerList();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
PopupBefore(type, worker) {
|
||||
this.dialogVisible = true;
|
||||
this.type = type;
|
||||
this.workerInfo = JSON.parse(JSON.stringify(worker));
|
||||
},
|
||||
addBefore() {
|
||||
this.PopupBefore('add', {inspectTypeName: ''});
|
||||
},
|
||||
editBefore(worker) {
|
||||
this.PopupBefore('edit', worker);
|
||||
},
|
||||
deleteBefore(worker) {
|
||||
this.type = 'delete';
|
||||
this.workerInfo = worker;
|
||||
this.$confirm(this.$t('message.personnelPosition.beaconManage.table.confirmText') + "【" + worker.inspectTypeName + "】?", this.$t('message.personnelPosition.beaconManage.table.Tips'), {
|
||||
confirmButtonText: this.$t('message.personnelPosition.confirmButtonText'),
|
||||
cancelButtonText: this.$t('message.personnelPosition.cancelButtonText'),
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
this.addWorker();
|
||||
})
|
||||
},
|
||||
getWorkerList() {
|
||||
getQualityInspectTypeListApi({sn: this.$store.state.userInfo.headquartersSn}).then(result => {
|
||||
this.workerList = result.result;
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
@ -399,7 +399,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getInspectTypeListApi,
|
||||
getQualityInspectTypeListApi,
|
||||
getinspectTaskRecordListApi,
|
||||
addinspectTaskRecordApi,
|
||||
deleteinspectTaskRecordApi
|
||||
@ -597,7 +597,7 @@ export default {
|
||||
this.$router.push('/project/qualityManage/subTasklist?id=' + item.id)
|
||||
},
|
||||
getCheckTypeList() {
|
||||
getInspectTypeListApi({
|
||||
getQualityInspectTypeListApi({
|
||||
sn: this.$store.state.userInfo.headquartersSn
|
||||
}).then((result) => {
|
||||
console.log('检查类型', result)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user