baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)

This commit is contained in:
Gaussian committed 2026-11-06 18:38:38 +08:00
commit c2b0e7be0d
6522 files changed
+3530643

No files matched your search

+181
View File
@@ -0,0 +1,181 @@
<template>
<div>
<div class="list-cell" @click="bindClick">
<div class="media-list" v-if="data.title">
<div :class="[isImgRight?'media-image-right':'',isImgLeft?'media-image-left':'']">
<text :class="['media-title',isImgRight||isImgLeft?'media-title2':'']">{{data.title}}</text>
<div v-if="showImg" :class="['image-section',isImgRight?'image-section-right':'',isImgLeft?'image-section-left':'']">
<image :class="['image-list1',isImgRight||isImgLeft?'image-list2':'']" v-if="data.image_url"
:src="data.image_url"></image>
<image class="image-list3" v-if="data.image_list" :src="source.url" v-for="(source, i) in data.image_list"
:key="i" />
</div>
</div>
<div class="media-foot">
<div class="media-info">
<text class="info-text">{{data.source}}</text>
<text class="info-text">{{data.comment_count}}条评论</text>
<text class="info-text">{{data.datetime}}</text>
</div>
<div class="max-close-view" @click="close">
<div class="close-view"><text class="close">×</text></div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
data: {
type: Object,
default: function(e) {
return {}
}
}
},
computed: {
isImgRight() {
return this.data.article_type === 2
},
isImgLeft() {
return this.data.article_type === 1
},
showImg() {
return this.data.image_list || this.data.image_url
}
},
methods: {
close(e) {
this.$emit('close');
e.stopPropagation();
},
bindClick() {
this.$emit('click');
}
}
}
</script>
<style>
.list-cell {
width: 750px;
padding: 0 30px;
}
.list-cell:active {
background-color: #eeeeee;
}
.media-list {
flex: 1;
flex-direction: column;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #c8c7cc;
padding: 20px 0;
}
.media-image-right {
flex-direction: row;
}
.media-image-left {
flex-direction: row-reverse;
}
.media-title {
flex: 1;
}
.media-title {
lines: 3;
text-overflow: ellipsis;
font-size: 32px;
color: #555555;
}
.media-title2 {
flex: 1;
margin-top: 6px;
line-height: 40px;
}
.image-section {
margin-top: 20px;
flex-direction: row;
justify-content: space-between;
}
.image-section-right {
margin-top: 0px;
margin-left: 10px;
width: 225px;
height: 146px;
}
.image-section-left {
margin-top: 0px;
margin-right: 10px;
width: 225px;
height: 146px;
}
.image-list1 {
width: 690px;
height: 481px;
}
.image-list2 {
width: 225px;
height: 146px;
}
.image-list3 {
width: 225px;
height: 146px;
}
.media-info {
flex-direction: row;
}
.info-text {
margin-right: 20px;
color: #999999;
font-size: 24px;
}
.media-foot {
margin-top: 20px;
flex-direction: row;
justify-content: space-between;
}
.max-close-view {
align-items: center;
justify-content: flex-end;
flex-direction: row;
height: 40px;
width: 80px;
}
.close-view {
border-style: solid;
border-width: 1px;
border-color: #999999;
border-radius: 10px;
justify-content: center;
height: 30px;
width: 40px;
line-height: 30px;
}
.close {
text-align: center;
color: #999999;
font-size: 28px;
}
</style>
+175
View File
@@ -0,0 +1,175 @@
<template>
<view class="view">
<view class="list-cell view" hover-class="uni-list-cell-hover" @click="bindClick">
<view class="media-list view" v-if="options.title">
<view class="view" :class="{'media-image-right': options.article_type === 2, 'media-image-left': options.article_type === 1}">
<text class="media-title" :class="{'media-title2': options.article_type === 1 || options.article_type === 2}">{{options.title}}</text>
<view v-if="options.image_list || options.image_url" class="image-section view" :class="{'image-section-right': options.article_type === 2, 'image-section-left': options.article_type === 1}">
<image class="image-list1" :class="{'image-list2': options.article_type === 1 || options.article_type === 2}"
v-if="options.image_url" :src="options.image_url"></image>
<image class="image-list3" v-if="options.image_list" :src="source.url" v-for="(source, i) in options.image_list"
:key="i" />
</view>
</view>
<view class="media-foot view">
<view class="media-info view">
<text class="info-text">{{options.source}}</text>
<text class="info-text">{{options.comment_count}}条评论</text>
<text class="info-text">{{options.datetime}}</text>
</view>
<view class="max-close-view view" @click.stop="close">
<view class="close-view view"><text class="close">×</text></view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
options: {
type: Object,
default: function(e) {
return {}
}
}
},
methods: {
close(e) {
this.$emit('close');
},
bindClick() {
this.$emit('click');
}
}
}
</script>
<style>
.view {
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.list-cell {
width: 750upx;
padding: 0 30upx;
}
.uni-list-cell-hover {
background-color: #eeeeee;
}
.media-list {
flex: 1;
flex-direction: column;
border-bottom-width: 1upx;
border-bottom-style: solid;
border-bottom-color: #c8c7cc;
padding: 20upx 0;
}
.media-image-right {
flex-direction: row;
}
.media-image-left {
flex-direction: row-reverse;
}
.media-title {
flex: 1;
}
.media-title {
lines: 3;
text-overflow: ellipsis;
font-size: 32upx;
color: #555555;
}
.media-title2 {
flex: 1;
margin-top: 6upx;
line-height: 40upx;
}
.image-section {
margin-top: 20upx;
flex-direction: row;
justify-content: space-between;
}
.image-section-right {
margin-top: 0upx;
margin-left: 10upx;
width: 225upx;
height: 146upx;
}
.image-section-left {
margin-top: 0upx;
margin-right: 10upx;
width: 225upx;
height: 146upx;
}
.image-list1 {
width: 690upx;
height: 481upx;
}
.image-list2 {
width: 225upx;
height: 146upx;
}
.image-list3 {
width: 225upx;
height: 146upx;
}
.media-info {
flex-direction: row;
}
.info-text {
margin-right: 20upx;
color: #999999;
font-size: 24upx;
}
.media-foot {
margin-top: 20upx;
flex-direction: row;
justify-content: space-between;
}
.max-close-view {
align-items: center;
justify-content: flex-end;
flex-direction: row;
height: 40upx;
width: 80upx;
}
.close-view {
border-style: solid;
border-width: 1px;
border-color: #999999;
border-radius: 10upx;
justify-content: center;
height: 30upx;
width: 40upx;
line-height: 30upx;
}
.close {
text-align: center;
color: #999999;
font-size: 28upx;
}
</style>
+130
View File
@@ -0,0 +1,130 @@
<template>
<div>
<div v-if="drag" class="wrap tab-bar-scroll">
<scroller class="scroll" scrollDirection="horizontal" showScrollbar="false">
<div
class="tab-bar-item tab-bar-scroll-width"
v-for="(tabBar, t) in tabBars"
:key="t"
:ref="tabBar.id + t"
@click="change(t)"
>
<text class="tab-bar-title" :class="[tabIndex === t ? 'active' : '']">{{
tabBar.name
}}</text>
</div>
</scroller>
</div>
<div v-else class="wrap tab-bar">
<div
class="tab-bar-item"
v-for="(tabBar, t) in tabBars"
:key="t"
:ref="tabBar.id + t"
@click="change(t)"
>
<text class="tab-bar-title" :class="[tabIndex === t ? 'active' : '']">{{
tabBar.name
}}</text>
</div>
</div>
</div>
</template>
<script>
const dom = weex.requireModule('dom');
export default {
props: {
drag: {
type: Boolean,
default: true
},
tabBars: {
type: Array,
default: function(e) {
return [];
}
},
tabIndex: {
type: Number,
default: 0
}
},
watch:{
tabIndex(newVal){
this.change(newVal)
}
},
methods: {
async change(index, e) {
let ret = {
index: index
};
// if (e.type === 'click') {
// let target = e.target;
// ret.index = target.parentNode.children.findIndex(node => node === target);
// }
this.$emit('_tabBarClick', ret);
const el = this.$refs[this.tabBars[index].id + index][0]
let elSize = await this.getElSize(el);
if (elSize.left + elSize.width > 750) {
let idx = index - 4;
let newEl = this.$refs[this.tabBars[idx].id + idx][0]
dom.scrollToElement(newEl, {});
return;
}
if (elSize.left < 0) {
dom.scrollToElement(el, {});
}
},
getElSize(el) { //得到元素的size
return new Promise((res, rej) => {
const result = dom.getComponentRect(el, option => {
res(option.size);
})
})
}
}
};
</script>
<style>
.wrap {
height: 100px;
width: 750px;
flex-direction: row;
border-width: 1px;
border-color: #c8c7cc;
border-style: solid;
font-size: 28px;
}
.tab-bar {
justify-content: space-between;
padding-left: 30px;
padding-right: 30px;
}
.scroll {
height: 100px;
width: 750px;
flex-direction: row;
}
.tab-bar-item {
height: 100px;
flex-direction: column;
align-items: center;
justify-content: center;
}
.tab-bar-scroll-width {
width: 150px;
}
.tab-bar-title {
height: 100px;
line-height: 100px;
font-size: 30px;
color: #555;
}
.active {
color: #007aff;
}
</style>
+15
View File
@@ -0,0 +1,15 @@
<script>
export default {
render(createElement) {
return createElement('slider', {
style: {
flex: 1
},
attrs: {
index:0,
infinite: false
}
}, this.$slots.default)
}
}
</script>
+87
View File
@@ -0,0 +1,87 @@
<script>
import uniTabContent from './tabContent.nvue'
export default {
props: {
index: {
type: Number,
default: 0
}
},
data() {
return {
tabIndex: this.index
}
},
components: {
uniTabContent,
},
render(createElement) {
const vnodes = this.$slots.default;
const newVNodes = []
if (vnodes && vnodes.length) {
for (let i = 0; i < vnodes.length; i++) {
let vnode = vnodes[i]
if (!vnode || !vnode.componentOptions) {
continue
}
if (vnode.componentOptions.tag === 'uni-tab-content') {
const newVNode = createElement('uni-tab-content', {
staticClass: vnode.data.staticClass,
'class': vnode.data['class'],
style: vnode.data.style
}, vnode.componentOptions.children)
if (!newVNode.data) {
newVNode.data = Object.create(null)
}
if (!newVNode.data.attrs) {
newVNode.data.attrs = Object.create(null)
}
if (!newVNode.data.props) {
newVNode.data.props = Object.create(null)
}
if (!newVNode.data.on) {
newVNode.data.on = Object.create(null)
}
newVNode.data.attrs.index = this.index
newVNode.data.on.change = this._change
newVNodes.push(newVNode)
}
if (vnode.componentOptions.tag === 'uni-tab-bar') {
if (!vnode.componentOptions.listeners) { //监听子元素传递过来的事件
vnode.componentOptions.listeners = Object.create(null)
}
vnode.componentOptions.listeners._tabBarClick = this._tabBarClick;
newVNodes.push(vnode)
}
}
}
var newNode = createElement('div', {
style: {
flex: 1,
flexDirection: 'column'
},
on: {
change2: this._change2
}
}, newVNodes);
return newNode;
},
methods: {
_tabBarClick(e) {
this.tabIndex = e.index;
this.$emit('change', e);
},
_change(e) {
if (this.tabIndex === e.index) {
return;
}
this.tabIndex = e.index;
this.$emit('change', {
index: e.index
})
}
}
}
</script>