Lou
2024-04-28 1e6c74570ac2d85b4d567305b25b1b252a9d809a
更新
8 files modified
92 ■■■■ changed files
common/setting.js 5 ●●●● patch | view | raw | blame | history
manifest.json patch | view | raw | blame | history
mixin/uploadMixin.js 5 ●●●●● patch | view | raw | blame | history
mixin/uploadMixinPicCheck.js 5 ●●●●● patch | view | raw | blame | history
mixin/uploadMixinPlace.js 5 ●●●●● patch | view | raw | blame | history
pages/home/launch.html 5 ●●●●● patch | view | raw | blame | history
pages/login/login-account.vue 3 ●●●● patch | view | raw | blame | history
subPackage/school/troubleDetail.vue 64 ●●●● patch | view | raw | blame | history
common/setting.js
@@ -16,7 +16,10 @@
    minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
    // minioBaseUrl: "http://192.168.0.101:9528/",
    // 线上环境接口Url
    prodUrl: 'https://srgdjczzxtpt.com:2080/api',
    // prodUrl: 'https://srgdjczzxtpt.com:2080/api',
    prodUrl: 'http://192.168.2.105:9528',
    uploadUrl: 'https://srgdjczzxtpt.com:2080/api',
    // 后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8
    contentType: 'application/json;charset=UTF-8',
    // 后端返回状态码
manifest.json
mixin/uploadMixin.js
@@ -1,7 +1,8 @@
import {
    prodUrl,
    clientId,
    clientSecret
    clientSecret,
    uploadUrl
} from '@/common/setting'
import {
@@ -22,7 +23,7 @@
                maxCount: "5",
                previewFullImage: true,
                uploadText: "上传中",
                url: prodUrl + "/blade-resource/oss/endpoint/put-file",
                url: uploadUrl + "/blade-resource/oss/endpoint/put-file",
                header: {},
            },
        }
mixin/uploadMixinPicCheck.js
@@ -2,7 +2,8 @@
    devUrl,
    prodUrl,
    clientId,
    clientSecret
    clientSecret,
    uploadUrl
} from '@/common/setting'
import {
@@ -23,7 +24,7 @@
                maxCount: "5",
                previewFullImage: true,
                uploadText: "上传中",
                url: prodUrl + "/blade-resource/oss/endpoint/put-file-attach-by-prefix-path"
                url: uploadUrl + "/blade-resource/oss/endpoint/put-file-attach-by-prefix-path"
            },
        }
    },
mixin/uploadMixinPlace.js
@@ -1,7 +1,8 @@
import {
    prodUrl,
    clientId,
    clientSecret
    clientSecret,
    uploadUrl
} from '@/common/setting'
import {
@@ -22,7 +23,7 @@
                maxCount: "5",
                previewFullImage: true,
                uploadText: "上传中",
                url: prodUrl + "/blade-resource/oss/endpoint/put-file-attach-by-prefix-path"
                url: uploadUrl + "/blade-resource/oss/endpoint/put-file-attach-by-prefix-path"
            },
        }
    },
