123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792 |
- <!-- 检查和自查列表 -->
- <template>
- <view class="snapshotList">
- <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
- <view class="title" @click="planClick()">
- <view class="title-l" >
- <view class="title-l-t">{{newData.data10}}</view>
- <view class="title-l-b">
- <view v-for="(item,index) in newData.data11" :key="index">{{item}}</view>
- </view>
- </view>
- <img class="title-r" src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
- </view>
- <view class="tabTitleTow">
- <view :class="tabIndexTow==index?'tab-C':'tab-D'" v-for="(item,index) in tabListTow"
- @click="tabClickTow(index)">{{item}}</view>
- </view>
- <view>
- <view class="srearch">
- <view class="college">学院
- <img src="@/pages_safetyCheck/images/icon_06.png">
- </view>
- <view class="srearch-n">
- <view class="srearch-l" @click="popupClick(1)">
- <img src="@/pages_safetyCheck/images/icon_aqjc_ss.png">
- </view>
- <input class="srearch-c" type="text" v-model="form.searchValue" placeholder="实验室/房间号" />
- <view class="srearch-r" @click="saoCode()">
- <img src="@/pages_safetyCheck/images/icon_aqjc_sm.png">
- </view>
- </view>
- </view>
- <view class="level">
- <view class="level-li" :id="levelIndex==index?'levelColor-A':'levelColor-B'"
- @click="levelClick(index)" v-for="(item,index) in levelList">{{item}}</view>
- </view>
- </view>
- <view class="hidden">
- <view class="hidden-li" @click="listClick(item)" v-for="(item,index) in hiddenList">
- <img class="hidden-li-l" src="@/pages_safetyCheck/images/icon_sys_xz@1x.png">
- <view class="hidden-li-c">{{item.subName}}</view>
- <view class="hidden-li-r">待检查{{item.num}}项
- <img src="@/pages_safetyCheck/images/icon_ssp_gd@1x.png">
- </view>
- </view>
- </view>
- </scroll-view>
- <view class="popup-max-box" v-if="popupType">
- <view class="popup-null" @click="popupClick(2)"></view>
- <view class="popup-big-box">
- <view class="popup-input-box">
- <input type="text" maxlength="10" v-model="room" placeholder="请输入关键字">
- <view @click="buildBySub">搜索</view>
- </view>
- <view class="popup-for-max-box">
- <view class="popup-for-null" v-if="!roomList[0]">暂无数据</view>
- <view class="popup-for-box" v-for="(item,index) in roomList" :key="index">
- <view class="name-p">{{item.subName}} ({{item.roomNum?item.roomNum:'-'}})</view>
- <view class="button-p" @click="popupClickItem(item)">确定</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- config
- } from '@/api/request/config.js'
- import {} from '@/pages/api/index.js'
- import {
- laboratorySubRelInfoGetRelList,
- checkOptionListNew,
- } from '@/pages_safetyCheck/api/index.js'
- export default {
- name: "snapshotList",
- components: {
- },
- data() {
- return {
- baseUrl: config.base_url,
- pageType: 0,
- userType: 1,
- tabListTow: ['自查任务', '复查验证', '隐患整改'],
- tabIndexTow: 0,
- newData: {
- data10: '计划标题计划标题计划标题计划标题计划标题计标题计划标题计划标题',
- data11: ['校级检查', '全面检查', '交叉检查'],
- },
- form: {
- rectifyDescribe: '',
- imgDtoList: [],
- hazardCheckName: '',
- },
- popupType: false,
- roomList: [],
- checkOptionList: [],
- hiddenList: [{
- subName: '实验室名称实验室名称实验室名称实验室名称',
- num: 3,
- },
- {
- subName: '实验室名称实验室名称实验室名称实验室名称',
- num: 3,
- },
- {
- subName: '实验室名称实验室名称实验室名称实验室名称',
- num: 3,
- },
- ],
- levelList: ['一级', '二级', '三级', '四级'],
- levelIndex: 0,
- }
- },
- onLoad(option) {
- //this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
- this.pageType = option.infoData.pageType;
- console.log( this.newData)
- uni.setNavigationBarTitle({
- title: '第1次检查'
- })
- if (this.pageType == 0) {
- //检查
- this.tabListTow = ['检查任务', '复查验证', '隐患整改'];
- } else if (this.pageType == 1) {
- //复查
- this.tabListTow = ['自查任务', '复查验证', '隐患整改'];
- }
- },
- onShow() {
- },
- mounted() {
- },
- methods: {
- //滚动事件
- scrollGet() {},
- levelClick(index) {
- this.levelIndex = index;
- },
- tabClickTow(index) {
- this.tabIndexTow = index;
- this.pageType = index;
- },
- planClick(){
- let infoData='';
- uni.navigateTo({
- url: '/pages_safetyCheck/views/planDetail?infoData=' + encodeURIComponent(JSON.stringify(infoData))
- });
- },
- listClick(row){
- let infoData=row;
- infoData.pageType=this.tabIndexTow;
- uni.navigateTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' + encodeURIComponent(JSON.stringify(infoData))
- });
- },
- /******搜索房间弹层开关******/
- popupClick(type) {
- if (type == 1) {
- this.room = "";
- this.roomList = [];
- this.popupType = true;
- this.buildBySub();
- } else if (type == 2) {
- this.popupType = false;
- }
- },
- //搜索房间接口
- async buildBySub() {
- let self = this;
- const {
- data
- } = await laboratorySubRelInfoGetRelList({
- 'searchValue': this.form.searchValue,
- });
- if (data.code == 200) {
- if (data.data[0]) {
- this.roomList = data.data;
- } else {
- uni.showToast({
- title: '未找到相关实验室',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- }
- },
- //确认搜索房间
- popupClickItem(item) {
- console.log(item)
- this.$set(this.form, "subId", item.subId)
- this.$set(this.form, "subName", item.subName)
- this.$set(this.form, "deptId", item.deptId)
- for (let i = 0; i < this.collegeList.length; i++) {
- if (item.deptId == this.collegeList[i].deptId) {
- this.$set(this.form, "deptName", this.collegeList[i].deptName)
- }
- }
- this.popupType = false;
- },
- /******调用摄像头******/
- saoCode() {
- let self = this;
- uni.scanCode({
- onlyFromCamera: true,
- success: function(res) {
- let list = res.result.split("?")[1].split("&");
- let codeData = {};
- list.forEach((item) => {
- codeData[item.split("=")[0]] = item.split("=")[1];
- })
- console.log('二维码', codeData)
- if (codeData.code) {
- self.laboratoryAppletGetSubDetailInfo(codeData.code);
- } else {
- uni.showToast({
- title: '请扫描正确的二维码',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- }
- });
- },
- }
- }
- </script>
- <style lang="stylus" scoped>
- .snapshotList {
- height: 100%;
- display flex;
- .title {
- width: 750rpx;
- height: 150rpx;
- background: #FFFFFF;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 30rpx;
- box-sizing: border-box;
- .title-l {
- width: 594rpx;
- .title-l-t {
- font-size: 30rpx;
- color: #333333;
- line-height: 42rpx;
- text-align: left;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .title-l-b {
- display: flex;
- justify-content: flex-start;
- margin-top: 16rpx;
- >view {
- width: 130rpx;
- height: 50rpx;
- background: rgba(1, 131, 250, 0.2);
- border-radius: 6rpx 6rpx 6rpx 6rpx;
- font-size: 24rpx;
- color: #0183FA;
- line-height: 50rpx;
- text-align: center;
- margin-right: 14rpx;
- }
- }
- }
- .title-r {
- width: 24rpx;
- height: 24rpx;
- }
- }
- .tabTitleTow {
- width: 690rpx;
- height: 80rpx;
- display: flex;
- justify-content: center;
- margin: 20rpx 0 0 30rpx;
- >view:nth-of-type(1) {
- width: 230rpx;
- height: 80rpx;
- border-radius: 50rpx 0rpx 0rpx 50rpx;
- }
- >view:nth-of-type(2) {
- width: 230rpx;
- height: 80rpx;
- border-radius: 0rpx 0rpx 0rpx 0rpx;
- }
- >view:nth-of-type(3) {
- width: 230rpx;
- height: 80rpx;
- border-radius: 0rpx 50rpx 50rpx 0rpx;
- }
- .tab-C {
- font-size: 30rpx;
- color: #FFFFFF;
- line-height: 80rpx;
- text-align: center;
- background: #0183FA;
- }
- .tab-D {
- font-size: 30rpx;
- color: #333333;
- line-height: 80rpx;
- text-align: center;
- background: #FFFFFF;
- }
- }
- .srearch {
- width: 750rpx;
- height: 100rpx;
- background: #FFFFFF;
- border-radius: 0rpx 0rpx 0rpx 0rpx;
- overflow: hidden;
- margin-top: 20rpx;
- display: flex;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 30rpx;
- box-sizing: border-box;
- .college {
- width: 200rpx;
- height: 60rpx;
- border-radius: 50rpx 50rpx 50rpx 50rpx;
- border: 1rpx solid #E0E0E0;
- font-size: 24rpx;
- color: #333333;
- line-height: 60rpx;
- text-align: left;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 26rpx;
- box-sizing: border-box;
- >img {
- width: 24rpx;
- height: 12rpx;
- }
- }
- .srearch-n {
- width: 480rpx;
- height: 60rpx;
- border-radius: 50rpx 50rpx 50rpx 50rpx;
- border: 1rpx solid #E0E0E0;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .srearch-l {
- width: 60rpx;
- height: 60rpx;
- >img {
- width: 20rpx;
- height: 20rpx;
- margin: 20rpx 0 0 26rpx;
- }
- }
- .srearch-c {
- flex: 1;
- height: 58rpx;
- font-size: 24rpx;
- color: #999999;
- line-height: 30rpx;
- text-align: left;
- }
- .srearch-r {
- width: 60rpx;
- height: 60rpx;
- >img {
- width: 30rpx;
- height: 30rpx;
- margin: 14rpx 22rpx 0 0;
- }
- }
- }
- }
- .level {
- width: 750rpx;
- height: 80rpx;
- background: #FFFFFF;
- display: flex;
- justify-content: flex-start;
- padding: 0 30rpx;
- box-sizing: border-box;
- .level-li {
- width: 100rpx;
- height: 50rpx;
- background: #F5F5F5;
- border-radius: 50rpx 50rpx 50rpx 50rpx;
- border: 1rpx solid #E0E0E0;
- margin-right: 10rpx;
- font-size: 24rpx;
- color: #333333;
- line-height: 50rpx;
- text-align: center;
- }
- #levelColor-A {
- background: rgba(255, 0, 0, 0.2);
- color: #FF0000;
- border: 1rpx solid #FF0000;
- }
- #levelColor-B {
- background: #F5F5F5;
- color: #333333;
- border: 1rpx solid #E0E0E0;
- }
- }
- .list {
- width: 690rpx;
- min-height: 765rpx;
- background: #FFFFFF;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- margin: 20rpx 0 0 30rpx;
- .list-li {
- display: flex;
- justify-content: space-between;
- border-bottom: 1rpx solid #E0E0E0;
- padding: 0 22rpx 0 28rpx;
- box-sizing: border-box;
- >view:nth-of-type(1) {
- font-size: 30rpx;
- color: #333333;
- line-height: 80rpx;
- text-align: left;
- }
- >view:nth-of-type(2) {
- font-size: 28rpx;
- color: #666666;
- line-height: 80rpx;
- text-align: left;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- >img {
- width: 24rpx;
- height: 24rpx;
- margin-left: 8rpx;
- }
- }
- .project_r {
- width: 510rpx;
- min-height: 80rpx;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- padding-left: 20rpx;
- box-sizing: border-box;
- color: #666;
- }
- }
- .describe {
- width: 636rpx;
- height: 120rpx;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- border: 1rpx solid #E0E0E0;
- margin: 20rpx 0 0 28rpx;
- padding: 12rpx 16rpx;
- box-sizing: border-box;
- }
- .check-for-img-max-box {
- margin: 20px 28rpx;
- .left-title-p {
- width: 100%;
- text-align: left;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- }
- .right-img-box {
- .img-box {
- display inline-block;
- height: 150rpx;
- width: 150rpx;
- position relative;
- margin: 0 14rpx 20rpx 0;
- border-radius 10rpx;
- overflow hidden;
- .img-data {
- height: 150rpx;
- width: 150rpx;
- }
- .position-img {
- position absolute;
- right: 0;
- top: 0;
- width: 36rpx;
- height: 36rpx;
- }
- }
- .img-box:nth-of-type(3n+3) {
- margin-right: 0rpx;
- }
- .add-button {
- margin: 0 0rpx 20rpx 0;
- border-radius 10rpx;
- overflow hidden;
- display inline-block;
- height: 150rpx;
- width: 150rpx;
- }
- }
- }
- }
- /* 实验室弹框 */
- .popup-max-box {
- z-index: 10;
- height: 100%;
- width: 100%;
- position fixed;
- background rgba(0, 0, 0, 0.2);
- display flex;
- flex-direction column;
- .popup-null {
- flex: 1;
- }
- .popup-big-box {
- border-top-left-radius: 20rpx;
- border-top-right-radius: 20rpx;
- background #fff;
- .popup-input-box {
- padding: 30rpx 20rpx;
- display: flex;
- input {
- flex: 1;
- height: 70rpx;
- border: 1rpx solid #e0e0e0;
- border-radius: 10rpx;
- margin-right: 20rpx;
- padding: 0 20rpx;
- }
- view {
- background #0183FA;
- color: #fff;
- border-radius: 10rpx;
- width: 140rpx;
- line-height: 70rpx;
- text-align center;
- font-size: 28rpx;
- }
- }
- .popup-for-max-box {
- margin: 0 20rpx 30rpx;
- height: 600rpx;
- overflow-y scroll;
- .popup-for-null {
- line-height: 100rpx;
- text-align center;
- color: #999;
- }
- .popup-for-box {
- display: flex;
- padding: 10px 0;
- .name-p {
- flex: 1;
- line-height: 60rpx;
- }
- .button-p {
- background #0183FA;
- color: #fff;
- text-align center;
- width: 100rpx;
- line-height: 60rpx;
- height: 60rpx;
- border-radius: 10rpx;
- }
- }
- }
- }
- }
- .subBtn {
- width: 690rpx;
- height: 100rpx;
- background: #0183FA;
- border-radius: 50rpx 50rpx 50rpx 50rpx;
- font-weight: 400;
- font-size: 30rpx;
- color: #FFFFFF;
- line-height: 100rpx;
- text-align: center;
- position: fixed;
- left: 30rpx;
- bottom: 10rpx;
- }
- /* 上报记录 */
- .escalation {
- .escalation-li {
- width: 690rpx;
- height: 162rpx;
- background: #FFFFFF;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- margin: 20rpx 30rpx;
- padding: 0 30rpx;
- box-sizing: border-box;
- .escalation-li-t {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1rpx solid #E0E0E0;
- >view:nth-of-type(1) {
- font-weight: 400;
- font-size: 30rpx;
- color: #333333;
- line-height: 80rpx;
- text-align: left;
- }
- >view:nth-of-type(2) {
- font-weight: 400;
- font-size: 28rpx;
- color: #0183FA;
- line-height: 80rpx;
- text-align: left;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- >img {
- width: 24rpx;
- height: 24rpx;
- }
- }
- }
- .escalation-li-b {
- display: flex;
- justify-content: space-between;
- align-items: center;
- >view:nth-of-type(1) {
- font-weight: 400;
- font-size: 30rpx;
- color: #333333;
- line-height: 80rpx;
- text-align: left;
- }
- >view:nth-of-type(2) {
- font-weight: 400;
- font-size: 30rpx;
- color: #666666;
- line-height: 80rpx;
- text-align: left;
- }
- }
- }
- }
- /* 隐患整改 */
- .hidden {
- width: 690rpx;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- background: #FFFFFF;
- padding: 0 30rpx;
- box-sizing: border-box;
- margin: 20rpx 30rpx;
- .hidden-li {
- height: 80rpx;
- border-bottom: 1rpx solid #E0E0E0;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .hidden-li-l {
- width: 34rpx;
- height: 34rpx;
- }
- .hidden-li-c {
- font-size: 28rpx;
- color: #333333;
- line-height: 30rpx;
- text-align: left;
- flex: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- margin: 0 84rpx 0 12rpx;
- }
- .hidden-li-r {
- font-size: 28rpx;
- color: #0183FA;
- line-height: 80rpx;
- text-align: left;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- >img {
- width: 24rpx;
- height: 24rpx;
- }
- }
- }
- .hidden-li:last-of-type {
- border: none;
- }
- }
- #color-A {
- color: #0183FA;
- }
- #color-B {
- color: #FF8C00;
- }
- #color-C {
- color: #16B531;
- }
- }
- </style>
|