dam-7 feat 优化代码

master
hou 3 years ago
parent 9f38b72dd5
commit 954571e2d7

@ -11,20 +11,14 @@
<u-row :gutter="30">
<u-col :span="12" v-for="(item, index) in childData" :key="index">
<u-button
@click="
@click.native="
uni.navigateTo({
url: item.href,
})
"
>
<u-icon size="80" :name="item.iconClass"></u-icon>
<text class="name">
{{
session.lang == 'en'
? index + 1 + ' ' + item.engResourceName
: index + 1 + ' ' + item.resourceName
}}</text
>
<text class="name"> {{ session.lang == 'en' ? index + 1 + ' ' + item.engResourceName : index + 1 + ' ' + item.resourceName }}</text>
</u-button>
</u-col>
<!-- <u-col :span="12">

@ -14,20 +14,14 @@
<u-row :gutter="30">
<u-col :span="12" v-for="(item, index) in model.menuList" :key="index">
<u-button
@click="
@click.native="
uni.navigateTo({
url: `${item.href}?childData=${JSON.stringify(item.childResource)}`,
})
"
>
<u-icon size="80" :name="item.iconClass"></u-icon>
<text class="name">
{{
session.lang == 'en'
? index + 1 + ' ' + item.engResourceName
: index + 1 + ' ' + item.resourceName
}}</text
>
<text class="name"> {{ session.lang == 'en' ? index + 1 + ' ' + item.engResourceName : index + 1 + ' ' + item.resourceName }}</text>
</u-button>
</u-col>
<!-- <u-col :span="12">

@ -11,7 +11,7 @@
<u-row :gutter="30">
<u-col :span="12" v-for="(item, index) in childData" :key="index">
<u-button
@click="
@click.native="
uni.navigateTo({
url: item.href,
})

@ -11,20 +11,14 @@
<u-row :gutter="30">
<u-col :span="12" v-for="(item, index) in childData" :key="index">
<u-button
@click="
@click.native="
uni.navigateTo({
url: item.href,
})
"
>
<u-icon size="80" :name="item.iconClass"></u-icon>
<text class="name">
{{
session.lang == 'en'
? index + 1 + ' ' + item.engResourceName
: index + 1 + ' ' + item.resourceName
}}</text
>
<text class="name"> {{ session.lang == 'en' ? index + 1 + ' ' + item.engResourceName : index + 1 + ' ' + item.resourceName }}</text>
</u-button>
</u-col>
<!-- <u-col :span="12">

