| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- <template>
- <section id="dev_check">
- <el-select v-model="value" @change="changeSelect" placeholder="请选择">
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
- </el-select>
- <section class="table">
- <el-table :data="tableData" style="width: 100%" v-loading="loading">
- <el-table-column prop="providerTitle" label="解决方案">
- <template slot-scope="scope">
- <span class="lblue point">
- <nuxt-link
- target="_blank"
- :to="{path:'/main/solution_detail?id='+scope.row.providerId}"
- >{{ scope.row.providerTitle }}</nuxt-link>
- </span>
- </template>
- </el-table-column>
- <el-table-column label="用户" width="66">
- <template slot-scope="scope">
- <span v-if="scope.row.uid == 0">来宾用户</span>
- <span class="lblue point" @click="clickDev(scope.row.uid)" v-else>{{ scope.row.uid }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="name" label="姓名"></el-table-column>
- <el-table-column prop="mobile" label="手机号"></el-table-column>
- <el-table-column prop="contactCreatedAtFormat" label="创建时间"></el-table-column>
- <el-table-column prop="channel" label="渠道">
- <template slot-scope="scope">{{ scope.row.channel }} {{ scope.row.channelVersion }}</template>
- </el-table-column>
- <el-table-column prop="platformContactNote" label="历史备注"></el-table-column>
- <el-table-column prop="platformContactNote" label="备注" width="120">
- <template slot-scope="scope">
- <el-button type="text" @click="onToList(scope.row)">查看备注({{scope.row.remark_num}})</el-button>
- </template>
- </el-table-column>
- <el-table-column prop="platformContactAtFormat" label="联系时间"></el-table-column>
- <el-table-column prop="platformContact" label="当前状态">
- <template slot-scope="scope">
- <p v-if="scope.row.platformContact == 0">未联系</p>
- <p v-else>已联系</p>
- </template>
- </el-table-column>
- <el-table-column prop="platformContactAdmin.nickname" label="操作人"></el-table-column>
- <el-table-column label="操作" prop="platformContact" width="200">
- <template slot-scope="scope">
- <el-button type="text" v-if="scope.row.platformContact == 0" @click="onContact(scope.row)">确认联系</el-button>
- <el-button type="text" @click="showConfirm(scope.row)">添加备注</el-button>
- </template>
- </el-table-column>
- </el-table>
- </section>
- <el-pagination
- background
- @current-change="changePagination"
- :current-page.sync="currentPage"
- :page-size="pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="totalCount"
- ></el-pagination>
- <el-dialog title="确认联系" :visible.sync="dialogFormVisible">
- <el-form :model="form" :rules="rules" ref="roleForm">
- <el-form-item label="备注" label-width="120px">
- <el-input v-model="form.content" type="textarea"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible = false">取 消</el-button>
- <el-button type="primary" @click="confirm('roleForm')">确 定</el-button>
- </div>
- </el-dialog>
- </section>
- </template>
- <script>
- export default {
- data() {
- return {
- loading: false,
- // 列表数据
- tableData: [],
- pageSize: 20,
- totalCount: 40,
- dialogFormVisible: false,
- currentPage: 1,
- form: {
- id: null,
- content: "",
- type: 2
- }
- };
- },
- created() {
- this.getTableData();
- },
- methods: {
- async onContact(row) {
- let res = await this.$post("/api/admin/kaifawu/markContact", {id: row.id});
- if (res.status == 1) {
- this.$message({
- message: res.info,
- type: "success"
- });
- this.getTableData();
- } else {
- this.$message({
- message: res.info,
- type: "fail"
- });
- }
- },
- showConfirm(row) {
- if (row.platformContact == 0) {
- this.$message({
- message: '请先联系,在备注',
- type: "fail"
- });
- return false;
- }
- this.form.id = row.id;
- this.dialogFormVisible = true;
- },
- // 页码变动
- changePagination(page) {
- this.currentPage = page;
- this.getTableData();
- },
- // 点击开发者
- clickDev(uid) {
- window.open(
- this.$store.state.domainConfig.siteUrl + `/rooter/user/${uid}`
- );
- },
- async confirm() {
- let res = await this.$post("/api/admin/kaifawu/remark", this.form);
- if (res.status == 1) {
- this.$message({
- message: res.info,
- type: "success"
- });
- this.getTableData();
- this.dialogFormVisible = false;
- }
- },
- onToList(row) {
- let data = {
- obj_id: row.id,
- type: 2
- }
- this.$router.push({path: '/main/remark_list', query: data});
- },
- // 获取列表数据
- async getTableData() {
- this.tableData = [];
- let page = this.currentPage;
- let body = {page};
- let res = await this.$post("/api/admin/kaifawu/getContactList", body);
- let data = res.data;
- this.tableData = data.lists;
- this.pageSize = data.pageSize;
- this.totalCount = Number(data.total);
- }
- }
- };
- </script>
- <style scoped>
- .table {
- height: calc(100% - 60px);
- }
- .img {
- width: 100%;
- height: auto;
- }
- </style>
|