123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351 |
- <template>
- <!-- 笔记审核 -->
- <view :class="['container', 'to-examine', detailDataForm.ExamineStatus == 2 && isShow && 'to-examine-bottom']" v-if="detailDataForm.HasPermission == 1">
- <view class="content-item">
- <view class="author-name">
- <view class="img-box">
- <image :src="detailDataForm.HeadImg" @click="goDetailPages"></image>
- </view>
- <text style="margin-left: 10rpx">{{ detailDataForm.NickName }}</text>
- </view>
- <view class="type-time">
- <view class="type"> {{ detailDataForm.Type == 1 ? "笔 记" : "观 点" }} </view>
- <view class="time">{{ detailDataForm.PublishTime }}</view>
- </view>
- <view class="title-item global_title"> {{ detailDataForm.Title }}</view>
- <view class="text-conten">
- <mp-html :content="detailDataForm.Content" />
- </view>
- <block v-if="detailDataForm.Docs && detailDataForm.Docs.length > 0">
- <view @click="goFilePages(item)" class="file-item text_oneLine" v-for="(item, index) in detailDataForm.Docs" :key="index"> <image :src="item.DocIcon"></image> {{ item.DocName }} </view>
- </block>
- <view class="image-conten">
- <image v-for="key in dataProcessing(detailDataForm.ImgUrl)" :key="key" :src="key" @click="previewImageMediahandler(key)"></image>
- </view>
- <view class="lable-conten">
- <view class="item" v-for="key in dataProcessing(detailDataForm.Tags)" :key="key">{{ key }}</view>
- </view>
- <block v-if="detailDataForm.IsShowExamine">
- <image v-if="detailDataForm.ExamineStatus == 3" class="label-image" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/pass_through.png"></image>
- <image v-if="detailDataForm.ExamineStatus == 4" class="label-image" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/overrule_icon.png"></image>
- </block>
- </view>
- <view class="bottom-btn" v-if="detailDataForm.ExamineStatus == 2 && isShow">
- <view @click="GoEditColumnReport">修改</view>
- <view @click="rejectTextShow = true">驳回</view>
- <view @click="passRhrouhg">通过</view>
- </view>
- <u-modal
- v-model="rejectTextShow"
- :show-title="false"
- show-cancel-button
- confirm-text="确定"
- cancel-text="取消"
- :content-style="{ fontSize: '32rpx' }"
- :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
- :confirm-style="{ fontWeight: '700' }"
- @confirm="confirmModal"
- @cancel="cancelModal"
- async-close
- ref="reject-text"
- >
- <view class="slot-content slot-content-text">
- <text class="add-lable-txt">驳回理由</text>
- <input v-model="rejectText" placeholder="请输入驳回理由" />
- </view>
- </u-modal>
- <Loading />
- </view>
- <view class="nodata" v-else>
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
- <text>报告加急审核中,请耐心等待~</text>
- </view>
- </template>
- <script>
- import { purchaserApi } from "@/config/api";
- export default {
- data() {
- return {
- rejectTextShow: false,
- rejectText: "",
- detailDataForm: "",
- detailId: 0,
- isShow: false,
- };
- },
- methods: {
- previewImageMediahandler(key) {
- uni.previewImage({
- urls: [key], //查看图片的数组
- });
- },
- passRhrouhg() {
- uni.showModal({
- title: "提醒",
- content: "确定通过此内容在小程序展示吗?",
- confirmColor: "#376cbb",
- cancelColor: "#606266",
- success: async (res) => {
- if (res.confirm) {
- const res = await purchaserApi.yanxuanSpecialEnable({
- Id: this.detailId,
- Status: 1, //1通过2驳回
- });
- if (res.Ret === 200) {
- this.$util.toast("审核通过");
- uni.navigateBack({
- fail() {
- uni.navigateTo({
- url: "/pages-purchaser/specialColumn/specialColumn",
- });
- },
- });
- }
- }
- },
- });
- },
- // 数据处理
- dataProcessing(item) {
- return item ? item.split(",") : [];
- },
- // 弹框关闭事件
- cancelModal() {
- this.rejectTextShow = false;
- this.rejectText = "";
- },
- // 弹框确定事件
- async confirmModal() {
- this.$refs["reject-text"].clearLoading();
- if (!this.rejectText)
- return uni.showToast({
- title: "驳回理由不能为空",
- icon: "none",
- });
- const res = await purchaserApi.yanxuanSpecialEnable({
- Id: this.detailId,
- Status: 2, //1通过2驳回
- Reason: this.rejectText,
- });
- if (res.Ret === 200) {
- this.cancelModal();
- uni.navigateBack({
- fail() {
- uni.navigateTo({
- url: "/pages-purchaser/specialColumn/specialColumn",
- });
- },
- });
- }
- },
- // 获取专栏详情
- async getDetaliData() {
- const res = await purchaserApi.yanxuanSpecialDetail({
- Id: this.detailId,
- IsSendWx: 1,
- });
- if (res.Ret === 200) {
- this.detailDataForm = res.Data;
- }
- },
- // 去往预览文件
- goFilePages(item) {
- wx.downloadFile({
- // 示例 url,并非真实存在
- url: item.DocUrl,
- success: function (res) {
- const filePath = res.tempFilePath;
- wx.openDocument({
- filePath: filePath,
- });
- },
- });
- },
- goDetailPages() {
- uni.navigateTo({ url: "/pages-purchaser/columnDetail/columnDetail?id=" + this.detailDataForm.UserId });
- },
- // 去往编辑页面
- GoEditColumnReport() {
- if (this.detailDataForm.ContentHasStyle) {
- uni.showModal({
- content: "此内容包含较多文本格式或文档,请前往管理后台修改",
- confirmColor: "#376cbb",
- confirmText: "知道了",
- showCancel: false,
- cancelColor: "#606266",
- });
- return;
- }
- uni.navigateTo({ url: "/pages-purchaser/editColumnReport/editColumnReport?id=" + this.detailId });
- },
- },
- onLoad(options) {
- this.detailId = Number(options.id) || 0;
- this.isShow = options.isMessage == "模板" ? true : false;
- this.detailId > 0 && this.getDetaliData();
- },
- };
- </script>
- <style lang="scss" scope>
- .to-examine {
- padding: 30rpx;
- background: $uni-bg-color;
- .content-item {
- position: relative;
- padding: 40rpx;
- background-color: #fff;
- border-radius: 16rpx;
- .type-time {
- display: flex;
- align-items: center;
- justify-content: space-between;
- color: #666666;
- .type {
- width: 110rpx;
- height: 42rpx;
- line-height: 42rpx;
- text-align: center;
- border-radius: 38rpx;
- color: #928563;
- background-color: #fff6de;
- font-weight: 500;
- }
- }
- .title-item {
- margin: 10rpx 0 20rpx;
- line-height: 46rpx;
- }
- .text-conten {
- font-size: 32rpx;
- line-height: 44rpx;
- }
- .file-item {
- width: 100%;
- height: 42rpx;
- margin: 20rpx 0;
- display: flex;
- align-items: center;
- background-color: #f8f8fa;
- color: #376cbb;
- image {
- margin-right: 15rpx;
- width: 27rpx;
- height: 27rpx;
- }
- }
- .image-conten {
- display: flex;
- flex-wrap: wrap;
- image {
- width: 144rpx;
- height: 144rpx;
- margin-right: 20rpx;
- }
- }
- .lable-conten {
- display: flex;
- flex-wrap: wrap;
- margin: 20rpx 0;
- font-size: 24rpx;
- .item {
- display: flex;
- align-items: center;
- height: 34rpx;
- border-radius: 44rpx;
- padding: 0 35rpx;
- background-color: #f0f1f3;
- margin: 0 20rpx 20rpx 0;
- }
- }
- .collect-conten {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- color: #666666;
- image {
- width: 27rpx;
- height: 26rpx;
- margin-right: 8rpx;
- }
- }
- .author-name {
- display: flex;
- align-items: center;
- margin-bottom: 50rpx;
- .img-box {
- width: 48rpx;
- height: 48rpx;
- overflow: hidden;
- font-size: 28rpx;
- color: #333;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- }
- .bottom-btn {
- position: fixed;
- justify-content: space-around;
- bottom: 0;
- left: 0;
- width: 100%;
- background-color: #fff;
- padding: 48rpx 25rpx;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- display: flex;
- z-index: 999;
- view {
- width: 220rpx;
- height: 84rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 8rpx;
- background-color: $uni-color-new;
- color: #fff;
- font-weight: 600;
- }
- view:nth-child(1) {
- color: $uni-color-new;
- background-color: #e5efff;
- }
- view:nth-child(2) {
- color: #d54941;
- background-color: #fff0ed;
- }
- }
- .add-lable-txt {
- color: #000;
- font-size: 36rpx;
- flex-wrap: 600;
- margin-bottom: 30rpx;
- width: 100%;
- text-align: center;
- }
- .slot-content-text {
- text-align: left;
- input {
- height: 96rpx;
- background-color: #f8f8fa;
- }
- }
- .label-image {
- position: absolute;
- top: 0;
- right: 0;
- z-index: 9;
- width: 222rpx;
- height: 222rpx;
- }
- }
- .to-examine-bottom {
- padding-bottom: 200rpx;
- }
- </style>
|