1
PC-20250623MANY\Administrator
2025-07-06 013e32fd5a7fe59fbe4e41e51e3084a45718348c
src/pages/newindex/meigu.vue
@@ -4,77 +4,84 @@
            <Newheader></Newheader>
            <div>
                <el-table :data="zixuanlist" :highlight-current-row="false" border style="width: 100%"
                    v-loading="loading" element-loading-spinner="el-icon-loading" @row-contextmenu="rightClick"
                    element-loading-background="rgba(37,38,42, 0.8)" :height="tableHeight" @row-click="handleTableRow"
                    :height="tableHeight" @row-click="handleTableRow" v-loading="loading" @row-contextmenu="rightClick"
                    element-loading-spinner="el-icon-loading" element-loading-background="rgba(37,38,42, 0.8)"
                    :header-cell-style="{ 'padding': '2px 0', 'background': 'rgb(37,38,42)', 'color': '#9d9d9d', 'font-size': '12px' }">
                    <el-table-column prop="date" label="排序">
                    <el-table-column prop="date" :label="$t('px')">
                        <template slot-scope="scope">
                            <span>
                                {{ scope.$index + 1 }}
                            </span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="name" label="名称">
                    <el-table-column prop="name" :label="$t('MingCheng')">
                        <template slot-scope="scope">
                            <span class="contents">
                                {{ scope.row.name ? scope.row.name : '--' }}
                            </span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="code" label="代码">
                    <el-table-column prop="code" :label="$t('dm')">
                        <template slot-scope="scope">
                            <span class="contents">
                                {{ scope.row.code ? scope.row.code : '--' }}
                            </span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="hcrate" label="涨幅%">
                    <el-table-column prop="hcrate" :label="$t('zf')">
                        <template slot-scope="scope">
                            <span class="contents" :class="scope.row.hcrate < 0 ? 'greens' : 'reds'">
                                {{ scope.row.hcrate ? scope.row.hcrate + '%' : '--' }}
                            </span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="nowPrice" label="现价">
                    <el-table-column prop="nowPrice" :label="$t('xj')">
                        <template slot-scope="scope">
                            <span class="contents" :class="scope.row.hcrate < 0 ? 'greens' : 'reds'">
                                {{ scope.row.nowPrice ? scope.row.nowPrice : '--' }}
                            </span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="today_max" label="最高">
                    <el-table-column prop="today_max" :label="$t('hj73')">
                        <template slot-scope="scope">
                            <span class="contents" :class="scope.row.hcrate < 0 ? 'greens' : 'reds'">
                                {{ scope.row.today_max ? scope.row.today_max : '--' }}
                            </span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="today_min" label="最低">
                    <el-table-column prop="today_min" :label="$t('hj75')">
                        <template slot-scope="scope">
                            <span class="contents" :class="scope.row.hcrate < 0 ? 'greens' : 'reds'">
                                {{ scope.row.today_min ? scope.row.today_min : '--' }}
                            </span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="open_px" label="开盘">
                    <el-table-column prop="open_px" :label="$t('kp')">
                        <template slot-scope="scope">
                            <span class="contents" :class="scope.row.hcrate < 0 ? 'greens' : 'reds'">
                                {{ scope.row.open_px ? scope.row.open_px : '--' }}
                            </span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="preclose_px" label="昨收">
                    <el-table-column prop="preclose_px" :label="$t('hj74')">
                    </el-table-column>
                   <!-- <el-table-column prop="business_balance" :label="$t('cje')" width="300">
                        <template slot-scope="scope">
                            <span class="contents blues">
                                {{ scope.row.business_balance ? scope.row.business_balance : '--' }}
                            </span>
                        </template>
                    </el-table-column> -->
                </el-table>
                <div id="menu">
                    <ul>
                        <li @click="getaddzixuan"><span>添加自选</span></li>
                        <li @click="getdelzixuan"><span>删除自选</span></li>
                        <li @click="handleTableRow(currentRow)"><span>交易</span></li>
                        <li @click="getaddzixuan"><span>{{$t('djtjzx')}}</span></li>
                        <li @click="getdelzixuan"><span>{{$t('djsczx')}}</span></li>
                        <li @click="handleTableRow(currentRow)"><span>{{$t('hj225')}}</span></li>
                    </ul>
                </div>
            </div>
            <Newfooter></Newfooter>
            <!-- <Newfooter></Newfooter> -->
            <div class="zhezhao" v-if="iszhezhao" @click="getmenuclose"></div>
        </div>
    </div>
@@ -144,12 +151,12 @@
            api.addOption({ code: this.currentRow.code }).then(res => {
                if (res.status == 0) {
                    this.$message({
                        message: '添加自选成功',
                        message: this.$t('hj96'),
                        type: 'success'
                    });
                } else {
                    this.$message({
                        message: '添加自选失败',
                        message: this.$t('tjzxsb'),
                        type: 'error'
                    });
                }
@@ -160,12 +167,12 @@
            api.delOption({ code: this.currentRow.code }).then(res => {
                if (res.status == 0) {
                    this.$message({
                        message: '删除自选成功',
                        message: this.$t('hj97'),
                        type: 'success'
                    });
                } else {
                    this.$message({
                        message: '删除自选失败',
                        message: this.$t('sczxsb'),
                        type: 'error'
                    });
                }
@@ -226,6 +233,11 @@
                    type: row.stock_type || ''
                }
            })
            const obj = {
              pid: row.code || '',
              type: row.stock_type || ''
            }
            window.localStorage.setItem('kLine', JSON.stringify(obj))
        }
    }
}