Commit 09fb1e00 by 张立顺

Merge branch 'feature/zls' into 'SAAS+V5.8.5'

feat 标签回显修改

See merge request !975
2 parents 2d8f1744 201d8007
Pipeline #236 for 09fb1e00 failed in 0 seconds
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<BizTypeTag v-if="detail.bizTypeName" <BizTypeTag v-if="detail.bizTypeName"
class="journal-detail__tag" class="journal-detail__tag"
:biz-type="detail.bizType" :biz-type="detail.bizType"
:biz-type-name="detail.bizTypeName" /> :biz-type-name="detail.bizTypeName === '权益' ? '权益延保' : detail.bizTypeName" />
</div> </div>
<div class="journal-detail__body"> <div class="journal-detail__body">
<DynamicFormReadonly :detail="detail" /> <DynamicFormReadonly :detail="detail" />
......
...@@ -7,8 +7,13 @@ const { ...@@ -7,8 +7,13 @@ const {
getDailyReportDetailSelect, getDailyReportDetailSelect,
getDailyReportMerchantBrandIds, getDailyReportMerchantBrandIds,
} = require("@api/journalRecord"); } = require("@api/journalRecord");
const { mount } = require("@vue/test-utils");
const Detail = require("@/views/residentManage/journalRecord/detail.vue").default; const Detail = require("@/views/residentManage/journalRecord/detail.vue").default;
const SlotHost = {
template: "<div><slot /></div>",
};
function createContext(query) { function createContext(query) {
return { return {
$route: { query }, $route: { query },
...@@ -82,4 +87,33 @@ describe("journalDetail access", () => { ...@@ -82,4 +87,33 @@ describe("journalDetail access", () => {
expect(getDailyReportMerchantBrandIds).toHaveBeenCalledWith("1001"); expect(getDailyReportMerchantBrandIds).toHaveBeenCalledWith("1001");
expect(context.detail.brandIds).toEqual([3454]); expect(context.detail.brandIds).toEqual([3454]);
}); });
it("详情页的权益标签应显示为权益延保", () => {
const wrapper = mount({
...Detail,
data() {
return {
pageLoading: false,
detail: {
bizType: 2,
bizTypeName: "权益",
},
journalType: "",
};
},
mounted() {},
}, {
directives: {
loading: {},
},
stubs: {
"d2-container": SlotHost,
"DynamicFormReadonly": true,
"VenusBackButton": true,
},
});
expect(wrapper.find(".biz-type-tag").text()).toBe("权益延保");
wrapper.destroy();
});
}); });
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!