@ -2,33 +2,23 @@
<view class="page-raw-warehouse">
<view class="header">
<view class="left">
<u-icon
class="icon"
name="arrow-left"
@click="toPage(page.raw.index)"
/>
<u-icon class="icon" name="arrow-left" @click="toPage(page.raw.index)" />
</view>
<view class="title">{{ $t("message.subcontract") }}</view>
<view class="title">{{ $t('message.subcontract') }}</view>
<view class="right"></view>
</view>
<view class="container">
<u-row :gutter="30">
<u-col :span="12" v-for="(item, index) in childData" :key="index">
<u-button
@click="
@click.native="
uni.navigateTo({
url: item.href,
})
"
>
<u-icon size="80" :name="item.iconClass"></u-icon>
<text class="name">
{{
session.lang == "en"
? index + 1 + " " + item.engResourceName
: index + 1 + " " + item.resourceName
}}</text
>
<text class="name"> {{ session.lang == 'en' ? index + 1 + ' ' + item.engResourceName : index + 1 + ' ' + item.resourceName }}</text>
</u-button>
</u-col>
<!-- <u-col :span="12">
@ -62,9 +52,9 @@
</template>
<script lang="ts">
import { Component } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import model from "../model";
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from '../model';
@Component
export default class RawAppointment extends BasePage {
model = model;

@ -11,20 +11,14 @@
<u-row :gutter="30">
<u-col :span="12" v-for="(item, index) in childData" :key="index">
<u-button
@click="
@click.native="
uni.navigateTo({
url: item.href,
})
"
>
<u-icon size="80" :name="item.iconClass"></u-icon>
<text class="name">
{{
session.lang == 'en'
? index + 1 + ' ' + item.engResourceName
: index + 1 + ' ' + item.resourceName
}}</text
>
<text class="name"> {{ session.lang == 'en' ? index + 1 + ' ' + item.engResourceName : index + 1 + ' ' + item.resourceName }}</text>
</u-button>
</u-col>
<!-- <u-col :span="12">

@ -5,7 +5,7 @@
<view class="name">Hi, {{ session.user.userName }}</view>
<view class="logout" @click="session.logout()">
<u-icon name="info-circle"></u-icon>
<text>{{ $t("message.rawMenu_SignOut") }}</text>
<text>{{ $t('message.rawMenu_SignOut') }}</text>
</view>
</view>
<view class="date">{{ today }}</view>
@ -14,22 +14,14 @@
<u-row :gutter="30">
<u-col :span="12" v-for="(item, index) in model.menuList" :key="index">
<u-button
@click="
@click.native="
uni.navigateTo({
url: `${item.href}?childData=${JSON.stringify(
item.childResource
)}`,
url: `${item.href}?childData=${JSON.stringify(item.childResource)}`,
})
"
>
<u-icon size="80" :name="item.iconClass"></u-icon>
<text class="name">
{{
session.lang == "en"
? index + 1 + " " + item.engResourceName
: index + 1 + " " + item.resourceName
}}</text
>
<text class="name"> {{ session.lang == 'en' ? index + 1 + ' ' + item.engResourceName : index + 1 + ' ' + item.resourceName }}</text>
</u-button>
</u-col>
<!-- <u-col :span="12">
@ -68,15 +60,15 @@
</template>
<script lang="ts">
import { Component } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import dayjs from "dayjs";
import model from "./model";
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import dayjs from 'dayjs';
import model from './model';
@Component
export default class RawHome extends BasePage {
model = model;
today = dayjs().format("YYYY-MM-DD dddd");
today = dayjs().format('YYYY-MM-DD dddd');
onLoad() {
this.model.getMenuList();
}

@ -4,27 +4,21 @@
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t("message.rawMenu_ReceivingGoods") }}</view>
<view class="title">{{ $t('message.rawMenu_ReceivingGoods') }}</view>
<view class="right"></view>
</view>
<view class="container">
<u-row :gutter="30">
<u-col :span="12" v-for="(item, index) in childData" :key="index">
<u-button
@click="
@click.native="
uni.navigateTo({
url: item.href,
})
"
>
<u-icon size="80" :name="item.iconClass"></u-icon>
<text class="name">
{{
session.lang == "en"
? index + 1 + " " + item.engResourceName
: index + 1 + " " + item.resourceName
}}</text
>
<text class="name"> {{ session.lang == 'en' ? index + 1 + ' ' + item.engResourceName : index + 1 + ' ' + item.resourceName }}</text>
</u-button>
</u-col>
@ -46,8 +40,8 @@
</template>
<script lang="ts">
import { Component } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
@Component
export default class RawAppointment extends BasePage {
childData: any;

@ -11,20 +11,14 @@
<u-row :gutter="30">
<u-col :span="12" v-for="(item, index) in childData" :key="index">
<u-button
@click="
@click.native="
uni.navigateTo({
url: item.href,
})
"
>
<u-icon size="80" :name="item.iconClass"></u-icon>
<text class="name">
{{
session.lang == 'en'
? index + 1 + ' ' + item.engResourceName
: index + 1 + ' ' + item.resourceName
}}</text
>
<text class="name"> {{ session.lang == 'en' ? index + 1 + ' ' + item.engResourceName : index + 1 + ' ' + item.resourceName }}</text>
</u-button>
</u-col>
<!-- <u-col :span="12">

Loading…
Cancel
Save