| | |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | export function safetyInspectionItemId(data) { |
| | | return request({ |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/safetyInspectionItem/info', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | meta: { title: '自查清单', icon: '' } |
| | | }, |
| | | { |
| | | id: 2, |
| | | parentId: 0, |
| | | // id: 2, |
| | | // parentId: 0, |
| | | path: '/review', |
| | | name: '自查清单_评审', |
| | | // name: '自查清单_评审', |
| | | component: () => import('@/views/safetyproduction/review'), |
| | | meta: { title: '自查清单_评审', icon: '' } |
| | | // meta: { title: '自查清单_评审', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | id: 2, |
| | | parentId: 0, |
| | | // id: 2, |
| | | // parentId: 0, |
| | | path: '/gojudging', |
| | | name: '自查清单_去评审', |
| | | // name: '自查清单_去评审', |
| | | component: () => import('@/views/safetyproduction/gojudging'), |
| | | meta: { title: '自查清单_去评审', icon: '' } |
| | | // meta: { title: '自查清单_去评审', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/new', |
| | |
| | | hidden: true |
| | | }, |
| | | { |
| | | id: 2, |
| | | parentId: 0, |
| | | // id: 2, |
| | | // parentId: 0, |
| | | path: '/reviewXG', |
| | | name: '自查清单_修改', |
| | | // name: '自查清单_修改', |
| | | component: () => import('@/views/safetyproduction/reviewXG'), |
| | | meta: { title: '自查清单_修改', icon: '' } |
| | | // meta: { title: '自查清单_修改', icon: '' } |
| | | hidden: true |
| | | } |
| | | ] |
| | | }, |
| | |
| | | <el-button v-if="scope.row.status==1" @click="handleClick(scope.row)" type="text" size="small" |
| | | >查看</el-button |
| | | > |
| | | <el-button v-if="scope.row.status==1?false:true" type="text" size="small" style="color: red" |
| | | <el-button @click="Del(scope.row.id)" v-if="scope.row.status==1?false:true" type="text" size="small" style="color: red" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { safetySelfInspectionList } from "@/api/safetySelfInspection.js"; |
| | | import { safetySelfInspectionList,safetySelfInspectionDel} from "@/api/safetySelfInspection.js"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | handleClick(index) {}, |
| | | handleClick(val) { |
| | | console.log(val) |
| | | if(val.status==-1){ |
| | | this.$router.push({ |
| | | path:"/new", |
| | | query:{ |
| | | id:val.id, |
| | | name:'编辑' |
| | | } |
| | | }) |
| | | }else if(val.status==0){ |
| | | this.$router.push({ |
| | | path:"/gojudging", |
| | | query:{ |
| | | id:val.id |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | find() { |
| | | this.safetySelfInspectionL(); |
| | | }, |
| | |
| | | }, |
| | | jump(){ |
| | | this.$router.push({ |
| | | path:"/new" |
| | | path:"/new", |
| | | query:{ |
| | | name:'添加' |
| | | } |
| | | }) |
| | | }, |
| | | Del(id){ |
| | | safetySelfInspectionDel({id:id}).then(res=>{ |
| | | if(res.data.code==200){ |
| | | this.safetySelfInspectionL(); |
| | | this.$notify({ |
| | | title: "成功", |
| | | message: "删除成功", |
| | | type: "success", |
| | | duration: 2000, |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | |
| | | <template> |
| | | <div> |
| | | <div class="box-right"> |
| | | <div class="title">A级要素:<span>A级要素2</span></div> |
| | | <div v-for="(item,index) in 2" :key="index"> |
| | | <div class="box-right"> |
| | | <div v-for="(item, index) in lists" :key="index"> |
| | | <div class="title"> |
| | | A级要素:<span>{{ item.elementAName }}</span> |
| | | </div> |
| | | <div v-for="(item, index) in item.child" :key="index"> |
| | | <el-row class="titles"> |
| | | <el-col :span="6"><p><span>B级要素:</span>法律、法规和标准的识别和获取</p></el-col> |
| | | <el-col :span="6"><p><span>得分:</span>50</p></el-col> |
| | | <el-col :span="6" |
| | | ><p><span>B级要素:</span>{{ item.elementBName }}</p></el-col |
| | | > |
| | | <el-col :span="6" |
| | | ><p><span>得分:</span>50</p></el-col |
| | | > |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-col :span="24"> |
| | | <el-table border :data="item.child"> |
| | | <el-table-column |
| | | prop="standardizationRequirements" |
| | | align="center" |
| | | label="标准化要求" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="enterpriseStandard" |
| | | align="center" |
| | | label="企业达标标准" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="reviewMethod" |
| | | align="center" |
| | | label="评审方法" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="veto" |
| | | align="center" |
| | | label="否决项" |
| | | ></el-table-column> |
| | | <el-table-column align="center" label="评审结果"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="(scope.row.safetyInspectionItemResult = 0)" |
| | | >是</span |
| | | > |
| | | <span v-if="(scope.row.safetyInspectionItemResult = 1)" |
| | | >否</span |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | label="扣分项" |
| | | type="expand" |
| | | width="100px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-table |
| | | border |
| | | :data="tableData" |
| | | :data="scope.row.selfDeductionList" |
| | | > |
| | | <el-table-column |
| | | prop="date" |
| | | align="center" |
| | | label="标准化要求" |
| | | > |
| | | <el-table-column prop="name" align="center" label="扣分项"> |
| | | </el-table-column> |
| | | <el-table-column prop="point" align="center" label="扣分"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | align="center" |
| | | label="企业达标标准" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | align="center" |
| | | label="评审方法" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | align="center" |
| | | label="评审标准" |
| | | > |
| | | <el-table-column |
| | | prop="name" |
| | | align="center" |
| | | label="否决项" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | align="center" |
| | | label="扣分项" |
| | | ></el-table-column> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | align="center" |
| | | label="扣分" |
| | | type="expand" |
| | | width="50px" |
| | | > |
| | | <el-table |
| | | :data="tableData" |
| | | > |
| | | <el-table-column |
| | | prop="name" |
| | | align="center" |
| | | label="扣分项" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="date" |
| | | align="center" |
| | | label="扣分" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="date" |
| | | prop="remark" |
| | | align="center" |
| | | label="扣分备注" |
| | | > |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | align="center" |
| | | label="备注" |
| | | ></el-table-column> |
| | | <el-table-column align="center" label="操作" width="200px"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="handleClick(scope.row)" |
| | | type="text" |
| | | size="small" |
| | | >评价</el-button |
| | | > |
| | | <!-- <el-button type="text" size="small" style="color: red" |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="" |
| | | align="center" |
| | | label="备注" |
| | | ></el-table-column> |
| | | <el-table-column align="center" label="操作" width="200px"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="handleClick(scope.row)" |
| | | type="text" |
| | | size="small" |
| | | >评价</el-button |
| | | > |
| | | <!-- <el-button type="text" size="small" style="color: red" |
| | | >删除</el-button |
| | | > --> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import Titlename from "../../components/Titlename/index.vue"; |
| | | import { safetySelfInspectionInfo } from "@/api/safetySelfInspection.js"; |
| | | export default { |
| | | components: { Titlename }, |
| | | data() { |
| | |
| | | form: { |
| | | name: "", |
| | | }, |
| | | id: "", |
| | | formInline: { |
| | | user: "", |
| | | region: "", |
| | | }, |
| | | tableData: [ |
| | | { |
| | | date: "2016-05-02", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1518 弄", |
| | | zip: 200333, |
| | | }, |
| | | { |
| | | date: "2016-05-04", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1517 弄", |
| | | zip: 200333, |
| | | }, |
| | | { |
| | | date: "2016-05-01", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1519 弄", |
| | | zip: 200333, |
| | | }, |
| | | { |
| | | date: "2016-05-03", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1516 弄", |
| | | zip: 200333, |
| | | }, |
| | | ], |
| | | defaultProps: { |
| | | children: "children", |
| | | label: "label", |
| | | }, |
| | | list: [], |
| | | lists: [], |
| | | }; |
| | | }, |
| | | created() { |
| | | this.id = this.$route.query.id; |
| | | this.safeInitem(this.id); |
| | | }, |
| | | methods: { |
| | | btnsQX() { |
| | | this.show = true; |
| | | safeInitem(id) { |
| | | safetySelfInspectionInfo({ id: id }).then((res) => { |
| | | // console.log("数据", res); |
| | | if (res.data.code == 200) this.list = res.data.result; |
| | | var arr = this.checkSameDataA(this.list.itemList); |
| | | for (var i = 0; i < arr.length; i++) { |
| | | arr[i].child = this.checkSameData(arr[i].child); |
| | | } |
| | | this.lists = arr; |
| | | console.log(this.lists) |
| | | }); |
| | | }, |
| | | checkSameDataA(resData) { |
| | | let dataInfo = {}; |
| | | resData.forEach((item, index) => { |
| | | let { elementAName } = item; |
| | | if (!dataInfo[elementAName]) { |
| | | dataInfo[elementAName] = { |
| | | elementAName, |
| | | child: [], |
| | | }; |
| | | } |
| | | dataInfo[elementAName].child.push(item); |
| | | }); |
| | | let list = Object.values(dataInfo); // list 转换成功的数据 |
| | | return list; |
| | | }, |
| | | checkSameData(resData) { |
| | | let dataInfo = {}; |
| | | resData.forEach((item, index) => { |
| | | let { elementBName } = item; |
| | | if (!dataInfo[elementBName]) { |
| | | dataInfo[elementBName] = { |
| | | elementBName, |
| | | child: [], |
| | | }; |
| | | } |
| | | dataInfo[elementBName].child.push(item); |
| | | }); |
| | | let list = Object.values(dataInfo); // list 转换成功的数据 |
| | | return list; |
| | | }, |
| | | handleClick(data) { |
| | | console.log(data.id); |
| | | this.$router.push({ |
| | | path: "/review", |
| | | query: { |
| | | id: data.id, |
| | | }, |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | border-radius: 5px; |
| | | padding: 20px; |
| | | } |
| | | .title{ |
| | | .title { |
| | | font-size: 16px; |
| | | padding: 10px 0px; |
| | | font-weight: bold; |
| | | } |
| | | .titles{ |
| | | .titles { |
| | | font-size: 14px; |
| | | } |
| | | </style> |
| | |
| | | <Titlename title="检查项树"></Titlename> |
| | | <div class="box-left-content"> |
| | | <el-tree |
| | | ref="tree" |
| | | :data="tree" |
| | | node-key="id" |
| | | node-key="value" |
| | | @check="treeClick" |
| | | :expand-on-click-node="false" |
| | | :default-checked-keys="treeList" |
| | | show-checkbox |
| | | ></el-tree> |
| | | </div> |
| | | </div> |
| | | <div class="box-right" v-if="list == '' ? false : true"> |
| | | <el-button type="primary" @click="open()" class="btns">添加</el-button> |
| | | <div class="btns"> |
| | | <el-button type="primary" class="btn" @click="open(0)">添加</el-button> |
| | | <el-button type="primary" class="btn" @click="open(-1)">暂存</el-button> |
| | | </div> |
| | | <div v-for="(item, i) in lists" :key="i"> |
| | | <div class="title"> |
| | | A级要素:<span>{{ item.nameA }}</span> |
| | | A级要素:<span>{{ item.elementAName }}</span> |
| | | </div> |
| | | <div v-for="(item, index) in item.child" :key="index"> |
| | | <el-row class="titles"> |
| | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22" :offset="1"> |
| | | <el-table border :data="item.child"> |
| | | <el-table ref="table" border :data="item.child"> |
| | | <el-table-column |
| | | prop="standardizationRequirements" |
| | | align="center" |
| | |
| | | <el-table-column |
| | | align="center" |
| | | width="80px" |
| | | type="expand" |
| | | label="扣分项" |
| | | type="expand" |
| | | > |
| | | <el-table :data="item.child.deductionList"> |
| | | <template slot-scope="scope"> |
| | | <el-table :data="scope.row.deductionList"> |
| | | <el-table-column |
| | | prop="name" |
| | | align="center" |
| | |
| | | > |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="操作" width="200px"> |
| | |
| | | <el-input v-model="form.inspectionName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="检查人名称"> |
| | | <el-select v-model="form.inspector" placeholder="请选择"> |
| | | <el-select v-model="form.inspector" style="width:100%" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in nameList" |
| | | :key="item.id" |
| | |
| | | </el-form-item> |
| | | <el-form-item label="时间"> |
| | | <el-col :span="11"> |
| | | <el-date-picker type="date" format="yyyy 年 MM 月 dd 日" placeholder="开始时间" v-model="form.inspectionTime" style="width: 100%;"></el-date-picker> |
| | | <el-date-picker type="date" format="yyyy 年 MM 月 dd 日" placeholder="开始时间" v-model="form.inspectionTime" style="width: 100%;"></el-date-picker> |
| | | </el-col> |
| | | <!-- <el-col style="text-align:center" :span="2">-</el-col> |
| | | <el-col :span="11"> |
| | |
| | | </el-col> --> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <span slot="footer" style="text-align:center;display:block;" class="dialog-footer"> |
| | | <el-button type="primary" class="btn" @click="addC">确 定</el-button> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="addC">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | safetyInspectionItemTreeB, |
| | | safetySelfInspectionAdd, |
| | | safetyInspectionItemName, |
| | | safetySelfInspectionInfo, |
| | | safetySelfInspectionMod, |
| | | } from "@/api/safetySelfInspection.js"; |
| | | export default { |
| | | components: { Titlename }, |
| | |
| | | nameList:[], |
| | | tree: [], |
| | | id: "", |
| | | nameA: "", |
| | | arr:[] |
| | | elementAName: "", |
| | | arr:[], |
| | | treeList:[], |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'label' |
| | | }, |
| | | itemId:"" |
| | | }; |
| | | }, |
| | | created() { |
| | | this.TreeA(); |
| | | this.id=this.$route.query.name |
| | | this.itemId=this.$route.query.id |
| | | this.itemInfo(this.$route.query.id) |
| | | }, |
| | | methods: { |
| | | itemInfo(id) { |
| | | safetySelfInspectionInfo({id:id}).then((res) => { |
| | | if (res.data.code == 200){ |
| | | this.form=res.data.result |
| | | console.log(res.data.result) |
| | | this.list = res.data.result; |
| | | var trees=[] |
| | | for(var i=0;i<this.list.itemList.length;i++){ |
| | | trees.push(this.list.itemList[i].elementA) |
| | | } |
| | | this.treeList=Array.from(new Set(trees)) |
| | | var arr = this.checkSameDataA(this.list.itemList); |
| | | console.log('tag', arr) |
| | | for (var i = 0; i < arr.length; i++) { |
| | | arr[i].child = this.checkSameData(arr[i].child); |
| | | arr[i].id={safetySelfInspectionId:arr[i].child.safetySelfInspectionId,safetyInspectionItemId:arr[i].child.safetyInspectionItemId} |
| | | } |
| | | this.lists = arr; |
| | | console.log(this.lists) |
| | | } |
| | | }); |
| | | }, |
| | | TreeA() { |
| | | safetyInspectionItemTreeA().then((res) => { |
| | | if (res.data.code == 200) { |
| | | // console.log(res.data) |
| | | this.tree = res.data.result; |
| | | } |
| | | }); |
| | |
| | | TreeB(id) { |
| | | safetyInspectionItemTreeB({ id: id }).then((res) => { |
| | | this.list=[] |
| | | if(this.id=="添加"){ |
| | | if (res.data.code == 200) { |
| | | this.list = res.data.result; |
| | | console.log(this.list) |
| | | var capA={nameA:'',id:[],child:[]} |
| | | var capA={elementAName:'',id:[],child:[]} |
| | | var atte=[] |
| | | capA.nameA = this.list[0].elementAName; |
| | | capA.elementAName = this.list[0].elementAName; |
| | | for(var i=0;i<this.list.length;i++){ |
| | | var capB={safetySelfInspectionId:"",safetyInspectionItemId:""} |
| | | capB.safetyInspectionItemId=this.list[i].id |
| | |
| | | } |
| | | capA.id=atte |
| | | capA.child= this.checkSameData(this.list); |
| | | if(this.lists.findIndex(item=>item.nameA===capA.nameA)==-1){ |
| | | if(this.lists.findIndex(item=>item.elementAName===capA.elementAName)==-1){ |
| | | this.lists.push(capA) |
| | | |
| | | }else{ |
| | | var i=this.lists.findIndex(item=>item.nameA===capA.nameA) |
| | | var i=this.lists.findIndex(item=>item.elementAName===capA.elementAName) |
| | | this.lists.splice(i,1) |
| | | } |
| | | } |
| | | console.log(this.lists) |
| | | }else if(this.id=="编辑"){ |
| | | this.list = res.data.result; |
| | | var capA={elementAName:'',id:[],child:[]} |
| | | var atte=[] |
| | | capA.elementAName = this.list[0].elementAName; |
| | | for(var i=0;i<this.list.length;i++){ |
| | | var capB={safetySelfInspectionId:"",safetyInspectionItemId:""} |
| | | capB.safetyInspectionItemId=this.list[i].id |
| | | capB.safetySelfInspectionId=this.itemId |
| | | atte.push(capB) |
| | | } |
| | | console.log("数据",this.lists) |
| | | capA.id=atte |
| | | capA.child= this.checkSameData(this.list); |
| | | if(this.lists.findIndex(item=>item.elementAName===capA.elementAName)==-1){ |
| | | this.lists.push(capA) |
| | | |
| | | }else{ |
| | | var i=this.lists.findIndex(item=>item.elementAName===capA.elementAName) |
| | | this.lists.splice(i,1) |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | checkSameDataA(resData) { |
| | | let dataInfo = {}; |
| | | resData.forEach((item, index) => { |
| | | let { elementAName } = item; |
| | | if (!dataInfo[elementAName]) { |
| | | dataInfo[elementAName] = { |
| | | elementAName, |
| | | id:{}, |
| | | child: [], |
| | | }; |
| | | } |
| | | dataInfo[elementAName].child.push(item); |
| | | }); |
| | | let list = Object.values(dataInfo); // list 转换成功的数据 |
| | | return list; |
| | | }, |
| | | checkSameData(resData) { |
| | | let dataInfo = {}; |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | open(){ |
| | | open(type){ |
| | | this.dialogVisible = true |
| | | this.form.status=type |
| | | var arr=[] |
| | | for(var i=0;i<this.lists.length;i++){ |
| | | this.lists[i].id |
| | |
| | | } |
| | | } |
| | | this.form.itemList=arr |
| | | this.dialogVisible = true |
| | | safetyInspectionItemName().then(res=>{ |
| | | // console.log(res) |
| | | if(res.data.code==200){ |
| | | if(res.data.code==200){ |
| | | this.nameList=res.data.result |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | addC(){ |
| | | if(this.id=='添加'){ |
| | | safetySelfInspectionAdd(this.form).then(res=>{ |
| | | if(res.data.code==200){ |
| | | this.dialogVisible=false |
| | |
| | | } |
| | | |
| | | }) |
| | | }else if(this.id=='编辑'){ |
| | | safetySelfInspectionMod(this.form).then(res=>{ |
| | | this.dialogVisible=false |
| | | this.$notify({ |
| | | type: "success", |
| | | duration: 2000, |
| | | message: "编辑成功", |
| | | title: "成功", |
| | | }); |
| | | }) |
| | | } |
| | | }, |
| | | btnsQX() { |
| | | this.show = true; |
| | |
| | | border-radius: 5px; |
| | | } |
| | | .box-left-content { |
| | | padding: 10px; |
| | | padding:10px 20px; |
| | | } |
| | | .box-right { |
| | | position: relative; |
| | |
| | | top: 10px; |
| | | right: 50px; |
| | | } |
| | | .box-left-content /deep/ .el-tree-node__expand-icon{ |
| | | display: none; |
| | | } |
| | | .btn { |
| | | background-color: #034ea2; |
| | | border: 1px solid #034ea2; |
| | | } |
| | | </style> |
| | |
| | | <div class="box"> |
| | | <div class="box-right"> |
| | | <Titlename title="基础信息"></Titlename> |
| | | <el-form ref="form" :model="form" label-width="120px"> |
| | | <el-form ref="form" :model="list" label-width="120px"> |
| | | <div style="width: 80%; margin: auto"> |
| | | <el-row class="box-right-content" align="top"> |
| | | <el-col :span="11"> |
| | | <el-form-item label="A级要素"> |
| | | <el-select |
| | | v-model="formInline.region" |
| | | v-model="list.elementAName" |
| | | :disabled="true" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="区域一" value="shanghai"></el-option> |
| | | <el-option label="区域二" value="beijing"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2" style="white-space: nowrap"> |
| | | <el-form-item label="B级要素"> |
| | | <el-select |
| | | v-model="formInline.region" |
| | | v-model="list.elementBName" |
| | | :disabled="true" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="区域一" value="shanghai"></el-option> |
| | | <el-option label="区域二" value="beijing"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-input |
| | | :rows="3" |
| | | type="textarea" |
| | | v-model="form.name" |
| | | :disabled="true" |
| | | v-model="list.standardizationRequirements" |
| | | placeholder="" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="form.name" |
| | | :disabled="true" |
| | | v-model="list.enterpriseStandard" |
| | | placeholder="" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="form.name" |
| | | :disabled="true" |
| | | v-model="list.reviewMethod" |
| | | placeholder="" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="form.name" |
| | | :disabled="true" |
| | | v-model="list.veto" |
| | | placeholder="" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-row> |
| | | <el-col :span="22" :offset="2"> |
| | | <el-table |
| | | :data="tableData" |
| | | :data="list.selfDeductionList" |
| | | border |
| | | style="width: 99%; margin-left: 1%" |
| | | > |
| | | <el-table-column |
| | | prop="date" |
| | | type="index" |
| | | align="center" |
| | | label="序号" |
| | | width="150" |
| | |
| | | align="center" |
| | | label="说明" |
| | | ></el-table-column> |
| | | <!-- <el-table-column align="center" label="操作" width="200px"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="handleClick(scope.row)" |
| | | type="text" |
| | | size="small" |
| | | >编辑</el-button |
| | | > |
| | | <el-button type="text" size="small" style="color: red" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="是否否决项"> |
| | | <el-radio-group v-model="resource"> |
| | | <el-radio label="0">是</el-radio> |
| | | <el-radio label="1">否</el-radio> |
| | | <el-radio-group v-model="list.safetyInspectionItemResult"> |
| | | <el-radio :label="0">是</el-radio> |
| | | <el-radio :label="1">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item></el-col |
| | | > |
| | | </el-row> |
| | | <div v-if="resource == '0' ? false : true"> |
| | | <div |
| | | v-if=" |
| | | list.safetyInspectionItemResult == '0' || null ? false : true |
| | | " |
| | | > |
| | | <el-row style="padding: 15px 1%"> |
| | | <el-col :span="22" :offset="2"> |
| | | <span |
| | |
| | | <el-col :span="22" :offset="2"> |
| | | <el-table |
| | | border |
| | | :data="tableData" |
| | | :data="list.selfDeductionList" |
| | | style="width: 99%; margin-left: 1%" |
| | | > |
| | | <el-table-column |
| | | prop="date" |
| | | type="index" |
| | | align="center" |
| | | label="序号" |
| | | width="150" |
| | |
| | | label="说明" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | prop="point" |
| | | align="center" |
| | | label="扣分值" |
| | | ></el-table-column> |
| | |
| | | size="small" |
| | | >修改</el-button |
| | | > |
| | | <el-button type="text" size="small" style="color: red" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </div> |
| | | <el-row> |
| | | <el-col :span="24" style="padding: 20px 0; text-align: center"> |
| | | <el-button type="primary" class="btns">提交</el-button> |
| | | <el-button>取消</el-button> |
| | | <el-button type="primary" @click="modItem()" class="btns" |
| | | >提交</el-button |
| | | > |
| | | <el-button @click="back()">取消</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | <el-dialog title="扣分详情" :visible.sync="dialogVisible" width="30%"> |
| | | <el-form ref="form" :model="form" label-width="54px"> |
| | | <el-form-item label="说明"> |
| | | <el-input v-model="form.name"></el-input> |
| | | <el-input disabled="true" v-model="form.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="扣分值"> |
| | | <el-input v-model="form.name"></el-input> |
| | | <el-input v-model="form.point"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注"> |
| | | <el-input v-model="form.name" :rows="5" type="textarea"></el-input> |
| | | <el-input v-model="form.remark" :rows="5" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span |
| | |
| | | <el-button type="primary" class="btns" @click="dialogVisible = false" |
| | | >确 定</el-button |
| | | > |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button @click="lost()">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import Titlename from "../../components/Titlename/index.vue"; |
| | | import { |
| | | safetySelfInspectionItemInfo, |
| | | safetySelfInspectionModItemInfo, |
| | | } from "@/api/safetySelfInspection.js"; |
| | | export default { |
| | | components: { Titlename }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | resource: "0", |
| | | form: { |
| | | name: "", |
| | | }, |
| | | formInline: { |
| | | user: "", |
| | | region: "", |
| | | }, |
| | | tableData: [ |
| | | { |
| | | date: "2016-05-02", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1518 弄", |
| | | zip: 200333, |
| | | }, |
| | | { |
| | | date: "2016-05-04", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1517 弄", |
| | | zip: 200333, |
| | | }, |
| | | { |
| | | date: "2016-05-01", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1519 弄", |
| | | zip: 200333, |
| | | }, |
| | | { |
| | | date: "2016-05-03", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1516 弄", |
| | | zip: 200333, |
| | | }, |
| | | ], |
| | | defaultProps: { |
| | | children: "children", |
| | | label: "label", |
| | | }, |
| | | id: "", |
| | | form: {}, |
| | | list: [], |
| | | }; |
| | | }, |
| | | created() { |
| | | this.id = this.$route.query; |
| | | this.itemInfo(this.$route.query); |
| | | }, |
| | | methods: { |
| | | handleClick() { |
| | | itemInfo(id) { |
| | | safetySelfInspectionItemInfo(id).then((res) => { |
| | | this.list = res.data.result; |
| | | }); |
| | | }, |
| | | modItem() { |
| | | safetySelfInspectionModItemInfo(this.list).then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.$notify({ |
| | | type: "success", |
| | | duration: 2000, |
| | | message: "提交成功", |
| | | title: "成功", |
| | | }); |
| | | this.$router.push({ |
| | | path: "/gojudging", |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | back() { |
| | | this.$router.push({ |
| | | path: "/gojudging", |
| | | }); |
| | | }, |
| | | handleClick(data) { |
| | | this.dialogVisible = true; |
| | | this.form = data; |
| | | console.log(data); |
| | | }, |
| | | lost() { |
| | | this.dialogVisible = false; |
| | | this.itemInfo(this.id); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | <el-col :span="11"> |
| | | <el-form-item label="A级要素"> |
| | | <el-select |
| | | v-model="formInline.region" |
| | | v-model="form.elementAName" |
| | | :disabled="true" |
| | | style="width: 100%" |
| | | > |
| | |
| | | <el-col :span="11" :offset="2" style="white-space: nowrap"> |
| | | <el-form-item label="B级要素"> |
| | | <el-select |
| | | v-model="formInline.region" |
| | | v-model="form.elementBName" |
| | | :disabled="true" |
| | | style="width: 100%" |
| | | > |
| | |
| | | <el-input |
| | | :rows="3" |
| | | type="textarea" |
| | | v-model="form.name" |
| | | v-model="form.standardizationRequirements" |
| | | placeholder="" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="form.name" |
| | | v-model="form.enterpriseStandard" |
| | | placeholder="" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="form.name" |
| | | v-model="form.reviewMethod" |
| | | placeholder="" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="form.name" |
| | | v-model="form.veto" |
| | | placeholder="" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | > |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right"> |
| | | <el-button type="primary" @click="dialogVisible=true" class="btns" size="mini" icon="el-icon-plus" |
| | | >新增</el-button |
| | | > |
| | | </el-col> |
| | | <el-button |
| | | type="primary" |
| | | @click="coAdd('', '新增')" |
| | | class="btns" |
| | | size="mini" |
| | | icon="el-icon-plus" |
| | | >新增</el-button |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22" :offset="2"> |
| | | <el-table |
| | | :data="tableData" |
| | | :data="form.deductionList" |
| | | border |
| | | style="width: 99%; margin-left: 1%" |
| | | > |
| | | <el-table-column |
| | | prop="date" |
| | | type="index" |
| | | align="center" |
| | | label="序号" |
| | | width="150" |
| | |
| | | label="说明" |
| | | ></el-table-column> |
| | | <el-table-column align="center" label="操作" width="200px"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="handleClick(scope.row)" |
| | | type="text" |
| | | size="small" |
| | | >编辑</el-button |
| | | > |
| | | <el-button type="text" size="small" style="color: red" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="coAdd(scope.row, '编辑')" |
| | | type="text" |
| | | size="small" |
| | | >编辑</el-button |
| | | > |
| | | <el-button |
| | | type="text" |
| | | size="small" |
| | | style="color: red" |
| | | @click="listDel(scope.row)" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-row> |
| | | <el-col :span="24" style="padding: 20px 0; text-align: center"> |
| | | <el-button type="primary" class="btns">提交</el-button> |
| | | <el-button>取消</el-button> |
| | | <el-button type="primary" @click="safetyInspectionItemA()" class="btns">提交</el-button> |
| | | <el-button @click="back()">取消</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | </div> |
| | | |
| | | <el-dialog title="扣分详情" :visible.sync="dialogVisible" width="30%"> |
| | | <el-form ref="form" :model="form" label-width="54px"> |
| | | <el-form ref="form" :model="formInline" label-width="54px"> |
| | | <el-form-item label="说明"> |
| | | <el-input v-model="form.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="扣分值"> |
| | | <el-input v-model="form.name"></el-input> |
| | | <el-input v-model="formInline.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注"> |
| | | <el-input v-model="form.name" :rows="5" type="textarea"></el-input> |
| | | <el-input |
| | | v-model="formInline.remark" |
| | | :rows="5" |
| | | type="textarea" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span |
| | |
| | | class="dialog-footer" |
| | | style="text-align: center; display: block" |
| | | > |
| | | <el-button type="primary" class="btns" @click="dialogVisible = false" |
| | | <el-button type="primary" class="btns" @click="listAdd" |
| | | >确 定</el-button |
| | | > |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | |
| | | </template> |
| | | <script> |
| | | import Titlename from "../../components/Titlename/index.vue"; |
| | | import { safetyInspectionItemId } from "@/api/safetySelfInspection.js"; |
| | | import { safetyInspectionItemMod } from "@/api/safetyInspectionItem.js"; |
| | | export default { |
| | | components: { Titlename }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | id: "", |
| | | resource: "0", |
| | | form: { |
| | | name: "", |
| | | }, |
| | | form: {}, |
| | | formInline: { |
| | | user: "", |
| | | region: "", |
| | | }, |
| | | tableData: [ |
| | | { |
| | | date: "2016-05-02", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1518 弄", |
| | | zip: 200333, |
| | | }, |
| | | { |
| | | date: "2016-05-04", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1517 弄", |
| | | zip: 200333, |
| | | }, |
| | | { |
| | | date: "2016-05-01", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1519 弄", |
| | | zip: 200333, |
| | | }, |
| | | { |
| | | date: "2016-05-03", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1516 弄", |
| | | zip: 200333, |
| | | }, |
| | | ], |
| | | defaultProps: { |
| | | children: "children", |
| | | label: "label", |
| | | name: "", |
| | | remark: "", |
| | | }, |
| | | }; |
| | | }, |
| | | created(){ |
| | | console.log(this.$route.query.id) |
| | | created() { |
| | | this.id = this.$route.query.id.id; |
| | | this.safeT(this.id); |
| | | }, |
| | | methods: { |
| | | safeT(id) { |
| | | safetyInspectionItemId({ id: id }).then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.form = res.data.result; |
| | | } |
| | | }); |
| | | }, |
| | | coAdd(val, type) { |
| | | this.titleN = type; |
| | | if (type == "新增") { |
| | | this.dialogVisible = true; |
| | | this.formInline = { |
| | | name: "", |
| | | remark: "", |
| | | }; |
| | | } else { |
| | | this.dialogVisible = true; |
| | | this.index = this.form.deductionList.findIndex( |
| | | (item) => item.name == val.name |
| | | ); |
| | | this.formInline = val; |
| | | } |
| | | }, |
| | | listAdd() { |
| | | if (this.titleN == "新增") { |
| | | this.form.deductionList.push(this.formInline); |
| | | this.dialogVisible = false; |
| | | } else { |
| | | this.form.deductionList[this.index].name = this.formInline.name; |
| | | this.form.deductionList[this.index].space = this.formInline.space; |
| | | this.dialogVisible = false; |
| | | } |
| | | }, |
| | | listDel(val) { |
| | | var i = this.form.deductionList.findIndex( |
| | | (item) => item.name == val.name |
| | | ); |
| | | this.form.deductionList.splice(i, 1); |
| | | }, |
| | | safetyInspectionItemA() { |
| | | safetyInspectionItemMod(this.form).then((res) => { |
| | | console.log(res) |
| | | if (res.data.code == 200) { |
| | | this.$notify({ |
| | | type: "success", |
| | | duration: 2000, |
| | | message: "修改成功", |
| | | title: "成功", |
| | | }); |
| | | this.$router.push({ |
| | | path:"/new" |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | back(){ |
| | | this.$router.push({ |
| | | path:"/new" |
| | | }) |
| | | }, |
| | | handleClick() { |
| | | this.dialogVisible = true; |
| | | }, |