提交 ef2efdfe 作者: wk

待办功能页面完善

父级 10e4f3d9
...@@ -222,6 +222,14 @@ const params = { ...@@ -222,6 +222,14 @@ const params = {
url: "/proxy/adminc/v1/system_manage/p_app/application", url: "/proxy/adminc/v1/system_manage/p_app/application",
method: "get" method: "get"
}, },
getProjectInfo: {
url: "/plat/api/v1/project/get_project_info",
method: "get"
},
getNeedDo: {
url: "/plat/api/v1/common_check/check_object/my_form_list",
method: "get"
}
} }
export default buildParam(params) export default buildParam(params)
import Api from "./api.js" import Api from "./api.js"
async function $mta(menuName = '', routeUrl = '') { async function $mta(appId = '') {
console.log(menuName, routeUrl); console.log(appId);
Api.uploadVisApp({ Api.uploadVisApp({
data: { data: {
menuName: menuName, appId: appId
routeUrl: routeUrl
} }
}).then((result) => { }).then((result) => {
......
const $config = { const $config = {
pwdTemplateNo: "industry-0001", pwdTemplateNo: "industry-0001",
loginTemplateNo: "industry-0001", loginTemplateNo: "industry-0001",
systemCode: "industry", systemCode: "buildingSite",
authCode: "CED4DE04-BA74-81DF-E51E-9864E4FD0DCB", //开发CED4DE04-BA74-81DF-E51E-9864E4FD0DCB 测试:494BBE85-A6AD-392F-5628-12B39F649333 正式:D0539533-E169-5338-8ED7-3FAD554F4F62 authCode: "477A0661-EF04-11F7-9D69-0BDD73F06500", //开发CED4DE04-BA74-81DF-E51E-9864E4FD0DCB 测试:494BBE85-A6AD-392F-5628-12B39F649333 正式:D0539533-E169-5338-8ED7-3FAD554F4F62
pageSize: 20, pageSize: 20,
isPage: 1, isPage: 1,
smsCfg: "industry" smsCfg: "industry"
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
"quickapp" : {}, "quickapp" : {},
/* 小程序特有相关 */ /* 小程序特有相关 */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx3c46a41af47a9eb7", "appid" : "wxa38e989a4ba04775",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false
}, },
......
...@@ -330,6 +330,38 @@ ...@@ -330,6 +330,38 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, {
"path": "pages/gallery/allNeedDo/allNeedDo",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/gallery/finishNeedDo/finishNeedDo",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/gallery/searchNeedDo/searchNeedDo",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/gallery/processFormDetailPage/processFormDetailPage",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
} }
], ],
"globalStyle": { "globalStyle": {
......
<template>
<view class="content">
<titleBar title="全部待办"></titleBar>
<view class="count-content">共有10条待办,当前有
<span class="span">[3]</span>
条待办事项
</view>
<v-tabs :tabs="tabs" :scroll="true" :value="current" @change="tabChange"></v-tabs>
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item">
<image class="image" src="../../../static/ic-jrdb.png"></image>
<view class="item-content">
<view class="title">张三发起了隐患整改,请于2022/12/13 15:37:56前完成隐患整改。</view>
<view class="time-content">
<view class="create-time">2022/12/13 15:39:56</view>
<view class="leave-time">处理倒计时:0天20小时23分</view>
</view>
<view class="line" style="margin: 30rpx 0;"></view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
tabs: ["全部待办", "未处理", "已处理"],
current: 0,
list: [{}, {}, {}]
}
},
onLoad() {
},
methods: {
tabChange(e) {
this.current = e
}
}
}
</script>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
.count-content {
display: flex;
width: 550rpx;
margin: 20rpx 0;
background-color: #fff;
padding-left: 30rpx;
height: 30px;
align-items: center;
flex-direction: row;
border-radius: 0 30rpx 30rpx 0;
font-size: 28rpx;
color: #333;
font-weight: 400;
.span {
font-weight: 600;
color: #FFAA44;
}
}
.list-content {
display: flex;
flex-direction: column;
border-radius: 30rpx;
margin: 0 30rpx;
background-color: #fff;
.list-item {
display: flex;
padding: 30rpx 30rpx 0 30rpx;
flex-direction: row;
image {
width: 28rpx;
height: 28rpx;
}
.item-content {
display: flex;
flex-direction: column;
margin-left: 10rpx;
.title {
font-weight: 400;
font-size: 24rpx;
color: #656565;
}
.line {
width: 600rpx;
height: 0.5px;
background: rgba(0, 0, 0, 0.2);
}
.time-content {
display: flex;
margin-top: 10rpx;
align-items: center;
flex-direction: row;
.create-time {
font-weight: 400;
font-size: 24rpx;
flex: 1;
color: #656565;
}
.leave-time {
font-weight: 500;
font-size: 24rpx;
color: #333;
}
}
}
}
}
}
</style>
<template>
<view class="content">
<titleBar title="完成待办"></titleBar>
<view class="count-content">已经完成【10】条待办事项</view>
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item">
<image class="image" src="../../../static/ic-jrdb.png"></image>
<view class="item-content">
<view class="title">张三发起了隐患整改,请于2022/12/13 15:37:56前完成隐患整改。</view>
<view class="time-content">
<view class="create-time">2022/12/13 15:39:56</view>
<view class="leave-time">处理倒计时:0天20小时23分</view>
</view>
<view class="line" style="margin: 30rpx 0;"></view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [{}, {}, {}]
}
},
methods: {
}
}
</script>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
.count-content {
display: flex;
width: 400rpx;
margin: 20rpx 0;
background-color: #fff;
padding-left: 30rpx;
height: 30px;
align-items: center;
flex-direction: row;
border-radius: 0 30rpx 30rpx 0;
font-size: 28rpx;
color: #333;
font-weight: 400;
.span {
font-weight: 600;
color: #FFAA44;
}
}
.list-content {
display: flex;
flex-direction: column;
border-radius: 30rpx;
margin: 0 30rpx;
background-color: #fff;
.list-item {
display: flex;
padding: 30rpx 30rpx 0 30rpx;
flex-direction: row;
image {
width: 28rpx;
height: 28rpx;
}
.item-content {
display: flex;
flex-direction: column;
margin-left: 10rpx;
.title {
font-weight: 400;
font-size: 24rpx;
color: #656565;
}
.line {
width: 600rpx;
height: 0.5px;
background: rgba(0, 0, 0, 0.2);
}
.time-content {
display: flex;
margin-top: 10rpx;
align-items: center;
flex-direction: row;
.create-time {
font-weight: 400;
font-size: 24rpx;
flex: 1;
color: #656565;
}
.leave-time {
font-weight: 500;
font-size: 24rpx;
color: #333;
}
}
}
}
}
}
</style>
<template> <template>
<view class="content"> <view class="content">
<titleBar title="我的待办"></titleBar> <titleBar title="我的待办"></titleBar>
<view class="search-content"> <view class="search-content" @click="toSearch">
<image src="../../../static/ic-search.png" class="image"></image> <image src="../../../static/ic-search.png" class="image"></image>
<input placeholder="搜索" placeholder-class="placeholderStyle" @input="search" class="inputStyle" /> <view class="inputStyle">搜索</view>
</view> </view>
<view class="needdo-content"> <view class="needdo-content">
<view class="item-content" @click="toLink('/pages/gallery/todayNeedDo/todayNeedDo')"> <view class="item-content" @click="toLink('/pages/gallery/todayNeedDo/todayNeedDo')">
...@@ -11,31 +11,36 @@ ...@@ -11,31 +11,36 @@
<text class="text">今日待办</text> <text class="text">今日待办</text>
<image class="image" src="../../../static/ic-today.png"></image> <image class="image" src="../../../static/ic-today.png"></image>
</view> </view>
<view class="count">3</view> <view class="count">{{todayCount}}</view>
</view> </view>
<view class="item-content" style="margin-left: 20rpx;"> <view class="item-content" style="margin-left: 20rpx;"
@click="toLink('/pages/gallery/allNeedDo/allNeedDo')">
<view class="title-content"> <view class="title-content">
<text class="text">全部待办</text> <text class="text">全部待办</text>
<image class="image" src="../../../static/ic-all.png"></image> <image class="image" src="../../../static/ic-all.png"></image>
</view> </view>
<view class="count">5</view> <view class="count">{{allCount}}</view>
</view> </view>
<view class="item-content" style="margin-top: 20rpx;"> <view class="item-content" style="margin-top: 20rpx;"
@click="toLink('/pages/gallery/finishNeedDo/finishNeedDo')">
<view class="title-content"> <view class="title-content">
<text class="text">完成待办</text> <text class="text">完成待办</text>
<image class="image" src="../../../static/ic-finish.png"></image> <image class="image" src="../../../static/ic-finish.png"></image>
</view> </view>
<view class="count">5</view> <view class="count">{{finishCount}}</view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import Api from "../../../api/api.js"
export default { export default {
data() { data() {
return { return {
todayCount: 0,
allCount: 0,
finishCount: 0
} }
}, },
methods: { methods: {
...@@ -43,6 +48,53 @@ ...@@ -43,6 +48,53 @@
uni.navigateTo({ uni.navigateTo({
url: router url: router
}) })
},
toSearch() {
uni.navigateTo({
url: "/pages/gallery/searchNeedDo/searchNeedDo"
})
},
getTodayNeedDo() {
Api.getNeedDo({
data: {
is_page: 1,
page: 1,
page_size: 5,
is_today: 1
}
}).then((result) => {
if (result.code == 0) {
this.todayCount = result.data.total_count
}
})
},
getAllNeedDo() {
Api.getNeedDo({
data: {
is_page: 1,
page: 1,
page_size: 5,
is_deal: 2
}
}).then((result) => {
if (result.code == 0) {
this.allCount = result.data.total_count
}
})
},
getFinishNeedDo() {
Api.getNeedDo({
data: {
is_page: 1,
page: 1,
page_size: 5,
is_deal: 1
}
}).then((result) => {
if (result.code == 0) {
this.finishCount = result.data.total_count
}
})
} }
} }
} }
...@@ -77,7 +129,7 @@ ...@@ -77,7 +129,7 @@
.inputStyle { .inputStyle {
font-size: 24rpx; font-size: 24rpx;
margin-left: 20rpx; margin-left: 20rpx;
color: #333; color: #999;
} }
} }
......
<template>
<view class="process-form-parent">
<titleBar :title="title"></titleBar>
<view style="display: flex;flex-direction: column;padding: 32rpx;">
<view class="executor-text">发起时间:{{forms[0].created_at}}</view>
<view class="executor-text">发起人:{{forms[0].created_by_name}}</view>
<view class="executor-text">目前状态:{{status}}</view>
<view class="executor-text">
目前执行人:{{forms[forms.length-1].executorStr}}
</view>
</view>
<view v-for="(form,n) in forms" :key="n" style="margin-bottom: 20rpx;">
<!-- 标题 灰背景 -->
<view class="detail-title">
<view style="display: flex;flex-direction: row;align-items: center;">
<text class="text-black-normal" style="flex: 1;">{{form.check_item_name}}</text>
<text class="text-blue-normal" v-if="form.business_type==4&&n==0&&isEditShow()"
@click="toEdit(n)">编辑</text>
<image :src="form.open?'../../static/icon_up_arrow.png':'../../static/icon_drop_arrow.png'"
style="width: 40rpx;height: 20rpx;margin-left: 40rpx;" @click="upOrDown(form)"></image>
</view>
<view class="executor-text" v-if="n!=0">
执行人:{{form.executorStr}}
</view>
<view class="executor-text" v-else>
发起人:{{form.created_by_name}}
</view>
</view>
<view v-for="(item,index) in form.content_detail" :key="index" v-if="form.open">
<view v-if="isEdit==1&&(n==forms.length-1)" class="edit-form-item-list">
<gi-input v-if="item.control_type==16" :title="item.content_name" :isMust="item.validate_type==1"
:index="index" :config="item.control_cfg" @inputChange="inputChange" :isCopy="item.is_copy"
:vals="item.real_value">
</gi-input>
<gi-textarea v-if="item.control_type==17" :title="item.content_name" :isMust="item.validate_type==1"
:index="index" :config="item.control_cfg" @inputChange="textareaChange" :isCopy="item.is_copy"
:vals="item.real_value">
</gi-textarea>
<gi-number-input v-if="item.control_type==18" :title="item.content_name"
:isMust="item.validate_type==1" :index="index" :config="item.control_cfg"
@inputChange="numberChange" :isCopy="item.is_copy" :vals="item.real_value">
</gi-number-input>
<gi-time-select v-if="item.control_type==19" :title="item.content_name"
:isMust="item.validate_type==1" :index="index" :config="item.control_cfg" @change="timeChange"
:realValue="item.real_value">
</gi-time-select>
<gi-label-select v-if="item.control_type==20" :title="item.content_name"
:isMust="item.validate_type==1" :index="index" :config="item.control_cfg" @change="labelChange"
:selected="item.real_value">
</gi-label-select>
<gi-select v-if="item.control_type==21" :title="item.content_name" :isMust="item.validate_type==1"
:project_id="project_id" :index="index" :config="item.control_cfg" @change="selectChange"
:selected="item.real_value">
</gi-select>
<gi-upload v-if="item.control_type==22&&item.control_cfg.up_type!=5" :title="item.content_name"
:isMust="item.validate_type==1" :index="index" :config="item.control_cfg" @change="fileChange"
:realValue="item.real_value">
</gi-upload>
<gi-record v-if="item.control_type==22&&item.control_cfg.up_type==5" :title="item.content_name"
:isMust="item.validate_type==1" :index="index" :config="item.control_cfg" @change="audioChange"
:realValue="item.real_value" @addAudio="addAudio" :state="recordSate"></gi-record>
<gi-scan v-if="item.control_type==23" :title="item.content_name" :isMust="item.validate_type==1"
:index="index" :config="item.control_cfg" :isCopy="item.is_copy"></gi-scan>
<gi-note v-if="item.control_type==24" :item="item"></gi-note>
<gi-compute v-if="item.control_type==25" :title="item.content_name" :isMust="item.validate_type==1"
:index="index" :config="item.control_cfg" :form="item"></gi-compute>
<gi-component-group v-if="item.control_type==26" :index="index" :component="item"
@groupChange="groupChange"></gi-component-group>
<gi-location v-if="item.control_type==27" :config="item.control_cfg" :title="item.content_name"
:isMust="item.validate_type==1" :index="index" @change="locationChange"></gi-location>
<gi-select-user v-if="item.control_type==28" :title="item.content_name" :config="item.control_cfg"
:isMust="item.validate_type==1" :index="index" :projectId="project_id"
:realValue="item.real_value"></gi-select-user>
<!-- 数据可变控件 -->
<gi-common-value-variable v-if="item.control_type==29" :item="item" :index="index"
@inputChange="inputChangeVariable">
</gi-common-value-variable>
<!-- 数据不可变控件 -->
<gi-common-value-unvariable v-if="item.control_type==30" :item="item" :index="index">
</gi-common-value-unvariable>
<!-- 业务选择控件 -->
<gi-business-select v-if="item.control_type==31" :item="item" :index="index"
:project_id="project_id"></gi-business-select>
<gi-sign v-if="item.control_type==33" :item="item" :index="index" @signChange="signChange">
</gi-sign>
<gi-weather v-if="item.control_type==34" @change="weatherChange" :real_value="item.real_value"
:index="index">
</gi-weather>
<gi-signin v-if="item.control_type==35" :users="item.real_value" :record_id="form.check_record_id">
</gi-signin>
<gi-custom-data :item="item" v-if="item.control_type==36" :selectValue="item.real_value[0]"
:index="index">
</gi-custom-data>
</view>
<view class="form-detail-content" v-else>
<view class="form-detail-item" v-if="item.control_type==16">
<view class="normal-text-grey">{{item.content_name}}</view>
<view v-if="item.control_cfg.value_type==2" class="detail-text">
{{item.control_cfg.textVal}}
</view>
<view v-else>
<view v-for="(value,i) in item.real_value" :key="i" class="detail-text">
{{value||""}}
</view>
</view>
<view class="margin-top-line"></view>
</view>
<view class="form-detail-item" v-if="item.control_type==17">
<view class="normal-text-grey">{{item.content_name}}</view>
<view v-if="item.control_cfg.value_type==2" class="detail-text">
{{item.control_cfg.textVal}}
</view>
<view v-else>
<view v-for="(value,i) in item.real_value" :key="i" class="detail-text">
{{value||""}}
</view>
</view>
<view class="margin-top-line"></view>
</view>
<view class="form-detail-item"
v-if="item.control_type==18&&item.real_value&&item.real_value.length>0">
<view class="normal-text-grey">{{item.content_name}}</view>
<view v-for="(value,i) in item.real_value" :key="i" class="detail-text">
{{value||""}}
</view>
<view class="margin-top-line"></view>
</view>
<view class="form-detail-item"
v-if="item.control_type==19&&item.real_value&&item.real_value.length>0">
<view class="normal-text-grey">{{item.content_name}}</view>
<view class="detail-text" v-if="item.control_cfg.date_type==1">
{{item.real_value[0]||""}}
</view>
<view class="detail-text" v-if="item.control_cfg.date_type==2">
{{item.real_value[0]||""}}——{{item.real_value[1]||""}}
</view>
<view class="margin-top-line"></view>
</view>
<view class="form-detail-item"
v-if="item.control_type==30&&item.real_value&&item.real_value.length>0">
<view class="normal-text-grey">{{item.content_name}}</view>
<view class="detail-text">{{item.real_value[0]||""}}</view>
<view class="margin-top-line"></view>
</view>
<view class="form-detail-item"
v-if="item.control_type==29&&item.real_value&&item.real_value.length>0">
<view class="normal-text-grey">{{item.content_name}}</view>
<view class="detail-text">{{item.real_value[0].value||""}}</view>
<view class="margin-top-line"></view>
</view>
<view class="form-detail-item"
v-if="item.control_type==20&&item.real_value&&item.real_value.length>0">
<view class="normal-text-grey">{{item.content_name}}</view>
<view v-for="(value,i) in item.real_value" :key="i" class="detail-text">
<text class="text-black-normal">{{value.value}}</text>
<text class="text-black-normal" v-if="!(i==item.real_value.length-1)">,</text>
</view>
<view class="margin-top-line"></view>
</view>
<view class="form-detail-item"
v-if="item.control_type==21&&item.real_value&&item.real_value.length>0">
<view class="normal-text-grey">{{item.content_name}}</view>
<view style="display: flex;flex-direction: row;">
<view v-for="(value,i) in item.real_value" :key="i" class="detail-text">
<text class="text-black-normal">{{value.value}}</text>
<text class="text-black-normal" v-if="!(i==item.real_value.length-1)">,</text>
</view>
</view>
<view class="margin-top-line"></view>
</view>
<view class="form-detail-item"
v-if="item.control_type==22&&item.real_value&&item.real_value.length>0">
<view class="normal-text-grey">{{item.content_name}}</view>
<uni-grid :column="4" v-if="item.control_cfg.up_type==2&&item.control_cfg.use_engin_cloud!=1">
<uni-grid-item v-for="(image,k) in item.real_value" :key="k" :index="k">
<image style="width: 144rpx;height: 144rpx;margin: 20rpx;" :src="image"
@click="imageClick(item,k)"></image>
</uni-grid-item>
</uni-grid>
<view style="display: flex;flex-direction: column;"
v-if="item.control_cfg.up_type==2&&item.control_cfg.use_engin_cloud==1">
<view style="display: flex;flex-direction: row;align-items: center;"
v-for="(image,k) in item.real_value" :key="k" :index="k">
<image style="width: 144rpx;height: 144rpx;margin: 20rpx;" :src="image"
@click="imageClick(item,k)"></image>
<view style="display: flex;flex-direction: row;align-items: center;margin-left: 32rpx;"
@click="toRzResult(item,k)"
v-if="item.control_cfg.up_type==2&&item.control_cfg.use_engin_cloud==1">
<view style="font-size: 28rpx;color: #1890ff;margin-left: 10rpx;">二级认证结果</view>
</view>
</view>
</view>
<view style="display: flex;flex-direction: column;padding: 32rpx 0 0 32rpx;"
v-if="item.control_cfg.up_type==1">
<view class="gi-upload-file-item" v-for="(file,k) in item.real_value" :key="k">
<image src="../../static/doc-icon.png" style="width: 80rpx;height: 80rpx;"></image>
<view class="gi-file-info-item" @click="fileClick(item,k)">
<text class="text-black-normal">{{file.name}}</text>
<text class="text-grey" style="margin-top: 10rpx;">{{file.size}}</text>
</view>
</view>
</view>
<uni-grid :column="4" v-if="item.control_cfg.up_type==4">
<uni-grid-item v-for="(video,k) in item.real_value" :key="k" :index="k">
<view class="uni-upload-image">
<view class="video-item" @click="videoItem(video)">
<image :src='video.url+"?x-oss-process=video/snapshot,t_700,w_600,h_600,m_fast"'
style="width: 144rpx;height: 144rpx;"></image>
</view>
</view>
</uni-grid-item>
</uni-grid>
<uni-grid :column="4" v-if="item.control_cfg.up_type==5">
<uni-grid-item v-for="(audio,k) in item.real_value" :key="k" :index="k">
<view class="uni-upload-image">
<view class="record-item" @click="playAudio(audio,k,index,n)">
<image :src="dealIcon(audio)" style="width: 48rpx;height: 48rpx;">
</image>
<view class="text-grey">{{audio.duration/1000}}s</view>
</view>
</view>
</uni-grid-item>
</uni-grid>
<view class="margin-top-line"></view>
</view>
<view class="form-detail-item" v-if="item.control_type==24">
<gi-note :item="item"></gi-note>
</view>
<gi-weather v-if="item.control_type==34" :real_value="item.real_value"></gi-weather>
<view class="form-detail-item"
v-if="item.control_type==25&&item.real_value&&item.real_value.length>0">
<view class="normal-text-grey">{{item.content_name}}</view>
<view style="display: flex;flex-direction: row;align-items: center;padding: 20rpx 0 0 0rpx;">
<view class="text-black-normal" style="flex: 1;">实得分数</view>
<view class="text-grey-black-normal">{{item.real_value[0].real_value}}</view>
</view>
<view class="margin-top-line"></view>
</view>
<detail-text-item :title="item.content_name" :content="item.real_value"
v-if="item.control_type==23||item.control_type==27" class="form-detail-item"></detail-text-item>
<gi-group-detail v-if="item.control_type==26" :item="item"></gi-group-detail>
<view class="form-detail-item" v-if="item.control_type==28">
<view class="normal-text-grey">{{item.content_name}}</view>
<view style="display: flex;flex-direction: row;flex-wrap: wrap;">
<view v-for="(value,i) in item.real_value" :key="i"
style="display: flex;flex-direction: row;">
<text class="text-black-normal">{{value.user_name}}</text>
<text class="text-black-normal" v-if="!(i==item.real_value.length-1)">,</text>
</view>
</view>
<view class="margin-top-line"></view>
</view>
<view class="form-detail-item" v-if="item.control_type==33">
<image style="height: 400rpx;width: 100%;" v-if="item.real_value&&item.real_value!=''"
:src="item.real_value"></image>
<view class="margin-top-line"></view>
</view>
<gi-signin v-if="item.control_type==35" :users="item.real_value" :record_id="form.check_record_id">
</gi-signin>
<view class="form-detail-item" v-if="item.control_type==36">
<view class="normal-text-grey">{{item.content_name}}</view>
<view class="detail-text">{{item.real_value[0]||""}}</view>
<view class="margin-top-line"></view>
</view>
</view>
</view>
</view>
<view style="height: 144rpx;" v-if="isEdit==1"></view>
<view class="uni-group-button" v-if="isEdit==1">
<button class="uni-grey-button" @click="toSave">暂存</button>
<button class="uni-blue-button" @click="toNext">下一步</button>
</view>
</view>
</template>
<script>
import uniCollapse from '@/components/uni-collapse/uni-collapse.vue'
import uniCollapseItem from '@/components/uni-collapse-item/uni-collapse-item.vue'
import Api from "../../../api/api.js"
export default {
components: {
uniCollapse,
uniCollapseItem
},
data() {
return {
forms: [],
obj_no: "",
form: {},
itemList: [],
check_module_id: "",
check_tpl_id: "",
project_id: "",
node_no: "",
isEdit: 0,
status: "",
check_record_id: "",
curIndex: -1,
playIndex: -1,
isCheck: false,
title: ""
}
},
onLoad: function(option) {
this.status = option.status
this.obj_no = option.obj_no
this.check_module_id = option.check_module_id
this.check_tpl_id = option.check_tpl_id
this.project_id = option.project_id
this.node_no = option.node_no
this.isEdit = option.is_edit
this.isVis = option.is_edit
console.log(this.obj_no);
this.title = option.title
let business_name = uni.getStorageSync("business_name")
this.isCheck = "焊口检查" == business_name
this.getFormList()
},
onShow: function() {
uni.$once("change", res => {
console.log("单复选变化", index + "-----" + JSON.parse(res.selected));
let index = parseInt(res.index)
this.itemList[index].real_value = JSON.parse(res.selected)
this.$set(this.itemList, index, this.itemList[index])
})
uni.$once("computeResult", res => {
let index = parseInt(res.index)
this.itemList[index] = JSON.parse(res.form)
this.$set(this.itemList, index, this.itemList[index])
})
uni.$once("groupEdit", res => {
let index = parseInt(res.index)
let childIndex = parseInt(res.childIndex)
this.itemList[index].control_children[childIndex] = JSON.parse(res.children)
this.$set(this.itemList, index, this.itemList[index])
console.log(this.itemList[index]);
})
//人员选择页面跳转返回
uni.$once("selectUser", res => {
let index = parseInt(res.index)
let type = parseInt(res.type)
if (type == 0) {
this.itemList[index].real_value = res.selected
this.$set(this.itemList, index, this.itemList[index])
console.log(this.itemList[index]);
}
})
uni.$once("refreshDetail", res => {
let data = uni.getStorageSync("params")
let result = JSON.parse(res)
let index = parseInt(result.index)
let form = JSON.parse(data)
this.$set(this.forms, index, form)
})
uni.$once("businessSelect", res => {
let params = JSON.parse(res)
let index = params.index
let itemList = params.itemList
let result = params.result
this.refreshBusinessData(result)
})
uni.$once("getCustomData", res => {
let index = parseInt(res.index)
let value = parseInt(res.value)
let item = this.itemList[index]
item.real_value = [value]
this.$set(this.itemList, index, item)
})
},
methods: {
toRzResult(item, index) {
var txtId = item.control_cfg.gcyRzResult[index].second
var channel = item.control_cfg.gcyRzResult[index].first
uni.navigateTo({
url: "/pages/gallery/rzH5/rzH5?id=" + txtId + "&channel=" + channel
})
},
weatherChange: function(index, value) {
this.itemList[index].real_value = value
},
isEditShow: function() {
return this.isCheck && this.isEdit == 1
},
signChange: function(index, url) {
let item = this.itemList[index]
item.real_value = [url]
this.$set(this.itemList, index, item)
},
refreshBusinessData: function(result) {
//所有控件字段
let list = result.fields
if (list && list.length > 0) {
let items = []
for (var i = 0; i < this.itemList.length; i++) {
let item = this.itemList[i]
for (var j = 0; j < list.length; j++) {
let valueData = list[j]
if (item.real_field == valueData.field) {
if (item.control_type == 21 || item.control_type == 29) {
if (valueData.value != null) {
item.real_value = [{
"value": valueData.value
}]
}
} else { //时间还按之前的
if (valueData.value != null) {
item.real_value = [valueData.value]
}
}
}
}
items.push(item)
}
this.itemList = items
}
},
inputChangeVariable: function(value, index) {
this.itemList[index].real_value = value
},
fileClick: function(item, index) {
uni.downloadFile({
url: item.real_value[index].url,
success: (res) => {
if (res.statusCode === 200) {
uni.saveFile({
tempFilePath: res.tempFilePath, //临时路径
success: function(res) {
uni.showToast({
icon: 'none',
mask: true,
title: '文件已保存:' + res.savedFilePath, //保存路径
duration: 3000,
});
setTimeout(() => {
//打开文档查看
uni.openDocument({
filePath: res.savedFilePath,
success: function(res) {
// console.log('打开文档成功');
}
});
}, 1000)
}
});
}
}
})
},
dealIcon: function(audio) {
if (audio.icon) {
return audio.icon
} else {
return "../../static/record-ic.png"
}
},
playAudio: function(audio, k, index, m) {
const innerAudioContext = uni.createInnerAudioContext();
let form = this.forms[m]
if (this.playIndex == index && index == this.curIndex) {
innerAudioContext.stop()
audio.icon = "../../static/record-ic.png"
form.content_detail[index].real_value[k] = audio
this.playIndex = -1
this.curIndex = -1
} else {
innerAudioContext.stop()
this.playIndex = k
this.curIndex = index
innerAudioContext.src = audio.url;
innerAudioContext.play()
let list = []
for (var i = 0; i < form.content_detail[index].real_value.length; i++) {
let item = form.content_detail[index].real_value[i]
if (i == k) {
item.icon = "../../../static/icon_play.png"
} else {
item.icon = "../../../static/record-ic.png"
}
list.push(item)
}
form.content_detail[index].real_value = list
}
this.$set(this.forms, m, form)
innerAudioContext.onPlay((res) => {
console.log('开始播放', res);
uni.showToast({
title: "开始播放录音",
icon: 'none'
})
});
innerAudioContext.onPause(function() {
console.log('暂停播放');
});
innerAudioContext.onEnded(() => {
console.log('播放结束');
audio.icon = "../../../static/record-ic.png"
form.content_detail[index].real_value[k] = audio
this.playIndex = -1
this.curIndex = -1
uni.showToast({
title: "录音播放结束",
icon: 'none'
})
});
innerAudioContext.onTimeUpdate(() => {});
innerAudioContext.onError((res) => {
console.log(res.errMsg);
console.log(res.errCode);
uni.showToast({
icon: 'none',
title: res.errMsg
})
});
},
videoItem: function(video) {
uni.navigateTo({
url: `/pages/gallery/playVideo/playVideo?url=${video.url}`
})
},
imageClick: function(item, index) {
uni.previewImage({
current: index,
urls: item.real_value
})
},
upOrDown: function(form) {
form.open = !form.open
},
groupChange: function(index, children) {
this.itemList[index].control_children = children
},
//单文本值变化
inputChange: function(index, values) {
console.log("单文本值变化", index + "-----" + values);
this.itemList[index].real_value = values
},
locationChange: function(index, value) {
this.itemList[index].real_value = []
this.itemList[index].real_value.push(value)
},
textareaChange: function(index, values) {
console.log("多行文本值变化", index + "-----" + values);
this.itemList[index].real_value = values
},
numberChange: function(index, values) {
console.log("数字框值变化", index + "-----" + values);
this.itemList[index].real_value = values
},
timeChange: function(index, values) {
console.log("时间选择变化", index + "-----" + values);
this.itemList[index].real_value = values
},
labelChange: function(index, values) {
console.log("标签选择变化", index + "-----" + values);
this.itemList[index].real_value = values
},
selectChange: function(index, values) {
console.log("下拉选择变化", index + "-----" + values);
this.itemList[index].real_value = values
},
fileChange: function(index, values) {
console.log("附件变化", index + "-----" + values);
this.itemList[index].real_value = values
},
audioChange: function(index, values) {
console.log("录音文件变化", index + "-----" + values);
this.itemList[index].real_value = values
},
getFormList: function() {
let _this = this
Api.getFormDetailList({
data: {
"obj_no": this.obj_no
}
}).then((result) => {
console.log("表单详情", result);
if (result.code == 0) {
let list = result.data.list
for (var i = 0; i < list.length; i++) {
let form = list[i]
if (i == list.length - 1) {
form.open = true
} else {
form.open = false
}
form.executorStr = _this.dealExecutors(form.executors)
_this.forms.push(form)
}
_this.form = _this.forms[_this.forms.length - 1]
_this.itemList = _this.form.content_detail
} else {
_this.showFail(result.msg)
}
})
},
dealExecutors: function(executors) {
let executorStr = ""
if (executors) {
executors.forEach((item) => {
if (item.job_name) {
executorStr += `${item.user_name}(${item.job_name}) `
} else {
if (this.isCheck) {
executorStr += item.user_group_name
} else {
executorStr += item.user_name
}
}
})
return executorStr
}
return ""
},
showFail: function(text) {
uni.showToast({
title: text,
icon: 'none'
})
},
checkNull: function() {
let canSubmit = true
for (var i = 0; i < this.itemList.length; i++) {
let item = this.itemList[i]
if (item.control_type == 24) {
continue
}
if (item.control_type == 16 && item.control_cfg.value_type == 2) {
continue
}
let type = item.control_type
let isMust = item.validate_type
let values = item.real_value
if (isMust == 1) {
if (item.control_type == 26) {
console.log(item);
let b = false
for (var k = 0; k < item.control_children.length; k++) {
if (item.control_children[k].status && item.control_children[k].status == "已填写") {
b = true
break
}
}
console.log(b);
if (!b) {
canSubmit = false
break
}
} else {
if (!values || values.length == 0) {
canSubmit = false
break
}
}
}
}
return canSubmit
},
checkChildNull: function(list) {
let canSubmit = true
for (var i = 0; i < list.length; i++) {
let item = list[i]
if (item.control_type == 24) {
continue
}
if (item.control_type == 16 && item.control_cfg.value_type == 2) {
continue
}
let type = item.control_type
let isMust = item.validate_type
let values = item.real_value
if (isMust == 1) {
if (!values || values.length == 0) {
canSubmit = false
break
}
} else {
continue
}
}
return canSubmit
},
toSave: function() {
this.form.is_tmp = 1
this.form.check_module_id = this.form.cur_check_module_id
if (!this.form._id || this.form._id == '') {
this.form.check_record_id = this.check_record_id
} else {
this.form.check_record_id = this.form._id
}
this.$http.post({
url: "/api/v1/common_check/check_record/save",
data: this.form,
header: {
"access_token": this.getToken()
}
}).then((res) => {
console.log("提交成功", res.data);
let result = res.data
if (result.code == 0) {
this.obj_no = result.data.obj_no
this.form.obj_no = result.data.obj_no
this.check_record_id = result.data.check_record_id
uni.showToast({
title: "暂存成功",
icon: 'none'
})
} else {
uni.showToast({
title: result.msg,
icon: 'none'
})
}
})
},
toNext: function() {
let that = this
setTimeout(function() {
if (!that.checkNull()) {
uni.showToast({
title: "*必填项未填写",
icon: 'none'
})
return
}
that.form.content_detail = that.itemList
that.form.project_id = that.project_id
that.form.check_module_id = that.check_module_id
that.form.check_tpl_id = that.check_tpl_id
that.form.node_no = that.form.cur_node_no
console.log("提交的内容", that.form);
uni.setStorageSync(that.form.check_item_id, JSON.stringify(that.form))
uni.navigateTo({
url: `/pages/gallery/nextProcessPage/nextProcessPage?check_tpl_id=${that.check_tpl_id}&project_id=${that.project_id}&formId=${that.form.check_item_id}`
})
}, 500)
},
toClose: function() {
uni.navigateBack({
delta: 1
})
},
computeClick: function(index) {
let form = JSON.stringify(this.itemList[index])
uni.navigateTo({
url: `/pages/gallery/computePage/computePage?form=${form}&index=${index}`
})
},
toEdit: function(index) {
let form = JSON.stringify(this.forms[index])
uni.setStorageSync("params", form)
uni.navigateTo({
url: `/pages/gallery/editForm/editForm?index=${index}&form=${form}`
})
}
}
}
</script>
<style>
page {
background-color: #F5F5F5;
}
.detail-title {
background-color: #FFFFFF;
display: flex;
flex-direction: column;
padding: 32rpx;
}
.uni-group-button {
display: flex;
flex-direction: row;
border-top: 2rpx solid rgba(0, 0, 0, 0.1);
padding: 0px 32rpx;
height: 144rpx;
background-color: #FFFFFF;
align-items: center;
position: fixed;
z-index: 1;
right: 0;
left: 0;
bottom: 0;
}
.edit-form-item-list {
display: flex;
flex-direction: column;
background-color: #FFFFFF;
padding-left: 10rpx;
}
.form-detail-content {
display: flex;
flex-direction: column;
background-color: #FFFFFF;
padding: 0 32rpx;
}
.form-detail-item {
padding: 20rpx 0;
display: flex;
flex-direction: column;
}
.uni-upload-image {
display: flex;
position: relative;
align-items: center;
margin: 20rpx 20rpx 0px 32rpx;
height: 160rpx;
width: 160rpx;
}
.gi-upload-file-item {
display: flex;
flex-direction: row;
align-items: center;
}
.gi-file-info-item {
display: flex;
flex-direction: column;
margin-left: 32rpx;
margin-right: 32rpx;
flex: 1;
}
.detail-text {
color: #333333;
font-size: 32rpx;
padding: 20rpx 0;
flex-wrap: wrap;
}
.executor-text {
color: #999999;
font-size: 28rpx;
margin-top: 10rpx;
flex-wrap: wrap;
}
</style>
<template>
<view class="content">
<titleBar title="搜索"></titleBar>
<view class="search-content">
<image src="../../../static/ic-search.png" class="image"></image>
<input placeholder="搜索" placeholder-class="placeholderStyle" @input="search" class="inputStyle" />
</view>
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item" @click="itemClick(item)">
<image class="image" src="../../../static/ic-jrdb.png"></image>
<view class="item-content">
<view class="title">张三发起了隐患整改,请于2022/12/13 15:37:56前完成隐患整改。</view>
<view class="time-content">
<view class="create-time">2022/12/13 15:39:56</view>
<view class="leave-time">处理倒计时:0天20小时23分</view>
</view>
<view class="line" style="margin: 30rpx 0;"></view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [{}, {}, {}]
}
},
methods: {
itemClick: function(item) {
uni.navigateTo({
url: `/pages/gallery/processFormDetailPage/processFormDetailPage?obj_no=${item.obj_no}&check_module_id=${item.check_module_id}&check_tpl_id=${item.check_tpl_id}&project_id=${item.project_id}&title=${item.app_name}&is_edit=1`
})
},
}
}
</script>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
.search-content {
display: flex;
flex-direction: row;
border: 1rpx solid #656565;
height: 30px;
margin: 30rpx;
width: 688rpx;
border-radius: 30rpx;
align-items: center;
image {
width: 24rpx;
margin-left: 30rpx;
height: 24rpx;
}
.placeholderStyle {
font-size: 24rpx;
color: #999;
}
.inputStyle {
font-size: 24rpx;
margin-left: 20rpx;
color: #333;
}
}
.list-content {
display: flex;
flex-direction: column;
border-radius: 30rpx;
margin: 0 30rpx;
background-color: #fff;
.list-item {
display: flex;
padding: 30rpx 30rpx 0 30rpx;
flex-direction: row;
image {
width: 28rpx;
height: 28rpx;
}
.item-content {
display: flex;
flex-direction: column;
margin-left: 10rpx;
.title {
font-weight: 400;
font-size: 24rpx;
color: #656565;
}
.line {
width: 600rpx;
height: 0.5px;
background: rgba(0, 0, 0, 0.2);
}
.time-content {
display: flex;
margin-top: 10rpx;
align-items: center;
flex-direction: row;
.create-time {
font-weight: 400;
font-size: 24rpx;
flex: 1;
color: #656565;
}
.leave-time {
font-weight: 500;
font-size: 24rpx;
color: #333;
}
}
}
}
}
}
</style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="sel-content"> <view class="sel-content">
<view class="title-content"> <view class="title-content">
<view style="font-weight: 400;font-size: 28rpx;color: #333;flex: 1;">设置常用业务</view> <view style="font-weight: 400;font-size: 28rpx;color: #333;flex: 1;">设置常用业务</view>
<view style="font-weight: 600;font-size: 28rpx;color: #333;">恢复默认</view> <view style="font-weight: 600;font-size: 28rpx;color: #333;" @click="toDef">恢复默认</view>
<view style="font-weight: 600;font-size: 28rpx;color: #333;margin-left: 30rpx;" @click="sureConfig">完成 <view style="font-weight: 600;font-size: 28rpx;color: #333;margin-left: 30rpx;" @click="sureConfig">完成
</view> </view>
</view> </view>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<view class="menu-item" v-for="(item,index) in selList" :key="index"> <view class="menu-item" v-for="(item,index) in selList" :key="index">
<view class="logo-content"> <view class="logo-content">
<image src="../../../static/ic-sjzg.png" class="logo"></image> <image src="../../../static/ic-sjzg.png" class="logo"></image>
<image src="../../../static/delete-ic.png" class="del"></image> <image src="../../../static/delete-ic.png" class="del" @click="toDel(item)"></image>
</view> </view>
<view class="text">积分商城</view> <view class="text">积分商城</view>
</view> </view>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<view class="menu-item" v-for="(app,appIndex) in selList" :key="appIndex"> <view class="menu-item" v-for="(app,appIndex) in selList" :key="appIndex">
<view class="logo-content"> <view class="logo-content">
<image src="../../../static/ic-sjzg.png" class="logo"></image> <image src="../../../static/ic-sjzg.png" class="logo"></image>
<image src="../../../static/add-ic.png" class="del"></image> <image src="../../../static/add-ic.png" class="del" @click="toAdd(item)"></image>
</view> </view>
<view class="text">积分商城</view> <view class="text">积分商城</view>
</view> </view>
...@@ -67,6 +67,18 @@ ...@@ -67,6 +67,18 @@
}, },
sureConfig() { sureConfig() {
uni.$emit("refreshApp") uni.$emit("refreshApp")
uni.navigateBack({
delta: 1
})
},
toAdd(item) {
},
toDel(item) {
},
toDef() {
this.getDefaultApp()
} }
} }
} }
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<uni-grid column="2" v-if="isOrg"> <uni-grid column="2" v-if="isOrg">
<uni-grid-item v-for="(app,index) in appList" :key="index"> <uni-grid-item v-for="(app,index) in appList" :key="index">
<view class="app-item" @click="toLink(app)"> <view class="app-item" @click="toLink(app)">
<view :class="isLineVisil(index)?'app-name-left':'app-name-right'">劳务积分</view> <view :class="isLineVisil(index)?'app-name-left':'app-name-right'">{{app.app_name}}</view>
<image class="app-logo" src="../../static/ic-score-logo.png"></image> <image class="app-logo" src="../../static/ic-score-logo.png"></image>
<view class="line" v-if="isLineVisil(index)"></view> <view class="line" v-if="isLineVisil(index)"></view>
</view> </view>
...@@ -109,6 +109,7 @@ ...@@ -109,6 +109,7 @@
</template> </template>
<script> <script>
import App from "../../api/mta.js"
import qqmapsdk from "../../common/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js" import qqmapsdk from "../../common/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js"
import Api from "../../api/api.js" import Api from "../../api/api.js"
export default { export default {
...@@ -175,6 +176,7 @@ ...@@ -175,6 +176,7 @@
that.getMyScore() that.getMyScore()
that.getHomeComp() that.getHomeComp()
that.getWeather() that.getWeather()
that.getCommonApp()
}, },
fail() { fail() {
uni.redirectTo({ uni.redirectTo({
...@@ -267,17 +269,21 @@ ...@@ -267,17 +269,21 @@
}, },
//获取常用应用 //获取常用应用
getCommonApp() { getCommonApp() {
Api.getNormalApp({ Api.getNormalApp().then((result) => {
if (result.code == 0) {
}).then((result) => { this.appList = result.data.list
} else {
this.$toast.showToast(result.msg)
}
}) })
}, },
getRecentlyApp() { getRecentlyApp() {
Api.getNearApp({ Api.getNearApp().then((result) => {
if (result.code == 0) {
}).then((result) => { this.appList = result.data.list
} else {
this.$toast.showToast(result.msg)
}
}) })
}, },
toLinkScore() { toLinkScore() {
...@@ -312,6 +318,7 @@ ...@@ -312,6 +318,7 @@
} }
}, },
toLink(app) { toLink(app) {
this.$mta(app.app_id)
uni.navigateTo({ uni.navigateTo({
url: "/pages/mine/myScore/myScore" url: "/pages/mine/myScore/myScore"
}) })
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<text>获得你的手机号信息</text> <text>获得你的手机号信息</text>
</view> </view>
<button class="bottom" open-type="getPhoneNumber" type="primary" <button class="bottom" open-type="getPhoneNumber" type="primary"
bindgetphonenumber="onGetPhoneNumber">获取手机号码授权登录</button> @getphonenumber="getPhoneNumber">获取手机号码授权登录</button>
</view> </view>
</view> </view>
</view> </view>
...@@ -30,52 +30,8 @@ ...@@ -30,52 +30,8 @@
}; };
}, },
methods: { methods: {
onGetPhoneNumber(e) { getPhoneNumber(e) {
var that = this; console.log(e)
wx.login({
success(res) {
if (res.code) {
console.log('步骤2获检查用户登录状态,获取用户电话号码!', res)
wx.request({
url: '这里写自己的获取授权的服务器地址',
data: {
code: res.code
},
header: {
'content-type': 'application/json'
},
success: function(res) {
console.log("步骤三获取授权码,获取授权openid,session_key", res);
var userphone = res.data.data;
wx.setStorageSync('userphoneKey', userphone);
//解密手机号
var msg = e.detail.errMsg;
var sessionID = wx.getStorageSync("userphoneKey").session_key;
var encryptedData = e.detail.encryptedData;
var iv = e.detail.iv;
if (msg == 'getPhoneNumber:ok') { //这里表示获取授权成功
wx.checkSession({
success: function() {
//这里进行请求服务端解密手机号
that.deciyption(sessionID, encryptedData,
iv);
},
fail: function() {
// that.userlogin()
}
})
}
},
fail: function(res) {
console.log("fail", res);
}
})
} else {
console.log('登录失败!' + res.errMsg)
}
}
})
}, },
authLogin() { authLogin() {
if (this.unique_token !== '') { if (this.unique_token !== '') {
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
<image src="../../static/right-arrow.png" class="image"></image> <image src="../../static/right-arrow.png" class="image"></image>
</view> </view>
<view class="line" v-if="isShow('项目信息')"></view> <view class="line" v-if="isShow('项目信息')"></view>
<view class="item" v-if="isShow('项目过往')" @click="linkTo('/pages/mine/projectHistory/projectHistory')"> <view class="item" v-if="false" @click="linkTo('/pages/mine/projectHistory/projectHistory')">
<view class="name">项目过往</view> <view class="name">项目过往</view>
<image src="../../static/right-arrow.png" class="image"></image> <image src="../../static/right-arrow.png" class="image"></image>
</view> </view>
<view class="line" v-if="isShow('项目过往')"></view> <view class="line" v-if="false"></view>
<view class="item" @click="linkTo('/pages/mine/myApproval/myApproval')" v-if="isShow('我的审批')"> <view class="item" @click="linkTo('/pages/mine/myApproval/myApproval')" v-if="isShow('我的审批')">
<view class="name">我的审批</view> <view class="name">我的审批</view>
<image src="../../static/right-arrow.png" class="image"></image> <image src="../../static/right-arrow.png" class="image"></image>
......
...@@ -86,7 +86,6 @@ ...@@ -86,7 +86,6 @@
this.requestParam.worker_id = this.userInfo.worker_id || '' this.requestParam.worker_id = this.userInfo.worker_id || ''
this.requestParam.project_id = this.project.project_id || '' this.requestParam.project_id = this.project.project_id || ''
this.getScoreDetail() this.getScoreDetail()
this.$mta("我的积分", "pages/mine/myScore/myScore")
}, },
methods: { methods: {
getScoreDetail() { getScoreDetail() {
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<view class="content"> <view class="content">
<titleBar title="项目信息"></titleBar> <titleBar title="项目信息"></titleBar>
<view class="info-content"> <view class="info-content">
<view class="name">XXXXX总承包工程项目</view> <view class="name">{{project.project_name||""}}</view>
<view class="item"> <view class="item">
<view class="item-name">上级组织:</view> <view class="item-name">上级组织:</view>
<view class="item-value">中建XXX建工公司</view> <view class="item-value"></view>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="item"> <view class="item">
...@@ -15,48 +15,66 @@ ...@@ -15,48 +15,66 @@
<view class="line"></view> <view class="line"></view>
<view class="item"> <view class="item">
<view class="item-name">计划开工日期:</view> <view class="item-name">计划开工日期:</view>
<view class="item-value">2022/12/14</view> <view class="item-value">{{project.contract_start_date}}</view>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="item"> <view class="item">
<view class="item-name">计划竣工日期:</view> <view class="item-name">计划竣工日期:</view>
<view class="item-value">2023/01/14</view> <view class="item-value">{{project.contract_end_date}}</view>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="item"> <view class="item">
<view class="item-name">项目地址:</view> <view class="item-name">项目地址:</view>
<view class="item-value">浙江省杭州市拱墅区</view> <view class="item-value">{{project.province}}{{project.city}}{{project.area}}</view>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="item"> <view class="item">
<view class="item-name">详细地址:</view> <view class="item-name">详细地址:</view>
<view class="item-value">祥符街道122号</view> <view class="item-value" style="width: 488rpx;">{{project.address}}</view>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="item"> <view class="item">
<view class="item-name">项目地图:</view> <view class="item-name">项目地图:</view>
</view> </view>
</view> </view>
<map class="map-content" :longitude="longitude" :latitude="latitude"></map> <map class="map-content" :longitude="project.lon" :latitude="project.lat"></map>
<view class="jj-content"> <view class="jj-content">
<view class="item"> <view class="item">
<view class="item-name">项目简介:</view> <view class="item-name">项目简介:</view>
<view class="item-value">XXXXXXX工程是指油XXX水库引水,XX河南北两岸各建一条干渠及支斗渠等田间配套工程组成,主要解决该地区河谷两岸灌溉。</view> <view class="item-value"></view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import Api from "../../../api/api.js"
export default { export default {
data() { data() {
return { return {
longitude: "122", longitude: "122",
latitude: "36" latitude: "36",
project: {}
} }
}, },
onLoad() {
this.getProjectInfo()
},
methods: { methods: {
getProjectInfo() {
Api.getProjectInfo({
data: {
project_id: 358
}
}).then((result) => {
console.log("项目信息", result);
if (result.code == 0) {
this.project = result.data
} else {
this.$toast.showToast(result.msg)
}
})
}
} }
} }
</script> </script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
Please register or to comment