Browse Source

优化样式

master
DX 5 days ago
parent
commit
a02ff4cb24
  1. 8
      components/cs-emty/index.vue
  2. 4
      config.js
  3. 6
      pages/enterprise.vue
  4. 10
      pages/index.vue
  5. 2
      pages/login.vue
  6. 2
      sub/chat/index.vue
  7. 8
      sub/invite/addEnterprise.vue
  8. 271
      sub/task/detail.vue

8
components/cs-emty/index.vue

@ -1,5 +1,5 @@
<template>
<view class="cs-empty" :style="{ marginTop: marginTop + 'rpx' }">
<view class="cs-empty" :style="{ marginTop: marginTop + 'rpx', height }">
<image
class="empty-image"
src="/static/images/emty.png"
@ -23,6 +23,10 @@ export default {
marginTop: {
type: Number,
default: 0
},
height: {
type: String,
default: '856rpx'
}
}
}
@ -35,7 +39,7 @@ export default {
align-items: center;
justify-content: center;
background-color: #fff;
height: 856rpx;
border-radius: 24rpx;
gap: 24rpx;
.empty-image {

4
config.js

@ -2,8 +2,8 @@
module.exports = {
// baseUrl: 'http://188.188.5.188:48080',
// baseUrl: 'https://www.jzce.com',
baseUrl: 'https://yxsthj.cn',
// baseUrl: 'http://188.188.3.232:48080',
// baseUrl: 'https://yxsthj.cn',
baseUrl: 'http://188.188.3.232:48080',
// baseUrl: 'http://localhost:48080',
baseApi: '/admin-api',
// 应用信息

6
pages/enterprise.vue

@ -70,7 +70,9 @@
:src="enterprise.files[0].url"
shape="square"
size="64"
v-if="enterprise.files.length > 0"
></u-avatar>
<view v-else style="min-width: 128rpx;height:128rpx; border-radius:8rpx; background-color: #f9f9f9"></view>
<view class="wd-flex wd-flex-col">
<text
class="wd-font-800 wd-text-15"
@ -120,7 +122,7 @@
待审核
</view>
</view>
<cs-emty v-if="list.length == 0"></cs-emty>
<cs-emty marginTop="24" v-if="list.length == 0"></cs-emty>
<u-loadmore
:status="load"
marginTop="12"
@ -272,7 +274,7 @@ export default {
this.queryEnterprise()
},
handleSearch(e) {
if (e.detail && e.detail.length > 1) {
if (e.detail && e.detail.length > 0) {
this.queryParams.pageNo = 1 //
this.queryParams.enterprisesName = e.detail //
this.queryEnterprise()

10
pages/index.vue

@ -6,7 +6,7 @@
<van-dropdown-item
:value="queryParams.region"
:options="dropOption.area"
title="按乡镇"
title="按区域"
@change="
v => {
querySelect(v, 'region')
@ -34,6 +34,9 @@
:refresher-triggered="refresherTriggered"
@refresherpulling="refresherpulling"
>
<view class="box row-1">
<view
class="wd-flex"
@ -80,7 +83,12 @@
<view style="color: #4b5675">企业数量</view>
</view>
</view>
<cs-emty marginTop="0"
v-if="detail.enterpriseCount == 0"
height="288rpx"
></cs-emty>
<qiun-data-charts
v-if="detail.enterpriseCount > 0"
type="ring"
:opts="opts"
:chartData="chartData"

2
pages/login.vue

@ -115,7 +115,7 @@ export default {
}
uni.switchTab({
url: '/pages/owner'
url: '/pages/index'
})
}
}

2
sub/chat/index.vue

@ -1,5 +1,5 @@
<template>
<web-view src="https://yxsthj.cn/chat/313cf9e35628923a"></web-view>
<web-view src="https://mb.yxsthj.cn/chat/313cf9e35628923a"></web-view>
<!-- <web-view src="https://chat.deepseek.com/"></web-view> -->
</template>

8
sub/invite/addEnterprise.vue

@ -499,6 +499,7 @@ export default {
}
})
const load = this.$util.loading('上传中...')
if (this.form.id) {
updateEnterprise(data).then(res => {
load.close()
@ -552,6 +553,13 @@ export default {
})
return false
}
if (this.form.photo.length == 0) {
uni.showToast({
icon: 'none',
title: '请上传企业照片'
})
return false
}
return true
},
/**

271
sub/task/detail.vue

@ -1,11 +1,8 @@
<template>
<cs-page>
<view
class="detail-container"
:style="{
<view class="detail-container" :style="{
paddingBottom: isSelect.length > 0 ? '140rpx' : '40rpx'
}"
>
}">
<view class="box detail">
<text class="wd-font-800 wd-text-16" style="color: #071437">
{{ detail.title }}
@ -19,24 +16,14 @@
$dict.echoDicValue(dictMap.task_priority, detail.priority)
}}
</view>
<view
v-for="(tag, index) in detail.tagList"
:key="index"
class="tag"
>
<view v-for="(tag, index) in detail.tagList" :key="index" class="tag">
{{ tag }}
</view>
</view>
<view
class="wd-flex wd-text-13"
style="justify-content: space-between"
>
<view class="wd-flex wd-text-13" style="justify-content: space-between">
<view class="wd-flex" style="align-items: center; gap: 8rpx">
<u-icon name="calendar" color="#17C653" size="16" />
<text
class="wd-text-13"
style="font-weight: bold; margin-right: 8rpx"
>
<text class="wd-text-13" style="font-weight: bold; margin-right: 8rpx">
{{
`${$util.formatDate(
detail.startDate,
@ -47,54 +34,40 @@
</view>
</view>
<cs-text-more :value="detail.description" />
<view class="file-list" v-if="files && files.length > 0">
<view class="file" v-for="(file, index) in files" :key="index" @click="openFile(file)"
style="cursor: pointer; width: 48%;">
<u-icon name="attach" color="#17C653" size="16" />
<text class="name" style="var(--LightMode-Grey-Grey-900, #071437);">{{ file.name }}</text>
</view>
</view>
<view class="audit">
<cs-dict-tag
:dict="dictMap.task_state"
:value="detail.status"
></cs-dict-tag>
<cs-dict-tag :dict="dictMap.task_state" :value="detail.status"></cs-dict-tag>
</view>
</view>
<u-sticky>
<view
:class="[
<view :class="[
'options-container',
OptionsOffset.isTop ? 'isTop' : ''
]"
ref="optionRef"
id="options"
>
]" ref="optionRef" id="options">
<van-dropdown-menu active-color="#17C653" style="flex: 1">
<van-dropdown-item
v-if="showItem(['director'])"
:value="queryParams.departmentId"
:options="dropOption.dept"
@change="
<van-dropdown-item v-if="showItem(['director'])" :value="queryParams.departmentId"
:options="dropOption.dept" @change="
v => {
querySelect(v, 'departmentId')
}
"
/>
<van-dropdown-item
v-if="showItem(['queue', 'director'])"
:value="queryParams.userId"
use-before-toggle
@before-toggle="getUserOption"
:options="userList"
@change="
" />
<van-dropdown-item v-if="showItem(['queue', 'director'])" :value="queryParams.userId" use-before-toggle
@before-toggle="getUserOption" :options="userList" @change="
v => {
querySelect(v, 'userId')
}
"
/>
<van-dropdown-item
:value="queryParams.Inspections_status"
:options="dropOption.status"
@change="
" />
<van-dropdown-item :value="queryParams.Inspections_status" :options="dropOption.status" @change="
v => {
querySelect(v, 'inspectionsStatus')
}
"
/>
" />
</van-dropdown-menu>
<view style="flex: 0 0 120rpx">
<text style="color: #17c653">{{ list.length }}</text>
@ -102,20 +75,11 @@
</view>
</view>
</u-sticky>
<view
class="record"
v-for="record in list"
:key="record.id"
@tap="goRecord(record)"
>
<view
:class="{
<view class="record" v-for="record in list" :key="record.id" @tap="goRecord(record)">
<view :class="{
select: true,
isSelect: isSelect.includes(record.id)
}"
@tap.native.stop="select(record.id)"
v-if="['3', null].includes(record.inspectionStatus)"
>
}" @tap.native.stop="select(record.id)" v-if="['3', null].includes(record.inspectionStatus)">
<u-icon name="checkbox-mark" size="16" color="#fff"></u-icon>
</view>
<view class="disable" v-else></view>
@ -123,8 +87,7 @@
<view class="name">
{{ record.enterpriseName }}
</view>
<view
style="
<view style="
font-size: 26rpx;
padding-right: 3rem;
margin-bottom: 4rpx;
@ -132,44 +95,26 @@
text-overflow: ellipsis;
width: 528rpx;
overflow: hidden;
"
>
">
{{ record.enterpriseAddress }}
</view>
<view class="tagList" style="margin-top: 16rpx">
<view
v-for="(item, index) in record.tagList"
:key="index"
class="tag"
>
<view v-for="(item, index) in record.tagList" :key="index" class="tag">
{{ item }}
</view>
</view>
</view>
<view class="audit" v-show="record.inspectionStatus">
<cs-dict-tag
:dict="dictMap.Inspections_status"
:value="record.inspectionStatus"
></cs-dict-tag>
<cs-dict-tag :dict="dictMap.Inspections_status" :value="record.inspectionStatus"></cs-dict-tag>
</view>
</view>
<u-loadmore
:status="load"
marginTop="12"
marginBottom="12"
v-if="load != 'nomore'"
/>
<u-loadmore :status="load" marginTop="12" marginBottom="12" v-if="load != 'nomore'" />
<view class="btn-box" v-if="isSelect.length > 0">
<view class="confirm-btn" @tap="replay">
已选择({{ isSelect.length }})
</view>
</view>
<u-modal
:show="model.show"
closeOnClickOverlay
@close="closeModel"
borderRadius="32rpx"
>
<u-modal :show="model.show" closeOnClickOverlay @close="closeModel" borderRadius="32rpx">
<view class="wd-flex wd-flex-col" style="gap: 20px">
<view class="header">
<view class="row-1">
@ -180,31 +125,17 @@
<view class="row-2">每次只能选择一人</view>
</view>
<view class="staff-list">
<view
class="staff"
v-for="staff in model.list"
:key="staff.userId"
:style="{
<view class="staff" v-for="staff in model.list" :key="staff.userId" :style="{
'--select-color':
model.isSelect == staff.userId ? '#17c653' : '#f1f1f4'
}"
@click="selectUser(staff.userId)"
>
<u-avatar
size="40"
shape="circle"
:src="staff.avatar"
></u-avatar>
}" @click="selectUser(staff.userId)">
<u-avatar size="40" shape="circle" :src="staff.avatar"></u-avatar>
<view class="info">
<view class="name">{{ staff.realName }}</view>
<view class="dept">{{ staff.roleName[0] }}</view>
</view>
<view class="isSelect">
<u-icon
name="checkbox-mark"
size="16px"
color="#fff"
></u-icon>
<u-icon name="checkbox-mark" size="16px" color="#fff"></u-icon>
</view>
</view>
</view>
@ -220,10 +151,19 @@
</template>
<script>
import { getDeptTree, getDictBatchByType } from '@/api/system/dict.js'
import { TaskApi } from '@/api/task/index.js'
import { InspectionsApi } from '@/api/inspections/index.js'
import { getUserList } from '@/api/system/user.js'
import {
getDeptTree,
getDictBatchByType
} from '@/api/system/dict.js'
import {
TaskApi
} from '@/api/task/index.js'
import {
InspectionsApi
} from '@/api/inspections/index.js'
import {
getUserList
} from '@/api/system/user.js'
export default {
data() {
return {
@ -232,6 +172,8 @@ export default {
id: '',
description: ''
},
//
files: [],
list: [],
//
isShowAllText: false,
@ -257,12 +199,10 @@ export default {
list: [],
isSelect: ''
},
userList: [
{
userList: [{
value: '',
text: '按人员'
}
],
}],
//
dropOption: {
dept: [],
@ -292,6 +232,23 @@ export default {
this.reset()
},
methods: {
openFile(file) {
uni.downloadFile({
url: file.url,
success: function (res) {
var filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function (res) {
console.log('打开文档成功');
}
});
}
});
},
getOptionOffset() {
const query = uni.createSelectorQuery().in(this)
query
@ -319,8 +276,7 @@ export default {
dept: dept.data
}
this.dropOption = {
dept: [
{
dept: [{
value: '',
text: '按部门'
},
@ -331,8 +287,7 @@ export default {
}
})
],
status: [
{
status: [{
value: '',
text: '按状态'
},
@ -377,7 +332,10 @@ export default {
text: d.label
}
}),
{ value: '', text: keyMap[key] }
{
value: '',
text: keyMap[key]
}
]
},
querySelect(v, key) {
@ -390,6 +348,7 @@ export default {
async init() {
const res = await TaskApi.getDetail(this.detail.id)
this.detail = res.data
this.files = res.data.fileList
},
async getUser() {
const res = await getUserList(this.queryParams.departmentId)
@ -405,7 +364,9 @@ export default {
icon: 'loading'
})
this.load = 'loading'
const { data } = await InspectionsApi.getList({
const {
data
} = await InspectionsApi.getList({
...this.queryParams,
taskId: this.detail.id
})
@ -414,13 +375,15 @@ export default {
if (this.list.length == data.total) {
this.load = 'nomore'
}
uni.stopPullDownRefresh()
uni.hideToast()
},
getUserOption({ detail }) {
getUserOption({
detail
}) {
this.getUser().then(res => {
this.userList = [
{
this.userList = [{
value: '',
text: '按人员'
},
@ -520,18 +483,21 @@ export default {
.detail-container {
position: relative;
color: $cs-color-grey;
.box {
margin: 12px;
background-color: #fff;
border-radius: $cs-border-radius;
padding: 16px;
}
.detail {
display: flex;
flex-flow: column nowrap;
gap: 12px;
position: relative;
overflow: hidden;
.audit {
position: absolute;
right: 0;
@ -539,7 +505,38 @@ export default {
transform: translateX(58rpx) translateY(24rpx) rotateZ(45deg);
transform-origin: 50% 50%;
}
.file-list {
border-radius: 4px;
background: var(--LightMode-Grey-Grey-100, #F9F9F9);
padding: 8rpx 16rpx;
display: flex;
flex-wrap: wrap;
gap: 24rpx;
width: 100%;
.file {
display: flex;
flex-flow:row nowarp;
gap:8rpx;
.name {
color: var(--LightMode-Grey-Grey-900, #071437);
font-family: "PingFang SC";
font-size: 24rpx;
font-style: normal;
font-weight: 400;
line-height: normal;
text-decoration-line: underline;
text-decoration-style: solid;
text-decoration-skip-ink: auto;
text-decoration-thickness: auto;
text-underline-offset: auto;
text-underline-position: from-font;
}
}
}
}
.record {
background-color: #fff;
display: flex;
@ -551,6 +548,7 @@ export default {
margin-top: 0;
position: relative;
overflow: hidden;
.audit {
position: absolute;
right: 0;
@ -558,6 +556,7 @@ export default {
transform-origin: 50% 50%;
transform: translateX(64rpx) translateY(18rpx) rotateZ(45deg);
}
.select {
width: 44rpx;
height: 44rpx;
@ -569,6 +568,7 @@ export default {
transition: 0.2s all;
margin-right: 32rpx;
}
.disable {
width: 44rpx;
height: 44rpx;
@ -576,6 +576,7 @@ export default {
margin-right: 32rpx;
border-radius: 100%;
position: relative;
&::after {
content: '';
position: absolute;
@ -585,11 +586,14 @@ export default {
transform: translateX(calc(50% - 2rpx)) rotateZ(45deg);
}
}
.isSelect {
background-color: $cs-color-main;
}
.info {
font-size: 26rpx;
.name {
font-size: 32rpx;
font-weight: 600;
@ -601,6 +605,7 @@ export default {
overflow: hidden;
}
}
&:active {
background-color: $cs-color-touch;
}
@ -616,6 +621,7 @@ export default {
bottom: 0;
left: 0;
}
.confirm-btn {
background-color: $cs-color-main;
padding: 12px 40px;
@ -624,25 +630,30 @@ export default {
font-weight: 600;
border-radius: 120px;
}
.header {
display: flex;
flex-flow: column nowrap;
justify-content: center;
align-items: center;
gap: 4px;
.row-1 {
font-size: 16px;
font-weight: 600;
color: #071437;
.num {
color: $cs-color-main;
padding: 0 4px;
}
}
.row-2 {
color: $cs-color-grey;
}
}
.staff-list {
width: 70vw;
display: flex;
@ -650,6 +661,7 @@ export default {
gap: 12px;
max-height: 30vh;
overflow-y: scroll;
.staff {
width: calc(50% - 6px);
padding: 12px;
@ -658,26 +670,27 @@ export default {
position: relative;
gap: 8px;
display: flex;
.info {
.name {
font-size: 30rpx;
font-weight: bold;
}
.dept {
color: $cs-color-grey;
}
}
.isSelect {
position: absolute;
right: 0;
top: 0;
width: 30px;
height: 30px;
background-image: linear-gradient(
45deg,
background-image: linear-gradient(45deg,
rgba(255, 255, 255, 0) 50%,
var(--select-color, #f1f1f4) 50%
);
var(--select-color, #f1f1f4) 50%);
display: flex;
justify-content: flex-end;
align-items: flex-start;
@ -685,6 +698,7 @@ export default {
}
}
}
.options-container {
overflow: hidden;
margin: 12px;
@ -698,23 +712,28 @@ export default {
background-color: #fff;
border-bottom: 1px solid #f1f1f4;
color: #071437;
::v-deep .van-dropdown-menu {
background-color: transparent;
box-shadow: none;
--dropdown-menu-title-font-size: 13px;
--dropdown-menu-title-text-color: #071437;
.van-dropdown-menu__item {
flex: 0;
.van-dropdown-menu__title {
width: 80px;
}
}
}
}
.isTop {
margin: 12px 0;
border-radius: 0px;
}
::v-deep .u-popup__content {
border-radius: 32rpx;
}

Loading…
Cancel
Save