pages/home/launch.html
@@ -9,8 +9,9 @@
        <script type="text/javascript">
            var config = {
                id: "wx41aa8a5d2e565a05",
                path: "page/login/login",
                version: "develop",
                // path: "pages/home/login-account",
                path: "pages/login/login-account",
                version: "trial", //trial  ,release ,develop
                query: {
                    type: 1
                }
pages/login/login-account.vue
@@ -43,7 +43,7 @@
                        <u-input placeholder="请输入用户名" prefixIcon="account"
                            prefixIconStyle="font-size: 28px;color: #017BFC"
                            placeholderStyle="font-size:28rpx;color:#ABABAB;"
                            customStyle="background:#fff;width:634rpx;" type="number" v-model="form.phone"></u-input>
                            customStyle="background:#fff;width:634rpx;" v-model="form.phone"></u-input>
                    </u-form-item>
                    <u-form-item prop="password" :borderBottom="false" ref="password">
                        <u-input v-if="passwordProps.passwordType == 'password'" placeholder="请输入密码" prefixIcon="lock"
@@ -174,6 +174,7 @@
        },
        onLoad(option) {
            console.log(option);
            if (option.type) {
                //type 1   安全隐患    2 矛盾纠纷   3 护学打卡
subPackage/school/troubleDetail.vue
@@ -32,6 +32,13 @@
            <text>时间</text>
            <text>{{info.createTime}}</text>
        </view>
        <view class="item-row flex j-c-s-b a-i-c" v-if="info.type == 1">
            <text>隐患类型</text>
            <text>{{troubleValue}}</text>
        </view>
        <view class="item-row flex j-c-s-b a-i-c" v-if="info.isProblem">
            <text>是否隐患</text>
            <text>{{info.isProblem == 1?"是":"否"}}</text>
@@ -67,10 +74,9 @@
                <view class="mb-20">
                    工作照片
                </view>
                <view class="flex-wrap" v-if="info.confirmFlag == 2">
                    <view class="mr-20" v-for="i in images">
                        <u-image :src="i" width="140rpx" height="140rpx" @click="previewImage(images,i)"></u-image>
                    <view class="mr-20" v-for="i in workImage">
                        <u-image :src="i" width="140rpx" height="140rpx" @click="previewImage(workImage,i)"></u-image>
                    </view>
                </view>
                <u-upload v-else :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
@@ -86,7 +92,7 @@
        <view class="image-wrap bgc-ff" v-if="roleTypeName == 'xyzt' && info.confirmFlag != 2">
        <view class="image-wrap bgc-ff" v-if="roleTypeName == 'xyzt' && info.confirmFlag == 4">
            <u-form labelWidth="70" :model="form" ref="form">
                <u-form-item label="是否隐患:" labelWidth="100" prop="isProblem">
                    <u-radio-group v-model="form.isProblem">
@@ -112,6 +118,9 @@
                </u-form-item> -->
            </u-form>
        </view>
        <view class="blank"></view>
        <!-- <audit-action @handle="submit"
            v-if="roleType == 2 && info.confirmFlag == 1 && roleTypeName == 'mj' "></audit-action> -->
        <!-- <footer-btn v-if="roleType == 1  && info.confirmFlag == 3" text="编辑" @click="navToEdit" /> -->
@@ -129,6 +138,9 @@
        getTroubleReportDetail,
        auditTroubleReport
    } from "@/api/school/school.js"
    import {
        bizDictionary
    } from '@/api/system/dict.js'
    export default {
        components: {
            auditAction
@@ -154,10 +166,10 @@
                    }
                ],
                roleTypeName: "",
                workImage: [],
                troubleValue: ""
            }
        },
        onLoad(option) {
            let {
@@ -168,28 +180,50 @@
            if (roleAlias == "mj" || roleAlias == "xyzt") {
                this.roleType = 2;
            }
            if (roleAlias == "inhabitant" || roleAlias == "xyty") {
                this.roleType == 1;
            }
            this.id = option.id;
        },
        onShow() {
            this.getDetail(this.id)
        },
        methods: {
            getDangerTypeList(callback) {
                bizDictionary({
                    code: "hiddenDangerType"
                }).then(res => {
                    if (res.code == 200) {
                        callback(res.data);
                    }
                })
            },
            getDetail(id) {
                getTroubleReportDetail({
                    id
                }).then(res => {
                    this.info = res.data;
                    if (res.data.images) {
                        this.images = this.$setImageUrl(res.data.images);
                    }
                    if (Number(res.data.type) == 1) {
                        uni.setNavigationBarTitle({
                            title: "隐患排查详情"
                        })
                        this.getDangerTypeList(data => {
                            this.troubleValue = this.$getIndex(data, res.data.hiddenDangerType, "dictKey",
                                "dictValue").name
                        })
                    } else {
                        uni.setNavigationBarTitle({
                            title: "矛盾纠纷详情"
                        })
                    }
                    if (res.data.workImage) {
                        this.images = this.$setImageUrl(res.data.workImage);
                        this.workImage = this.$setImageUrl(res.data.workImage);
                    }
                    if (res.data.type == 1) {
                        uni.setNavigationBarTitle({
@@ -269,7 +303,8 @@
                        this.form.images.forEach(e => {
                            urls.push(e.name)
                        })
                        this.form.workImage = urls.join(",")
                        data.workImage = urls.join(",")
                    } else {
                        this.$showTips("请上传工作照片")
                        return;
@@ -339,7 +374,10 @@
    .upload {
        margin: 0 30rpx;
        padding: 30rpx;
    }
    .blank {
        width: 100%;
        height: 200rpx;
    }
</style>