123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- <template>
- <view>
- <view class="list">
- <view class="btn_box">
- <view class="btn" @click="go_oa_url()">
- <view class="text">我的申请</view>
- <view class="icon">
- <uni-icons type="right" color="#fff" size="16"></uni-icons>
- </view>
- </view>
- </view>
- <view class="item" v-for="(item,index) in list" :key="index">
- <div class="line">
- <view class="title">{{item.car_type}}</view>
- <view class="btn" @click="go_oa_url_2(item)">
- <view class="icon">
- <uni-icons type="list" color="#fff" size="16"></uni-icons>
- </view>
- <view class="text">申请</view>
- </view>
- </div>
- <div class="label_box">
- <view class="label" v-for="(item_2,index_2) in item.con" :key="index_2" v-if="item_2.is_show == 1">
- <view class="name">{{item_2.title}}</view>
- <view class="num">{{item_2.con}}</view>
- </view>
- </div>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- mine_code:"",
- base_url:"http://oa_system.nxjiewei.com:8011",
- list: []
- };
- },
- onLoad(option) {
- console.log(uni.getStorageSync('mine_code'))
- if(uni.getStorageSync('mine_code').indexOf("_neiwang") != -1){
- console.log("内网")
- this.base_url = "http://n.oa_system.nxjiewei.com:8011"
- }else{
- console.log("公网")
- }
-
- console.log(option)
- uni.setNavigationBarTitle({
- title: option.title
- })
- },
- mounted() {
- this.get_list()
- },
- methods: {
- go_oa_url() {
- uni.navigateTo({
- url: "../../origanization/OA/h5/h5",
- success: (res) => {
- // 通过eventChannel向被打开页面传送数据
- res.eventChannel.emit('acceptDataFromOpenerPage', {
- url: this.base_url + "/?m=ying&d=we&mnum=rjz_car_apply&show=we&hideheader=true",
- title: "用车申请"
- })
- }
- })
- },
- go_oa_url_2(item) {
- console.log(item)
- uni.navigateTo({
- url: "../../origanization/OA/h5/h5",
- success: (res) => {
- // 通过eventChannel向被打开页面传送数据
- res.eventChannel.emit('acceptDataFromOpenerPage', {
- url: this.base_url + "/index.php?a=lum&m=input&d=flow&num=rjz_car_apply&hideheader=true&show=we&car_type="+item.car_type+"&free_con="+item.con[1].con,
- title: "用车申请"
- })
- }
- })
- },
- get_list() {
- uni.request({
- method: "GET",
- url: this.base_url + "/api.php?m=rjzcarlist&a=getFreeCarCon&ischeck=0",
- success: (res) => {
- console.log(res.data);
- this.list = res.data.data
- }
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .list {
- box-sizing: border-box;
- padding: 25rpx;
- .btn_box {
- display: flex;
- justify-content: flex-end;
- margin-bottom: 30rpx;
- .btn {
- width: 230rpx;
- height: 60rpx;
- line-height: 60rpx;
- background: #00A0E8;
- border-radius: 32rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- .text {
- font-size: 30rpx;
- color: #fff;
- font-weight: 700;
- margin-right: 10rpx;
- }
- .icon {
- font-weight: 700;
- }
- }
- }
- .item {
- margin-bottom: 30rpx;
- box-shadow: 1rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.13);
- border-radius: 20rpx;
- box-sizing: border-box;
- padding: 30rpx;
- .line {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .title {
- font-size: 32rpx;
- font-weight: 700;
- border-bottom: 6rpx solid #009fe8;
- }
- .btn {
- width: 140rpx;
- height: 46rpx;
- background: #00A0E8;
- border-radius: 28rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- .text {
- font-size: 26rpx;
- color: #fff;
- margin-left: 10rpx;
- }
- }
- }
- .label_box {
- margin-top: 30rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .label {
- text-align: center;
- .name {
- color: #6F6F6F;
- font-size: 24rpx;
- }
- .num {
- font-size: 26rpx;
- font-weight: 700;
- }
- }
- }
- }
- }
- </style>
|