11 files modified
3 files added
| | |
| | | }) |
| | | } |
| | | |
| | | //新增隐患、矛盾报事 |
| | | export const addTroubleReport = (data) => { |
| | | return http.request({ |
| | | url: '/blade-taskSchoolEven/taskSchoolEven/save', |
| | | method: 'POST', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | //隐患、矛盾报事列表 |
| | | export const getTroubleReportList = (params) => { |
| | | return http.request({ |
| | | url: '/blade-taskSchoolEven/taskSchoolEven/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //隐患、矛盾报事详情 |
| | | export const getTroubleReportDetail = (params) => { |
| | | return http.request({ |
| | | url: '/blade-taskSchoolEven/taskSchoolEven/detail', |
| | | method: 'get', |
| | | params: { |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //审核隐患、矛盾报事详情 |
| | | export const auditTroubleReport = (data) => { |
| | | return http.request({ |
| | | url: '/blade-taskSchoolEven/taskSchoolEven/auditing', |
| | | method: 'POST', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | //添加居住证申请 |
| | | export const saveResideApply = (data) => { |
| | | return http.request({ |
| | |
| | | url: '/pages/circle/index' |
| | | }, |
| | | { |
| | | name: '警务辖区数据统计', |
| | | name: '驾驶舱', |
| | | iconPathSelected: '/static/img/tabbar-05-selected.png', |
| | | iconPath: '/static/img/tabbar-05.png', |
| | | url: '/pages/statistics/index' |
| | |
| | | "navigationBarTextStyle": "black", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "troubleList", |
| | | "style": { |
| | | "navigationBarTitleText": "", |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "troubleDetail", |
| | | "style": { |
| | | "navigationBarTitleText": "", |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "troubleAuditList", |
| | | "style": { |
| | | "navigationBarTitleText": "", |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | } |
| | | |
| | | ] |
| | | } |
| | | ], |
| | |
| | | let accountInfo = wx.getAccountInfoSync(); |
| | | this.envVersion = accountInfo.miniProgram.envVersion; |
| | | let role = uni.getStorageSync('activeRole') |
| | | if (role.roleName == "居民" || role.roleName == '无诈') { |
| | | if (role.roleName == "居民") { |
| | | this.tabList = getTabbarList(1); |
| | | this.roleType = 0 |
| | | } else { |
| | | if (role.roleName == '网格员') { |
| | | console.log(111) |
| | | this.tabList = getTabbarList(3); |
| | | } else if (role.roleName == '民警') { |
| | | this.tabList = getTabbarList(2); |
| | | } else if (role.roleName == '系统管理员') { |
| | | this.tabList = getTabbarList(4); |
| | | } |
| | | |
| | | } else if (role.roleName == '网格员') { |
| | | this.roleType = 1; |
| | | this.tabList = getTabbarList(3); |
| | | } else if (role.roleName == '民警') { |
| | | this.roleType = 1; |
| | | this.tabList = getTabbarList(2); |
| | | } else if (role.roleName == '系统管理员') { |
| | | this.roleType = 1; |
| | | this.tabList = getTabbarList(4); |
| | | } else { |
| | | this.tabList = getTabbarList(1); |
| | | this.roleType = 0 |
| | | } |
| | | this.$refs.paging.reload(); |
| | | }, |
| | |
| | | <text class="nav-item-text f-26 mt-10">场所任务</text>
|
| | | </view>
|
| | | </u-grid-item>
|
| | | <!-- <u-grid-item @click="navToSchoolClockIn()"
|
| | | v-if="curSelectSite.categoryList[0].parentNo == 1601">
|
| | | <view class="nav-item flex f-d-c a-i-c">
|
| | | <u-icon name="/static/icon/nav-29.png" width="80rpx" height="80rpx"></u-icon>
|
| | | <text class="nav-item-text f-26 mt-10">护学打卡</text>
|
| | | </view>
|
| | | </u-grid-item> -->
|
| | | <block v-if="curSelectSite.categoryList[0].parentNo == 1601">
|
| | | <u-grid-item @click="navToSchoolClockIn()">
|
| | | <view class="nav-item flex f-d-c a-i-c">
|
| | | <u-icon name="/static/icon/nav-29.png" width="80rpx"
|
| | | height="80rpx"></u-icon>
|
| | | <text class="nav-item-text f-26 mt-10">护学打卡</text>
|
| | | </view>
|
| | | </u-grid-item>
|
| | | <u-grid-item @click="navigatorPage('/subPackage/school/trouble?type=1')">
|
| | | <view class="nav-item flex f-d-c a-i-c">
|
| | | <u-icon name="/static/icon/nav-29.png" width="80rpx"
|
| | | height="80rpx"></u-icon>
|
| | | <text class="nav-item-text f-26 mt-10">安全隐患</text>
|
| | | </view>
|
| | | </u-grid-item>
|
| | | <u-grid-item @click="navigatorPage('/subPackage/school/trouble?type=2')">
|
| | | <view class="nav-item flex f-d-c a-i-c">
|
| | | <u-icon name="/static/icon/nav-29.png" width="80rpx"
|
| | | height="80rpx"></u-icon>
|
| | | <text class="nav-item-text f-26 mt-10">纠纷矛盾排查</text>
|
| | | </view>
|
| | | </u-grid-item>
|
| | | <u-grid-item @click="navigatorPage('/subPackage/school/trouble')">
|
| | | <view class="nav-item flex f-d-c a-i-c">
|
| | | <u-icon name="/static/icon/nav-29.png" width="80rpx"
|
| | | height="80rpx"></u-icon>
|
| | | <text class="nav-item-text f-26 mt-10">校园安保检查</text>
|
| | | </view>
|
| | | </u-grid-item>
|
| | | </block>
|
| | | </block>
|
| | | </u-grid>
|
| | | </view>
|
| | |
| | | this.color = "#017BFC"; |
| | | // this.tabbarIndex = 2; |
| | | this.tabbarIndex = 3; |
| | | } else { |
| | | this.tabbarList = getTabbarList(1) |
| | | this.roleType = 1 |
| | | this.color = "#017BFC" |
| | | // this.tabbarIndex = 1; |
| | | this.tabbarIndex = 2 |
| | | } |
| | | this.addressType = uni.getStorageSync("siteInfo").addressType; |
| | | }, |
| | |
| | | <text class="f-28 c-main" v-if="isEnd">投票已结束</text> |
| | | <text class="f-28 c-main" v-if="!isStart">投票未开始</text> |
| | | <text class="ml-20 f-26 " v-if="applyInfo.voteRestrictions == 1">(该议题为一户一票)</text> |
| | | <view class="f-26 mt-20 fw" v-if="!isStart"> |
| | | {{applyInfo.startTime }} - |
| | | {{applyInfo.endTime}} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="vote bgc-ff"> |
| | |
| | | let time = setInterval(() => { |
| | | second-- |
| | | this.text = `${second}秒后获取` |
| | | if (second == 0 || this.data.isLogin) { |
| | | if (second == 0 || this.isLogin) { |
| | | clearInterval(time); |
| | | this.isSendCode = false; |
| | | this.text = "获取验证码"; |
| | |
| | | name: "", |
| | | phone: "", |
| | | location: "", |
| | | gradeAndClass: "" |
| | | gradeAndClass: "", |
| | | lat: "", |
| | | lng: "" |
| | | }, |
| | | rules: { |
| | | 'name': { |
| | |
| | | uni.chooseLocation({ |
| | | success: (res) => { |
| | | this.$set(this.info, "location", res.address); |
| | | // this.$set(this.info, "lat", res.latitude); |
| | | // this.$set(this.info, "lng", res.longitude) |
| | | this.$set(this.info, "lat", res.latitude); |
| | | this.$set(this.info, "lng", res.longitude) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90" |
| | | :labelStyle="{fontSize:'28rpx'}"> |
| | | |
| | | <u-form-item label="类型:" labelWidth="100" prop="type" :required="isRequired"> |
| | | <u-radio-group v-model="info.type"> |
| | | <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" :key="index" |
| | | :label="item.name" :name="item.id"> |
| | | </u-radio> |
| | | </u-radio-group> |
| | | |
| | | <u-form-item label="隐患类型" prop="hiddenDangerType" borderBottom ref="phone" v-if="info.type == 1" |
| | | @click="showPicker = true"> |
| | | <u-input v-model="info.hiddenDangerType" border="none" placeholder="请输入" |
| | | placeholderClass="f-28 c-99" inputAlign="right" disabled disabledColor="#ffffff"></u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label="家长姓名" prop="name" borderBottom ref="name" required> |
| | | <u-input v-model="info.name" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label="家长手机号" prop="phone" borderBottom ref="phone" required> |
| | | <u-input v-model="info.phone" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="学生姓名" prop="realName" borderBottom ref="realName" required> |
| | | <u-input v-model="info.realName" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="学生班级" prop="gradeAndClass" borderBottom ref="gradeAndClass" required> |
| | | <u-input v-model="info.gradeAndClass" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="位置" prop="location" :borderBottom="false" required> |
| | | <view class="address-row flex"> |
| | | <view class="address-content f-28" v-if="info.location"> |
| | | {{info.location}} |
| | | </view> |
| | | <view class="address-content f-28 c-99" v-if="!info.location"> |
| | | 请选择地址 |
| | | </view> |
| | | <view class="location-btn c-main f-24" @click="getLocation()"> |
| | | 获取地址 |
| | | </view> |
| | | </view> |
| | | <!-- <u-input v-model="info.address" border="none" placeholderClass="f-28 c-99" |
| | | inputAlign="right" disabled disabledColor="#fff"> |
| | | <template slot="suffix"> |
| | | <button class="location-btn c-main f-24" @click="getLocation()">获取地址</button> |
| | | </template> |
| | | </u-input> --> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label="描述" prop="describe" borderBottom ref="describe" required> |
| | | <u-textarea v-model="info.describe" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | <u-form-item label="描述" prop="remark" borderBottom ref="remark" required> |
| | | <u-textarea v-model="info.remark" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-textarea> |
| | | </u-form-item> |
| | | </u-form> |
| | |
| | | |
| | | |
| | | <button class="submit-btn" @click="sumitInfo">提交</button> |
| | | <!-- <button class="list-btn" @click="navigatorPage">我上报的事件</button> --> |
| | | <button class="list-btn" @click="navigatorPage">提交记录</button> |
| | | |
| | | |
| | | <u-picker :defaultIndex="troubleTypeIndex" :closeOnClickOverlay="true" :show="showPicker" |
| | | :columns="[troubleTypeList]" @close="showPicker = false" @cancel="showPicker = false" keyName="name" |
| | | @confirm="confirmPicker"></u-picker> |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | |
| | | <script> |
| | | import uploadMixin from "@/mixin/uploadMixin"; |
| | | import { |
| | | addClockIn |
| | | addTroubleReport |
| | | } from "@/api/school/school.js"; |
| | | import { |
| | | bizDictionary, |
| | | bizDictionaryTree |
| | | } from '@/api/system/dict.js' |
| | | export default { |
| | | mixins: [uploadMixin], |
| | | data() { |
| | | return { |
| | | form: { |
| | | images: [] |
| | | }, |
| | | info: { |
| | | name: "", |
| | | phone: "", |
| | | location: "", |
| | | gradeAndClass: "" |
| | | type: "", |
| | | hiddenDangerType: "", |
| | | remark: "" |
| | | }, |
| | | rules: { |
| | | 'name': { |
| | | 'remark': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请输入家长姓名', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'phone': [{ |
| | | type: 'string', |
| | | required: true, |
| | | message: '请输入手机号', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return uni.$u.test.mobile(value); |
| | | }, |
| | | message: '手机号码不正确', |
| | | trigger: ['change', 'blur'] |
| | | } |
| | | ], |
| | | 'location': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请选择地址', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | |
| | | }, |
| | | desc: "", |
| | | title: "", |
| | | curSelectSite: {}, |
| | | statusList: [{ |
| | | name: "隐患", |
| | | id: 1 |
| | | }, |
| | | { |
| | | name: "矛盾", |
| | | id: 2 |
| | | } |
| | | ], |
| | | troubleTypeList: [], |
| | | troubleTypeIndex: [0], |
| | | showPicker: false |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | if (option.type) { |
| | | this.info.type = option.type |
| | | } |
| | | |
| | | |
| | | this.getAllBizDict() |
| | | }, |
| | | // onShow() { |
| | | // this.curSelectSite = uni.getStorageSync('siteInfo') |
| | |
| | | // }, |
| | | methods: { |
| | | |
| | | getLocation() { |
| | | uni.chooseLocation({ |
| | | success: (res) => { |
| | | this.$set(this.info, "location", res.address); |
| | | // this.$set(this.info, "lat", res.latitude); |
| | | // this.$set(this.info, "lng", res.longitude) |
| | | } |
| | | async getAllBizDict() { |
| | | |
| | | //反诈类别 |
| | | await this.getBizDict('hiddenDangerType', this.troubleTypeList); |
| | | }, |
| | | |
| | | // 获取业务字典 |
| | | async getBizDict(code, list) { |
| | | const param = { |
| | | code: code |
| | | } |
| | | const res = await bizDictionary(param) |
| | | res.data.forEach(e => { |
| | | list.push({ |
| | | name: e.dictValue, |
| | | value: Number(e.dictKey) |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | |
| | | sumitInfo() { |
| | | //选择隐患类型 |
| | | confirmPicker(e) { |
| | | this.genderIndex = e.indexs; |
| | | this.genderValue = e.value[0].name; |
| | | this.info.hiddenDangerType = e.value[0].value; |
| | | this.showPicker = false; |
| | | }, |
| | | |
| | | sumitInfo() { |
| | | this.$refs.form.validate().then(valid => { |
| | | if (this.form.images.length > 0) { |
| | | let urls = [] |
| | |
| | | }) |
| | | this.info.images = urls.join(",") |
| | | } |
| | | addClockIn(this.info).then(res => { |
| | | addTroubleReport(this.info).then(res => { |
| | | this.$showTips("提交成功", "success") |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | |
| | | }) |
| | | }, |
| | | navigatorPage() { |
| | | let url = "/subPackage/bs/views/repairList" + "?title=" + this.title + "&type=" + this.info.type |
| | | let url = `troubleList?type=${this.info.type}` |
| | | this.$u.func.globalNavigator(url, "navTo") |
| | | } |
| | | } |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | <u-sticky> |
| | | <view class="hander"> |
| | | <view class="tab"> |
| | | <u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}" |
| | | :activeStyle="{color:'#017BFC'}" :scrollable="false"> |
| | | </u-tabs> |
| | | </view> |
| | | |
| | | <view class="search flex j-c-s-b a-i-c"> |
| | | <view class="tab-filter flex j-c-c a-i-c" slot="right" @click="showDateModal"> |
| | | <text class="f-28">时间筛选</text> |
| | | <u-icon name="arrow-down"></u-icon> |
| | | </view> |
| | | <u-search placeholder="请输入姓名" v-model="keyWord" :clearabled="true" :showAction="true" |
| | | :animation="true" @search="searchConfirm" @clear="clearConfirm" |
| | | @custom="searchConfirm"></u-search> |
| | | </view> |
| | | |
| | | </view> |
| | | </u-sticky> |
| | | <view class="list"> |
| | | <view class="list-item bgc-ff mb-20" v-for="item in siteList" :key="item.id" @click="pushPage(item.id)"> |
| | | <view class="item-title flex a-i-c j-c-s-b mb-20"> |
| | | <text class="f-32 fw">{{ item.name}}</text> |
| | | <!-- <u-tag text="待审批" type="warning" plain plainFill></u-tag> --> |
| | | <u-tag class="u_tag" size="mini" :text="findObjValue(item.confirmFlag, tabList).name" |
| | | :type="findObjValue(item.confirmFlag, tabList).type" plain plainFill></u-tag> |
| | | <!-- <u-tag text="审核拒绝" type="error" plain plainFill></u-tag> --> |
| | | </view> |
| | | <!-- <view class="item-row flex a-i-c j-c-s-b"> |
| | | <text class="f-28">法人信息</text> |
| | | <text class="f-28 c-66">{{ item.legalPerson ? item.legalPerson : '未完善'}}</text> |
| | | </view> --> |
| | | <view class="item-row flex a-i-c j-c-s-b f-28"> |
| | | <text>时间</text> |
| | | <text class="c-66">{{item.createTime}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-toast ref="uToast"></u-toast> |
| | | <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line /> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <date-range-modal ref="dateRane" @comfirm="handleComfirmDate" @rest="handleRestDate" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dateRangeModal from '@/components/dateRangeModal/modal.vue'; |
| | | import { |
| | | getTroubleReportList |
| | | } from "@/api/school/school.js"; |
| | | |
| | | export default { |
| | | components: { |
| | | dateRangeModal |
| | | }, |
| | | data() { |
| | | return { |
| | | siteList: [], |
| | | pagingParams: { |
| | | current: 1, |
| | | size: 10 |
| | | }, |
| | | tabList: [{ |
| | | name: "全部", |
| | | status: "", |
| | | }, |
| | | { |
| | | name: "待审核", |
| | | status: 1, |
| | | type: 'warning' |
| | | }, |
| | | { |
| | | name: "审核通过", |
| | | status: 2, |
| | | type: 'success' |
| | | }, |
| | | { |
| | | name: "已拒绝", |
| | | status: 3, |
| | | type: 'error' |
| | | }, |
| | | ], |
| | | tabIndex: 0, |
| | | tabStatus: "", |
| | | keyWord: '', |
| | | loadingStatus: 'nomore', |
| | | clickInfo: {}, |
| | | currentRole: {}, |
| | | selectDate: [], |
| | | type: 1 |
| | | } |
| | | }, |
| | | |
| | | |
| | | onLoad(option) { |
| | | if (option.from) { |
| | | this.tabIndex = 1; |
| | | this.tabStatus = 1; |
| | | } |
| | | if (option.placeId) { |
| | | this.pagingParams.placeId = option.placeId |
| | | } |
| | | if (option.type == 1) { |
| | | this.type = option.type; |
| | | uni.setNavigationBarTitle({ |
| | | title: option.type == 1 ? "安全隐患排查" : "矛盾纠纷排查" |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | onShow() { |
| | | this.currentRole = uni.getStorageSync("activeRole") |
| | | this.resetParams() |
| | | this.getSiteList() |
| | | }, |
| | | onReachBottom() { |
| | | this.pagingParams.current++ |
| | | this.getSiteList() |
| | | }, |
| | | |
| | | |
| | | methods: { |
| | | |
| | | |
| | | async getSiteList() { |
| | | this.$nextTick(() => { |
| | | this.$refs.uToast.show({ |
| | | type: 'loading', |
| | | message: '正在加载', |
| | | duration: 9999999 |
| | | }) |
| | | this.loadingStatus = 'loadingmore' |
| | | }) |
| | | |
| | | const params = { |
| | | name: this.keyWord, |
| | | confirmFlag: this.tabStatus, |
| | | type: this.type |
| | | } |
| | | if (this.selectDate.length) { |
| | | params.startTime = this.selectDate[0], |
| | | params.endTime = this.selectDate[1] |
| | | } |
| | | const { |
| | | roleName |
| | | } = this.currentRole |
| | | |
| | | const res = await getTroubleReportList({ |
| | | ...params, |
| | | roleName, |
| | | ...this.pagingParams |
| | | }) |
| | | console.log(res); |
| | | const { |
| | | code, |
| | | data: { |
| | | records |
| | | } |
| | | } = res |
| | | if (code !== 200) { |
| | | uni.showToast({ |
| | | title: '数据请求失败', |
| | | icon: 'error' |
| | | }) |
| | | return |
| | | } |
| | | this.siteList = [...this.siteList, ...records] |
| | | this.$nextTick(() => { |
| | | this.$refs.uToast.isShow = false |
| | | }) |
| | | this.loadingStatus = 'nomore' |
| | | }, |
| | | changeTab(e) { |
| | | this.tabStatus = e.status; |
| | | this.resetParams() |
| | | this.getSiteList() |
| | | }, |
| | | searchConfirm() { |
| | | this.resetParams() |
| | | this.getSiteList() |
| | | }, |
| | | clearConfirm() { |
| | | this.keyWord = '' |
| | | this.resetParams() |
| | | this.searchConfirm() |
| | | }, |
| | | |
| | | |
| | | showDateModal() { |
| | | this.$refs.dateRane.open(); |
| | | }, |
| | | |
| | | |
| | | resetParams() { |
| | | this.siteList = [] |
| | | this.pagingParams.current = 1 |
| | | }, |
| | | findObjValue(value, obj) { |
| | | const res = obj.find(item => { |
| | | return item.status == value |
| | | }) |
| | | return res |
| | | }, |
| | | pushPage(id) { |
| | | const { |
| | | roleAlias |
| | | } = this.currentRole |
| | | if (roleAlias === "inhabitant") { |
| | | return |
| | | } |
| | | uni.navigateTo({ |
| | | url: `trouble?id=${id}` |
| | | }) |
| | | |
| | | |
| | | // this.$u.func.globalNavigator(`/subPackage/workbench/views/examine?id=${id}&placeId=${placeId}`) |
| | | }, |
| | | |
| | | handleRestDate() { |
| | | this.selectDate = []; |
| | | this.resetParams(); |
| | | this.getSiteList() |
| | | }, |
| | | handleComfirmDate(val) { |
| | | this.selectDate = val; |
| | | this.resetParams(); |
| | | this.getSiteList() |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | page { |
| | | background-color: #F5F5F5; |
| | | } |
| | | |
| | | .hander { |
| | | background-color: #fff; |
| | | |
| | | .tab { |
| | | width: 100%; |
| | | } |
| | | |
| | | .tab-filter { |
| | | padding: 0 20rpx; |
| | | } |
| | | |
| | | |
| | | .search { |
| | | padding: 20rpx 30rpx; |
| | | } |
| | | } |
| | | |
| | | .list { |
| | | margin: 20rpx 30rpx 0; |
| | | } |
| | | |
| | | .list-item { |
| | | padding: 0 30rpx 20rpx; |
| | | border-radius: 8rpx; |
| | | |
| | | .item-title { |
| | | padding: 30rpx 0; |
| | | border-bottom: 1px solid #F5F5F5; |
| | | } |
| | | |
| | | .item-row { |
| | | padding: 10rpx 0; |
| | | |
| | | .address { |
| | | width: 65%; |
| | | text-align: right; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view class=""> |
| | | |
| | | <view class="item-row flex j-c-s-b a-i-c"> |
| | | <text>描述</text> |
| | | <text class="item-content">{{info.remark}}</text> |
| | | </view> |
| | | |
| | | <view class="item-row flex j-c-s-b a-i-c"> |
| | | <text>审核状态</text> |
| | | <text class="item-content" v-if="info.confirmFlag == 1">待审核</text> |
| | | <text class="item-content" v-if="info.confirmFlag == 2">审核通过</text> |
| | | <text class="item-content" v-if="info.confirmFlag == 3">审核驳回</text> |
| | | </view> |
| | | |
| | | <view class="item-row flex j-c-s-b a-i-c" v-if="info.confirmFlag == 3"> |
| | | <text>驳回原因</text> |
| | | <text>{{info.confirmNotion}}</text> |
| | | </view> |
| | | |
| | | <view class="item-row flex j-c-s-b a-i-c"> |
| | | <text>时间</text> |
| | | <text>{{info.createTime}}</text> |
| | | </view> |
| | | |
| | | <view class="image-wrap bgc-ff" v-if="images.length"> |
| | | <view class="mb-20"> |
| | | 图片 |
| | | </view> |
| | | <view class="flex flex-wrap"> |
| | | <view class="image-item" v-for="(i,k) in images" @click="previewImage(images,i)"> |
| | | <u-image :src="i" width="100rpx" height="100rpx"></u-image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="image-wrap bgc-ff" v-if="roleType == 2"> |
| | | <view class="mb-20"> |
| | | 处理意见 |
| | | </view> |
| | | <view class="flex flex-wrap"> |
| | | <u-textarea v-model="confirmNotion" placeholder=""></u-textarea> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <audit-action @handle="submit" v-if="roleType == 2 && info.confirmFlag == 1"></audit-action> |
| | | <footer-btn v-if="roleType == 1 && info.confirmFlag == 3" text="编辑" @click="navToEdit" /> |
| | | |
| | | </view> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import auditAction from '@/components/btn/actionBtn.vue' |
| | | import { |
| | | getTroubleReportDetail, |
| | | auditTroubleReport |
| | | } from "@/api/school/school.js" |
| | | export default { |
| | | components: { |
| | | auditAction |
| | | }, |
| | | data() { |
| | | return { |
| | | info: {}, |
| | | roleType: 1, |
| | | id: "", |
| | | images: [], |
| | | confirmNotion: "" |
| | | } |
| | | }, |
| | | |
| | | |
| | | onLoad(option) { |
| | | if (uni.getStorageSync("activeRole").roleName == "民警") { |
| | | this.roleType = 2; |
| | | } |
| | | |
| | | if (uni.getStorageSync("activeRole").roleName == "居民") { |
| | | this.roleType == 1; |
| | | } |
| | | |
| | | this.id = option.id; |
| | | }, |
| | | |
| | | |
| | | onShow() { |
| | | this.getDetail(this.id) |
| | | }, |
| | | |
| | | |
| | | methods: { |
| | | getDetail(id) { |
| | | getTroubleReportDetail({ |
| | | id |
| | | }).then(res => { |
| | | this.info = res.data; |
| | | if (res.data.images) { |
| | | this.images = this.$setImageUrl(res.data.images); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | previewImage(urls, current) { |
| | | uni.previewImage({ |
| | | urls, |
| | | current |
| | | }) |
| | | }, |
| | | |
| | | submit(val) { |
| | | let data = { |
| | | id: this.info.id, |
| | | confirmFlag: val.type == 2 ? 2 : 3, |
| | | } |
| | | if (val.type == 3) { |
| | | data.confirmNotion = val.remark; |
| | | } |
| | | submit(data).then(res => { |
| | | if (res.code == 200) { |
| | | this.$showTips("操作成功", "success"); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 300) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | navToEdit() { |
| | | uni.navigateTo({ |
| | | url: `edit?id=${this.info.id}` |
| | | }) |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | page { |
| | | background-color: #f5f5f5; |
| | | } |
| | | |
| | | .item-row { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | border-bottom: 1px solid #f5f5f5; |
| | | font-size: 28rpx; |
| | | background-color: #fff; |
| | | |
| | | .item-content { |
| | | width: 70%; |
| | | text-align: right; |
| | | } |
| | | |
| | | .item-left { |
| | | width: 70%; |
| | | } |
| | | } |
| | | |
| | | .image-wrap { |
| | | margin-top: 20rpx; |
| | | padding: 20rpx; |
| | | |
| | | .image-item { |
| | | margin-right: 20rpx; |
| | | } |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view class=""> |
| | | <view class="list"> |
| | | <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i.id)"> |
| | | <view class="item-title flex a-i-c j-c-s-b mb-20"> |
| | | <text class="f-32 fw">{{i.type ==1?"安全隐患排查":"矛盾纠纷排查"}}</text> |
| | | <!-- <text class="f-32 fw" v-if="i.eventType == 3">二手车交易</text>id |
| | | <text class="f-32 fw" v-if="i.eventType == 2">二手手机维修</text> --> |
| | | <u-tag v-if="i.confirmFlag == 4" text="待完成" type="warning" plain plainFill></u-tag> |
| | | <u-tag v-if="i.confirmFlag == 1" text="待审批" type="warning" plain plainFill></u-tag> |
| | | <u-tag v-if="i.confirmFlag == 2" text="审核通过" type="success" plain plainFill></u-tag> |
| | | <u-tag v-if="i.confirmFlag == 3" text="审核拒绝" type="error" plain plainFill></u-tag> |
| | | </view> |
| | | <view class="item-row flex a-i-c j-c-s-b"> |
| | | <text class="f-28">时间</text> |
| | | <text class="f-28 c-66">{{i.createTime}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getTroubleReportList |
| | | } from "@/api/school/school.js"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | list: [], |
| | | currentPage: 1, |
| | | loadingStatus: 'nomore', |
| | | } |
| | | }, |
| | | |
| | | onLoad(option) { |
| | | if (option.type == 1) { |
| | | uni.setNavigationBarTitle({ |
| | | title: "安全隐患排查" |
| | | }) |
| | | } else { |
| | | uni.setNavigationBarTitle({ |
| | | title: "矛盾纠纷排查" |
| | | }) |
| | | } |
| | | this.getList(option.type) |
| | | }, |
| | | onReachBottom() { |
| | | this.currentPage++ |
| | | this.getList() |
| | | }, |
| | | |
| | | methods: { |
| | | getList() { |
| | | getTroubleReportList({ |
| | | createUser: uni.getStorageSync("userInfo").user_id, |
| | | current: this.currentPage, |
| | | size: 10, |
| | | houseCode: uni.getStorageSync("curHouseCode") |
| | | // reportType: 2 |
| | | // eventType: type |
| | | }).then(res => { |
| | | if (res.code != 200) { |
| | | uni.showToast({ |
| | | title: '数据请求失败', |
| | | icon: 'error' |
| | | }) |
| | | return |
| | | } |
| | | let records = res.data.records; |
| | | this.list = [...this.list, ...records] |
| | | this.loadingStatus = 'nomore' |
| | | }) |
| | | }, |
| | | navTo(id) { |
| | | uni.navigateTo({ |
| | | url: `troubleDetail?id=${id}` |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | page { |
| | | background-color: #F5F5F5; |
| | | } |
| | | |
| | | .list { |
| | | margin: 20rpx 30rpx 0; |
| | | } |
| | | |
| | | .list-item { |
| | | padding: 0 30rpx 20rpx; |
| | | border-radius: 8rpx; |
| | | |
| | | .item-title { |
| | | padding: 30rpx 0; |
| | | border-bottom: 1px solid #F5F5F5; |
| | | } |
| | | |
| | | .item-row { |
| | | padding: 10rpx 0; |
| | | |
| | | .address { |
| | | width: 65%; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <view class="container">
|
| | | <view class="wrap">
|
| | | <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
|
| | |
|
| | | <view class="top item flex j-c-s-b a-i-c" @click="onScan()" v-if="!currentId">
|
| | | <view class="flex a-i-c">
|
| | | <u-icon name="/static/icon/nav-05.png" width="90rpx" height="90rpx"></u-icon>
|