| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358 |
- <template>
- <view class="ms-detail">
- <nav-bar title="编辑公司信息"></nav-bar>
- <view class="ms-content">
- <view class="ms-title">编辑公司及品牌信息</view>
- <view class="ms-item">
- <view class="ms-item-title" @click="checkBaseMsg">
- <view class="ms-title-txt">基本信息{{ filledInCount[0] }}/5</view>
- <view class="ms-title-icon">
- <image src="@/static/images/my/my/top-up.svg" mode="scaleToFill" class="top" v-if="baseMsg" />
- <image src="@/static/images/my/my/right.svg" mode="scaleToFill" class="right" v-else />
- </view>
- </view>
- <view class="ms-item-content" v-if="baseMsg" @click="goCompanyMsg(1)">
- <view class="name-content-item">
- <view class="name-item">品牌logo</view>
- <view class="value-item">
- <text v-if="!companyinfo.companyLogo">未添加</text>
- <image :src="companyinfo.companyLogo" mode="aspectFill" v-else />
- <u-icon name="arrow-right" color="#999" size="20"></u-icon>
- </view>
- </view>
- <view class="name-content-item">
- <view class="name-item">公司名称</view>
- <view class="value-item">
- <text v-if="!companyinfo.companyName">未添加</text>
- <text v-else>{{ companyinfo.companyName }}</text>
- <u-icon name="arrow-right" color="#999" size="20"></u-icon>
- </view>
- </view>
- <view class="name-content-item">
- <view class="name-item">公司全称</view>
- <view class="value-item">
- <text v-if="!companyinfo.companyAllName">未添加</text>
- <text v-else>{{ companyinfo.companyAllName }}</text>
- <u-icon name="arrow-right" color="#999" size="20"></u-icon>
- </view>
- </view>
- <view class="name-content-item">
- <view class="name-item">融资阶段</view>
- <view class="value-item">
- <text v-if="!companyinfo.companyDevelop">未添加</text>
- <text v-else>{{ companyinfo.companyDevelop }}</text>
- <u-icon name="arrow-right" color="#999" size="20"></u-icon>
- </view>
- </view>
- <view class="name-content-item">
- <view class="name-item">人员规模</view>
- <view class="value-item">
- <text v-if="!companyinfo.companyPeople || companyinfo.companyPeople === '0'">未添加</text>
- <text v-else>{{ companyinfo.companyPeople }}</text>
- <u-icon name="arrow-right" color="#999" size="20"></u-icon>
- </view>
- </view>
- </view>
- </view>
- <view class="ms-item">
- <view class="ms-item-title" @click="checkCompanyFund">
- <view class="ms-title-txt">公司福利 {{ filledInCount[1] }}/2</view>
- <view class="ms-title-icon">
- <image src="@/static/images/my/my/top-up.svg" mode="scaleToFill" class="top" v-if="companyFund" />
- <image src="@/static/images/my/my/right.svg" mode="scaleToFill" class="right" v-else />
- </view>
- </view>
- <view class="ms-item-content" v-if="companyFund" @click="goCompanyMsg(2)">
- <view class="name-content-item">
- <view class="name-item">标准工作时间</view>
- <view class="value-item">
- <text v-if="!companyinfo.workTime">未添加</text>
- <text v-else>{{ companyinfo.workTime }}</text>
- <u-icon name="arrow-right" color="#999" size="20"></u-icon>
- </view>
- </view>
- <view class="name-content-item">
- <view class="name-item">福利待遇</view>
- <view class="value-item">
- <text v-if="!companyinfo.welfare">未添加</text>
- <text v-else>已添加{{ companyinfo.welfare.split(',').length }}项</text>
- <u-icon name="arrow-right" color="#999" size="20"></u-icon>
- </view>
- </view>
- </view>
- </view>
- <view class="ms-item" @click="goCompanyMsg(3)">
- <view class="ms-item-title">
- <view class="ms-title-txt">公司介绍</view>
- <view class="ms-title-icon">
- <text v-if="!companyinfo.companyContent">未添加</text>
- <text v-else>已添加</text>
- </view>
- </view>
- </view>
- <view class="ms-item">
- <view class="ms-item-title" @click="goCompanyMsg(4)">
- <view class="ms-title-txt">主营业务</view>
- <view class="ms-title-icon">
- <text v-if="!companyinfo.companyScope">未添加</text>
- <text v-else>已添加{{ companyinfo.companyScope.split(',').length }}项</text>
- </view>
- </view>
- </view>
- <view class="ms-item">
- <view class="ms-item-title" @click="goCompanyMsg(5)">
- <view class="ms-title-txt">公司相册</view>
- <view class="ms-title-icon">
- <text v-if="!companyinfo.photos">未添加</text>
- <text v-else>已添加{{ companyinfo.photos.split(',').length }}张</text>
- </view>
- </view>
- </view>
- <view class="ms-item">
- <view class="ms-item-title" @click="goCompanyMsg(6)">
- <view class="ms-title-txt">人才发展</view>
- <view class="ms-title-icon">
- <text v-if="!companyinfo.companyPeopleDevelop">未添加</text>
- <text v-else>已添加{{ companyinfo.companyPeopleDevelop.split(',').length }}项</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import navBar from "@/components/nav-bar/index.vue";
- export default {
- data() {
- return {
- baseMsg: false,
- companyFund: false,
- companyDetail: false,
- mainWork: false,
- companyImg: false,
- peopleDev: false,
- companyinfo: {},
- isNo: false,//没进入公司,不允许修改公司信息
- };
- },
- components: {
- navBar,
- },
- onLoad() {
- this.getcompanystatus()
-
- uni.$on('updateCompanyInfo', this.getcompanystatus)
- },
- onUnload() {
- uni.$off('updateCompanyInfo', this.getcompanystatus)
- },
- computed: {
- filledInCount() {
- let arr = [0, 0]
- if (this.companyinfo.companyLogo) arr[0] += 1
- if (this.companyinfo.companyName) arr[0] += 1
- if (this.companyinfo.companyAllName) arr[0] += 1
- if (this.companyinfo.companyDevelop) arr[0] += 1
- if (this.companyinfo.companyPeople && this.companyinfo.companyPeople !== '0') arr[0] += 1
- if (this.companyinfo.workTime) arr[1] += 1
- if (this.companyinfo.welfare) arr[1] += 1
- return arr
- }
- },
- methods: {
- checkBaseMsg() {
- this.baseMsg = !this.baseMsg;
- },
- checkCompanyFund() {
- this.companyFund = !this.companyFund;
- },
- checkCompanyDetail() {
- this.companyDetail = !this.companyDetail;
- },
- checkMainWork() {
- this.mainWork = !this.mainWork;
- },
- checkCompanyImg() {
- this.companyImg = !this.companyImg;
- },
- checkPeopleDev() {
- this.peopleDev = !this.peopleDev;
- },
- goCompanyMsg(type) {
- uni.setStorageSync('companyInfo', this.companyinfo);
- if (this.isNo) {
- uni.showToast({title:'暂无公司信息!',icon:'none'})
- return;
- }
-
- const pageMap = {
- // 1: '/my/renzheng/companyLogo', // 品牌logo
- // 2: '/my/renzheng/companyDev', // 融资阶段
- // 3: '/my/renzheng/companyMsg', // 标准工作时间
- // 4: '/my/renzheng/companyFund', // 福利待遇
- // 5: '/my/renzheng/editCompanyDesc', // 公司介绍
- // 6: '/my/renzheng/mainWorkIntro', // 主营业务
- // 7: '/my/renzheng/companyImg', // 公司相册
- // 8: '/my/renzheng/peopleDev' // 人才发展
- 1: '/my/renzheng/companyBaseInfo', // 公司基本信息
- 2: '/my/renzheng/companyWelfare', // 公司福利
- 3: '/my/renzheng/editCompanyDesc', // 公司介绍
- 4: '/my/renzheng/mainWorkIntro', // 公司业务
- 5: '/my/renzheng/companyImg', // 公司照片
- 6: '/my/renzheng/peopleDev', // 人才发展
- }
- const url = pageMap[type]
- uni.navigateTo({ url })
- },
- // 查询用户企业状态
- getcompanystatus() {
- this.$Request.get("/app/company/selectCompanyByUserId", "")
- .then((res) => {
- if (res.code != 0) {
- this.isNo = true;
- uni.showToast({
- title: res.msg || "查询状态失败",
- icon: "none"
- });
- return;
- }
- this.companyinfo = res.data || {};
- this.$queue.setData('companyId', res.data.companyId);
- console.log("查询用户企业状态", this.companyinfo)
- })
- .catch((err) => {
- console.error("查询失败:", err);
- uni.showToast({
- title: "网络异常",
- icon: "none"
- });
- });
- },
- },
- };
- </script>
- <style scoped lang="scss">
- .ms-detail {
- position: absolute;
- left: 0;
- right: 0;
- bottom: 0;
- top: 0;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- .ms-content {
- flex: 1;
- width: 100%;
- padding: 36rpx 40rpx;
- box-sizing: border-box;
- overflow: hidden;
- overflow-y: auto;
- .ms-title {
- color: rgba(51, 51, 51, 1);
- font-family: DM Sans;
- font-size: 36rpx;
- font-weight: 700;
- line-height: 60rpx;
- margin-bottom: 20rpx;
- }
- .ms-item {
- margin-bottom: 20rpx;
- .ms-item-title {
- color: rgba(31, 44, 55, 1);
- font-family: DM Sans;
- font-size: 28rpx;
- font-weight: 500;
- line-height: 44rpx;
- text-align: left;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .ms-title-icon {
- color: rgba(153, 153, 153, 1);
- font-family: DM Sans;
- font-size: 24rpx;
- font-weight: 400;
- line-height: 32rpx;
- margin-right: 36rpx;
- .top {
- width: 28rpx;
- height: 18rpx;
- margin-left: 8rpx;
- }
- .right {
- width: 18rpx;
- height: 28rpx;
- margin-left: 8rpx;
- }
- }
- }
- .ms-item-content {
- box-sizing: border-box;
- border: 1rpx solid rgba(227, 231, 236, 1);
- border-radius: 12rpx;
- background: rgba(255, 255, 255, 1);
- padding: 36rpx;
- margin-top: 16rpx;
- .name-content-item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- box-sizing: border-box;
- margin-bottom: 12rpx;
- padding: 9rpx 0;
-
- &:last-child {
- margin-bottom: 0;
- }
- .name-item {
- color: rgba(153, 153, 153, 1);
- font-family: DM Sans;
- font-size: 24rpx;
- font-weight: 400;
- line-height: 32rpx;
- }
- .value-item {
- display: flex;
- justify-content: center;
- align-items: center;
- color: rgba(153, 153, 153, 1);
- font-family: DM Sans;
- font-size: 24rpx;
- font-weight: 400;
- line-height: 32rpx;
- letter-spacing: 0%;
- text {
- margin-right: 8rpx;
- }
- image {
- width: 50rpx;
- height: 50rpx;
- border-radius: 50%;
- margin-right: 8rpx;
- background: linear-gradient(90deg,
- rgba(13, 39, 247, 1),
- rgba(19, 193, 234, 1) 100%);
- }
- }
- }
- }
- }
- }
- }
- </style>
|