浏览代码

6.3修改多项文件

lyn7568 4 年之前
父节点
当前提交
b2162f8d20

二进制
dist.zip


+ 45 - 28
src/components/meetingbox/index.vue

@ -1,32 +1,39 @@
1 1
<template>
2
  <el-col :span="4" style="margin-left:30px">
3
    <el-card :body-style="{ padding: '8px' }" style="height:400px">
2
  <el-col :sm="7" :md="7" style="margin-left:30px">
3
    <el-card :body-style="{ padding: '8px' }" style="height:430px">
4 4
      <div
5 5
        class="bg"
6 6
        :style="{backgroundImage: 'url( ' + image + ')', backgroundSize:'cover'}"
7 7
        @click="handClick()"
8 8
      ></div>
9
      <div style="padding: 14px;">
10
        <span style="font-size:20px">{{this.list.nameCn}}</span>
11
        <div class="bottom clearfix">
12
          <time class="time">{{this.list.address}}</time>
13
          <p class="time">举办时间:{{this.list.startTime}}</p>
14
          <el-button
15
            type="text"
16
            class="button"
17
            v-if="this.list.isCheck===0"
18
            @click="status"
19
            style="margin-right:50px"
20
          >发布</el-button>
21
          <el-button type="text" class="button" v-if="this.list.isCheck===1" @click="status">结束会议</el-button>
9
      <div class="bottom-box">
10
        <h3>{{this.list.nameCn}}</h3>
11
        <div>
12
          <p>举办时间:{{this.list.createTime}}</p>
13
          <p>结束时间:{{this.list.endTime}}</p>
14
        </div>
15
        <div>
16
          <el-button type="text" v-if="this.list.isCheck===0" @click="status">发布</el-button>
22 17
          <el-button
23 18
            type="text"
24
            class="button"
19
            class="right"
25 20
            v-if="this.list.isCheck===0||this.list.isCheck===2"
26 21
            style="color:red"
27 22
            @click="delMeeting"
28 23
          >删除</el-button>
29
          <!-- <el-button type="text" class="button" @click="handClick" style="margin-right:150px">传值</el-button> -->
24
          <el-button
25
            type="text"
26
            class="right"
27
            v-if="this.list.isCheck===0 || this.list.isCheck===1"
28
            @click="modificationMeeting"
29
          >修改</el-button>
30
          <el-button
31
            type="text"
32
            v-if="this.list.isCheck===1"
33
            @click="status"
34
            class="right"
35
            style="margin-right:10px"
36
          >结束会议</el-button>
30 37
        </div>
31 38
      </div>
32 39
    </el-card>
@ -82,8 +89,6 @@ export default {
82 89
          status: this.list.isCheck === 0 ? 1 : 2
83 90
        }
84 91
      }).then(({ data }) => {
85
        window.console.log(data);
86
87 92
        if (data) {
88 93
          this.$emit("statusMeeting");
89 94
        } else {
@ -101,12 +106,15 @@ export default {
101 106
        data: this.$http.adornData(arr, false)
102 107
      })
103 108
        .then(res => {
104
          window.console.log(res);
105 109
          this.$emit("statusMeeting");
106 110
        })
107 111
        .catch(err => {
108 112
          window.console.log(err);
109 113
        });
114
    },
115
    // 修改
116
    modificationMeeting() {
117
      this.$emit("statusMeeting", this.id);
110 118
    }
111 119
  },
112 120
  watch: {}
@ -127,14 +135,6 @@ export default {
127 135
  line-height: 12px;
128 136
}
129 137
130
.button {
131
  position: absolute;
132
  bottom: -2px;
133
  right: 15px;
134
  padding-top: 0px;
135
  float: right;
136
}
137
138 138
.image {
139 139
  width: 100%;
140 140
  display: block;
@ -153,4 +153,21 @@ export default {
153 153
.clearfix:after {
154 154
  clear: both;
155 155
}
156
.left {
157
  float: left;
158
}
159
.right {
160
  float: right;
161
}
162
163
.bottom-box {
164
  h3 {
165
    font-size: 20px;
166
    overflow: hidden;
167
    text-overflow: ellipsis;
168
    display: -webkit-box;
169
    -webkit-line-clamp: 1;
170
    -webkit-box-orient: vertical;
171
  }
172
}
156 173
</style>

+ 39 - 0
src/components/ue/ueditor.vue

@ -0,0 +1,39 @@
1
<template>
2
  <div>
3
    <script :id="ueId" class="ueditor-box" type="text/plain" style="width: 100%; height: 400px;"></script>
4
    <!-- <p>
5
      <el-button @click="getContent()">确定</el-button>
6
    </p>-->
7
  </div>
8
</template>
9
10
<script>
11
import ueditor from "ueditor";
12
export default {
13
  data() {
14
    return {
15
      ue: null,
16
      ueId: `J_ueditorBox_${new Date().getTime()}`,
17
      ueContent: ""
18
    };
19
  },
20
  mounted() {
21
    this.ue = ueditor.getEditor(this.ueId, {
22
      // serverUrl: '', // 服务器统一请求接口路径
23
      zIndex: 3000
24
    });
25
    this.ue.setContent("<p>hello!</p>");
26
  },
27
  methods: {
28
    getContent() {
29
      this.ue.ready(() => {
30
        this.ueContent = this.ue.getContent();
31
      });
32
      this.$emit("ue", this.ueContent);
33
    }
34
  }
35
};
36
</script>
37
38
<style lang="scss">
39
</style>

+ 1 - 3
src/router/index.js

@ -34,9 +34,7 @@ const mainRoutes = {
34 34
    // 2. iframeUrl: 是否通过iframe嵌套展示内容, '以http[s]://开头': 是, '': 否
35 35
    // 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理!
36 36
    { path: '/home', component: _import('common/home'), name: 'home', meta: { title: '首页' } },
37
    { path: '/theme', component: _import('common/theme'), name: 'theme', meta: { title: '主题' } },
38
    // { path: '/demo-echarts', component: _import('demo/echarts'), name: 'demo-echarts', meta: { title: 'demo-echarts', isTab: true } },
39
    // { path: '/demo-ueditor', component: _import('demo/ueditor'), name: 'demo-ueditor', meta: { title: 'demo-ueditor', isTab: true } }
37
    { path: '/theme', component: _import('common/theme'), name: 'theme', meta: { title: '主题' } }
40 38
  ],
41 39
  beforeEnter (to, from, next) {
42 40
    let token = Vue.cookie.get('token')

+ 12 - 5
src/views/common/home.vue

@ -12,13 +12,12 @@
12 12
        </div>
13 13
      </el-col>
14 14
    </el-row>
15
    <el-row v-if="reFresh">
15
    <el-row v-if="reFresh" :gutter="10">
16 16
      <el-col :span="24">
17 17
        <div class="grid-content bg-purple-dark">
18 18
          <h2>未发布中的会议</h2>
19 19
        </div>
20 20
      </el-col>
21
22 21
      <meeting-box
23 22
        v-for="(item,index) in unpublished"
24 23
        :key="item.id"
@ -34,7 +33,7 @@
34 33
        </div>
35 34
      </el-col>
36 35
    </el-row>
37
    <el-row>
36
    <el-row :gutter="10">
38 37
      <meeting-box
39 38
        v-for="(item,index) in release"
40 39
        :key="item.id"
@ -50,7 +49,7 @@
50 49
        </div>
51 50
      </el-col>
52 51
    </el-row>
53
    <el-row>
52
    <el-row :gutter="10">
54 53
      <meeting-box
55 54
        v-for="(item,index) in delRelease"
56 55
        :key="item.id"
@ -106,7 +105,7 @@ export default {
106 105
  methods: {
107 106
    // 获取数据列表
108 107
    getDataList() {
109
       this.unpublished = [];
108
      this.unpublished = [];
110 109
      this.release = [];
111 110
      this.delRelease = [];
112 111
@ -220,6 +219,14 @@ export default {
220 219
      this.release = [];
221 220
      this.delRelease = [];
222 221
      this.getDataList();
222
      window.console.log(msg)
223
      if(msg){
224
        this.addOrUpdateHandle(msg);
225
      }
226
    },
227
    // 获取子元素id
228
    getID(data) {
229
      window.console.log(this.$refs.MeetingBox);
223 230
    }
224 231
  }
225 232
};

+ 0 - 65
src/views/demo/ueditor.vue

@ -1,65 +0,0 @@
1
<template>
2
  <div class="mod-demo-ueditor">
3
    <el-alert
4
      title="提示:"
5
      type="warning"
6
      :closable="false">
7
      <div slot-scope="description">
8
        <p class="el-alert__description">1. 此Demo只提供UEditor官方使用文档,入门部署和体验功能。具体使用请参考:http://fex.baidu.com/ueditor/</p>
9
        <p class="el-alert__description">2. 浏览器控制台报错“请求后台配置项http错误,上传功能将不能正常使用!”,此错需要后台提供上传接口方法(赋值给serverUrl属性)</p>
10
      </div>
11
    </el-alert>
12
13
    <script :id="ueId" class="ueditor-box" type="text/plain" style="width: 100%; height: 260px;">hello world!</script>
14
    
15
    <!-- 获取内容 -->
16
    <p><el-button @click="getContent()">获得内容</el-button></p>
17
    <el-dialog
18
      title="内容"
19
      :visible.sync="dialogVisible"
20
      :append-to-body="true">
21
      {{ ueContent }}
22
      <span slot="footer" class="dialog-footer">
23
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
24
      </span>
25
    </el-dialog>
26
  </div>
27
</template>
28
29
<script>
30
  import ueditor from 'ueditor'
31
  export default {
32
    data () {
33
      return {
34
        ue: null,
35
        ueId: `J_ueditorBox_${new Date().getTime()}`,
36
        ueContent: '',
37
        dialogVisible: false
38
      }
39
    },
40
    mounted () {
41
      this.ue = ueditor.getEditor(this.ueId, {
42
        // serverUrl: '', // 服务器统一请求接口路径
43
        zIndex: 3000
44
      })
45
    },
46
    methods: {
47
      getContent () {
48
        this.dialogVisible = true
49
        this.ue.ready(() => {
50
          this.ueContent = this.ue.getContent()
51
        })
52
      }
53
    }
54
  }
55
</script>
56
57
<style lang="scss">
58
  .mod-demo-ueditor {
59
    position: relative;
60
    z-index: 510;
61
    > .el-alert {
62
      margin-bottom: 10px;
63
    }
64
  }
65
</style>

+ 6 - 56
src/views/modules/admin/attenders.vue

@ -11,11 +11,11 @@
11 11
          type="primary"
12 12
          @click="addOrUpdateHandle()"
13 13
        >新增</el-button>
14
        <!-- <el-button type="primary" @click="deleteHandle()">导入会员名单</el-button> -->
14 15
        <el-button
15 16
          v-if="isAuth('admin:attenders:delete')"
16 17
          type="danger"
17 18
          @click="deleteHandle()"
18
          :disabled="dataListSelections.length <= 0"
19 19
        >批量删除</el-button>
20 20
      </el-form-item>
21 21
    </el-form>
@ -29,29 +29,6 @@
29 29
      <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
30 30
      <el-table-column prop="name" header-align="center" align="center" label="姓名"></el-table-column>
31 31
      <el-table-column prop="organization" header-align="center" align="center" label="所属机构"></el-table-column>
32
      <!-- <el-table-column prop="position" header-align="center" align="center" label="职位"></el-table-column>
33
      <el-table-column prop="jobTitle" header-align="center" align="center" label="职称"></el-table-column>-->
34
      <!-- <el-table-column prop="phone" header-align="center" align="center" label="电话"></el-table-column> -->
35
      <!-- <el-table-column prop="email" header-align="center" align="center" label="邮箱"></el-table-column> -->
36
      <!-- <el-table-column prop="officephone" header-align="center" align="center" label="办公电话"></el-table-column> -->
37
      <!-- <el-table-column prop="intention" header-align="center" align="center" label="参会意向">
38
        <template slot-scope="scope">
39
          <el-tag v-if="scope.row.intention===0" type="danger">否</el-tag>
40
          <el-tag v-else="scope.row.intention===1">是</el-tag>
41
        </template>
42
      </el-table-column>
43
      <el-table-column prop="room" header-align="center" align="center" label="住宿要求">
44
        <template slot-scope="scope">
45
          <el-tag v-if="scope.row.room===0" type="danger">否</el-tag>
46
          <el-tag v-else="scope.row.room===1">是</el-tag>
47
        </template>
48
      </el-table-column>
49
      <el-table-column prop="transfer" header-align="center" align="center" label="接送要求">
50
        <template slot-scope="scope">
51
          <el-tag v-if="scope.row.transfer===0" type="danger">否</el-tag>
52
          <el-tag v-else="scope.row.transfer===1">是</el-tag>
53
        </template>
54
      </el-table-column>-->
55 32
      <el-table-column prop="intention" header-align="center" align="center" label="参会意向">
56 33
        <template slot-scope="scope">
57 34
          <el-button
@ -85,30 +62,7 @@
85 62
      <el-table-column prop="typeName" header-align="center" align="center" label="用户类型"></el-table-column>
86 63
      <el-table-column prop="servicerName" header-align="center" align="center" label="负责人"></el-table-column>
87 64
      <el-table-column prop="note" header-align="center" align="center" label="备注"></el-table-column>
88
      <!-- <el-table-column
89
        prop="account"
90
        header-align="center"
91
        align="center"
92
        label="联系电话">
93
      </el-table-column>-->
94
      <!-- <el-table-column
95
        prop="emailLx"
96
        header-align="center"
97
        align="center"
98
        label="联系邮箱">
99
      </el-table-column>-->
100
      <!-- <el-table-column
101
        prop="regflag"
102
        header-align="center"
103
        align="center"
104
        label="注册情况 0, 1, 2, 现场注册"
105
      >
106
      </el-table-column>-->
107
108
      <!-- <el-table-column prop="createTime" header-align="center" align="center" label="创建时间"></el-table-column> -->
109 65
      <el-table-column prop="modify_time" header-align="center" align="center" label="修改时间"></el-table-column>
110
      <!-- <el-table-column prop="creater" header-align="center" align="center" label="创建者"></el-table-column>
111
      <el-table-column prop="modifier" header-align="center" align="center" label="修改者"></el-table-column>-->
112 66
      <el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
113 67
        <template slot-scope="scope">
114 68
          <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
@ -209,15 +163,11 @@ export default {
209 163
        : this.dataListSelections.map(item => {
210 164
            return item.id;
211 165
          });
212
      this.$confirm(
213
        `确定删除?`,
214
        "提示",
215
        {
216
          confirmButtonText: "确定",
217
          cancelButtonText: "取消",
218
          type: "warning"
219
        }
220
      ).then(() => {
166
      this.$confirm(`确定删除?`, "提示", {
167
        confirmButtonText: "确定",
168
        cancelButtonText: "取消",
169
        type: "warning"
170
      }).then(() => {
221 171
        this.$http({
222 172
          url: this.$http.adornUrl("/admin/attenders/delete"),
223 173
          method: "post",

+ 6 - 23
src/views/modules/admin/company-add-or-update.vue

@ -9,7 +9,7 @@
9 9
      :rules="dataRule"
10 10
      ref="dataForm"
11 11
      @keyup.enter.native="dataFormSubmit()"
12
      label-width="100px"
12
      label-width="128px"
13 13
    >
14 14
      <el-form-item label="账号" prop="username">
15 15
        <el-input v-model="dataForm.username" placeholder="账号"></el-input>
@ -23,36 +23,19 @@
23 23
      <el-form-item label="单位地址" prop="address">
24 24
        <el-input v-model="dataForm.address" placeholder="单位地址"></el-input>
25 25
      </el-form-item>
26
      <el-form-item label="单位电话" prop="telephone">
27
        <el-input v-model="dataForm.telephone" placeholder="单位电话"></el-input>
28
      </el-form-item>
26
29 27
      <el-form-item label="联系人姓名" prop="contactname">
30 28
        <el-input v-model="dataForm.contactname" placeholder="联系人姓名"></el-input>
31 29
      </el-form-item>
32 30
      <el-form-item label="联系人电话" prop="cellphone">
33 31
        <el-input v-model="dataForm.cellphone" placeholder="联系人电话"></el-input>
34 32
      </el-form-item>
35
      <el-form-item label="统一社会信用代码" prop="uscCode">
33
      <el-form-item label="单位电话">
34
        <el-input v-model="dataForm.telephone" placeholder="单位电话"></el-input>
35
      </el-form-item>
36
      <el-form-item label="统一社会信用代码">
36 37
        <el-input v-model="dataForm.uscCode" placeholder="统一社会信用代码"></el-input>
37 38
      </el-form-item>
38
      <!-- <el-form-item label="证件扫码件(图片)地址" prop="uscPicture">
39
      <el-input v-model="dataForm.uscPicture" placeholder="证件扫码件(图片)地址"></el-input>
40
      </el-form-item>-->
41
      <!-- <el-form-item label="账号等级" prop="level">
42
        <el-input v-model="dataForm.level" placeholder="账号等级"></el-input>
43
      </el-form-item> -->
44
      <!-- <el-form-item label="是否通过审核 0:未通过 1:通过" prop="isCheck">
45
      <el-input v-model="dataForm.isCheck" placeholder="是否通过审核 0:未通过 1:通过"></el-input>
46
      </el-form-item>-->
47
      <!-- <el-form-item label="创建时间" prop="createTime">
48
      <el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
49
    </el-form-item>
50
    <el-form-item label="修改时间" prop="modifyTime">
51
      <el-input v-model="dataForm.modifyTime" placeholder="修改时间"></el-input>
52
      </el-form-item>-->
53
      <!-- <el-form-item label="是否被删除 状态  0:正常   1:删除" prop="isDel">
54
      <el-input v-model="dataForm.isDel" placeholder="是否被删除 状态  0:正常   1:删除"></el-input>
55
      </el-form-item>-->
56 39
    </el-form>
57 40
    <span slot="footer" class="dialog-footer">
58 41
      <el-button @click="visible = false">取消</el-button>

+ 3 - 21
src/views/modules/admin/employee-add-or-update.vue

@ -14,9 +14,9 @@
14 14
      <el-form-item label="账号" prop="username">
15 15
        <el-input v-model="dataForm.username" placeholder="账号"></el-input>
16 16
      </el-form-item>
17
      <el-form-item label="密码" prop="password">
17
      <!-- <el-form-item label="密码" prop="password">
18 18
        <el-input v-model="dataForm.password" placeholder="密码"></el-input>
19
      </el-form-item>
19
      </el-form-item> -->
20 20
      <el-form-item label="姓名" prop="truename">
21 21
        <el-input v-model="dataForm.truename" placeholder="姓名"></el-input>
22 22
      </el-form-item>
@ -31,30 +31,12 @@
31 31
          ></el-option>
32 32
        </el-select>
33 33
      </el-form-item>
34
      <!-- <el-form-item label="角色id(控制权限)" prop="roleId">
35
        <el-input v-model="dataForm.roleId" placeholder="角色id(控制权限)"></el-input>
36
      </el-form-item>-->
37
      <!-- <el-form-item label="部门id" prop="departmentId">
38
        <el-input v-model="dataForm.departmentId" placeholder="部门id"></el-input>
39
      </el-form-item>-->
40
      <!-- <el-form-item label="职位id" prop="positionId">
41
        <el-input v-model="dataForm.positionId" placeholder="职位id"></el-input>
42
      </el-form-item>-->
43 34
      <el-form-item label="联系电话" prop="phone">
44 35
        <el-input v-model="dataForm.phone" placeholder="联系电话"></el-input>
45 36
      </el-form-item>
46
      <el-form-item label="邮箱" prop="email">
37
      <el-form-item label="邮箱" >
47 38
        <el-input v-model="dataForm.email" placeholder="邮箱"></el-input>
48 39
      </el-form-item>
49
      <!-- <el-form-item label="创建时间" prop="createTime">
50
        <el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
51
      </el-form-item>
52
      <el-form-item label="修改时间" prop="modifyTime">
53
        <el-input v-model="dataForm.modifyTime" placeholder="修改时间"></el-input>
54
      </el-form-item>-->
55
      <!-- <el-form-item label="是否被删除 状态  0:正常   1:删除" prop="isDel">
56
        <el-input v-model="dataForm.isDel" placeholder="是否被删除 状态  0:正常   1:删除"></el-input>
57
      </el-form-item>-->
58 40
    </el-form>
59 41
    <span slot="footer" class="dialog-footer">
60 42
      <el-button @click="visible = false">取消</el-button>

+ 1 - 1
src/views/modules/admin/employee.vue

@ -29,7 +29,7 @@
29 29
      <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
30 30
      <!-- <el-table-column prop="id" header-align="center" align="center" label="员工id (员工表)"></el-table-column> -->
31 31
      <el-table-column prop="username" header-align="center" align="center" label="账号"></el-table-column>
32
      <el-table-column prop="password" header-align="center" align="center" label="密码"></el-table-column>
32
      <!-- <el-table-column prop="password" header-align="center" align="center" label="密码"></el-table-column> -->
33 33
      <el-table-column prop="truename" header-align="center" align="center" label="姓名"></el-table-column>
34 34
      <el-table-column prop="companyname" header-align="center" align="center" label="单位"></el-table-column>
35 35
      <!-- <el-table-column prop="roleId" header-align="center" align="center" label="角色id(控制权限)"></el-table-column> -->

+ 137 - 77
src/views/modules/admin/meeting-add-or-update.vue

@ -11,9 +11,31 @@
11 11
      @keyup.enter.native="dataFormSubmit()"
12 12
      label-width="136px"
13 13
    >
14
      <!-- <el-form-item label="举办单位id" prop="companyId">
15
        <el-input v-model="dataForm.companyId" placeholder="举办单位id"></el-input>
16
      </el-form-item>-->
14
      <el-form-item label="上传会议封面图片" prop="titlePicture">
15
        <!-- <el-upload
16
          :action="dialogImageUrl"
17
          list-type="picture-card"
18
          :on-success="successHandle"
19
          :file-list="titlePictureList"
20
          name="upload_file"
21
        >
22
          <i class="el-icon-plus"></i>
23
        </el-upload>
24
        <el-dialog :visible.sync="dialogVisible">
25
          <img width="100%" :src="dialogImageUrl" alt />
26
        </el-dialog>-->
27
        <!--  -->
28
        <el-upload
29
          :action="dialogImageUrl"
30
          list-type="picture-card"
31
          :on-success="handlePictureCardPreview"
32
          :on-remove="handleRemove"
33
          :file-list="titlePictureList"
34
          name="upload_file"
35
        >
36
          <i class="el-icon-plus"></i>
37
        </el-upload>
38
      </el-form-item>
17 39
      <el-form-item label="会议名称(中文)" prop="nameCn">
18 40
        <el-input v-model="dataForm.nameCn" placeholder="会议名称(中文)"></el-input>
19 41
      </el-form-item>
@ -23,80 +45,74 @@
23 45
      <el-form-item label="举办地点" prop="address">
24 46
        <el-input v-model="dataForm.address" placeholder="举办地点"></el-input>
25 47
      </el-form-item>
26
      <el-form-item label="开始时间" prop="startTime">
27
        <!-- <el-input v-model="dataForm.startTime" placeholder="开始时间"></el-input> -->
28
        <el-date-picker
29
          v-model="dataForm.startTime"
30
          type="datetime"
31
          placeholder="开始时间"
32
          value-format="yyyy-MM-dd HH:mm:ss"
33
        ></el-date-picker>
34
      </el-form-item>
35
      <el-form-item label="结束时间" prop="endTime">
36
        <!-- <el-input v-model="dataForm.endTime" placeholder="结束时间"></el-input> -->
48
49
      <el-form-item label="起始时间">
37 50
        <el-date-picker
38
          v-model="dataForm.endTime"
39
          type="datetime"
40
          placeholder="结束时间"
51
          v-model="dataForm.startAndEndTime"
52
          type="datetimerange"
53
          start-placeholder="开始日期"
54
          end-placeholder="结束日期"
55
          :default-time="['12:00:00']"
41 56
          value-format="yyyy-MM-dd HH:mm:ss"
42 57
        ></el-date-picker>
43 58
      </el-form-item>
59
44 60
      <el-form-item label="官方网址" prop="officeWebsite">
45 61
        <el-input v-model="dataForm.officeWebsite" placeholder="官方网址">
46 62
          <template slot="prepend">Http://</template>
47 63
        </el-input>
48 64
      </el-form-item>
49
      <el-form-item label="上传会议封面图片" prop="titlePicture">
50
        <!-- <el-input v-model="dataForm.titlePicture" placeholder="上传会议封面图片"></el-input> -->
51
        <el-upload
52
          :action="dialogImageUrl"
53
          list-type="picture-card"
54
          :on-remove="handleRemove"
55
          :on-success="successHandle"
56
          name="upload_file"
57
        >
58
          <i class="el-icon-plus"></i>
59
        </el-upload>
60
        <el-dialog :visible.sync="dialogVisible">
61
          <img width="100%" :src="dialogImageUrl" alt />
62
        </el-dialog>
63
      </el-form-item>
64 65
65
      <el-form-item label="涉及学科" prop="subjects">
66
      <el-form-item label="涉及学科" prop="subjects" class="doc">
66 67
        <el-autocomplete
67 68
          v-model="dataForm.subjects"
68 69
          :fetch-suggestions="querySearchAsync"
69 70
          placeholder="每次添加一个学科"
70
          style="width:690px"
71
          style="width:90%"
71 72
        ></el-autocomplete>
72
        <el-button @click="handSubject">添加</el-button>
73
        <el-button @click="handSubject" class>添加</el-button>
73 74
      </el-form-item>
74 75
      <el-form-item v-if="this.subjects.length!==0">
75
        <el-tag v-for="(item) in subjects" style="margin-right:8px">{{item}}</el-tag>
76
        <el-tag
77
          v-for="(item) in subjects"
78
          style="margin-right:8px"
79
          closable
80
          @close="handleClose(item,'subjects')"
81
        >{{item}}</el-tag>
76 82
      </el-form-item>
77
      <el-form-item label="涉及行业" prop="industries">
83
      <el-form-item label="涉及行业" prop="industries" class="doc">
78 84
        <el-autocomplete
79 85
          v-model="dataForm.industries"
80 86
          :fetch-suggestions="queryIndustriesAsync"
81 87
          placeholder="每次添加一个行业"
82
          style="width:690px"
88
          style="width:90%"
83 89
        ></el-autocomplete>
84 90
        <el-button @click="handIndustries">添加</el-button>
85 91
      </el-form-item>
86 92
      <el-form-item v-if="this.industry.length!==0">
87
        <el-tag v-for="(item) in industry" style="margin-right:8px">{{item}}</el-tag>
93
        <el-tag
94
          v-for="(item) in industry"
95
          style="margin-right:8px"
96
          closable
97
          @close="handleClose(item,'industry')"
98
        >{{item}}</el-tag>
88 99
      </el-form-item>
89
      <el-form-item label="参会人员类型" prop="attendersType">
100
      <el-form-item label="参会人员类型" prop="attendersType" class="doc">
90 101
        <el-autocomplete
91 102
          v-model="dataForm.attendersType"
92 103
          :fetch-suggestions="queryAttendersTypeAsync"
93 104
          placeholder="每次添加一个类型"
94
          style="width:690px"
105
          style="width:90%"
95 106
        ></el-autocomplete>
96 107
        <el-button @click="handAttendersType">添加</el-button>
97 108
      </el-form-item>
98 109
      <el-form-item v-if="this.typesofattender.length!==0">
99
        <el-tag v-for="(item) in typesofattender" style="margin-right:8px">{{item}}</el-tag>
110
        <el-tag
111
          v-for="(item) in typesofattender"
112
          style="margin-right:8px"
113
          closable
114
          @close="handleClose(item,'typesofattender')"
115
        >{{item}}</el-tag>
100 116
      </el-form-item>
101 117
      <el-form-item label="联系人" prop="serviceEm">
102 118
        <el-select
@ -114,10 +130,9 @@
114 130
          ></el-option>
115 131
        </el-select>
116 132
      </el-form-item>
117
      <el-form-item v-if="this.employeePersonId.length!==0">
133
      <el-form-item>
118 134
        <el-tag v-for="(item) in employeePerson" :key="item" style="margin-right:8px">{{item}}</el-tag>
119 135
      </el-form-item>
120
121 136
      <el-form-item label="会议负责人" prop="serviceEmp">
122 137
        <el-select v-model="dataForm.serviceIds" filterable placeholder="请选择" style="width:220px">
123 138
          <el-option
@ -128,7 +143,7 @@
128 143
          ></el-option>
129 144
        </el-select>
130 145
      </el-form-item>
131
      <el-form-item label="线上报名开始时间" prop="onlineRegDeadline">
146
      <el-form-item label="线上报名截止时间" prop="onlineRegDeadline">
132 147
        <el-date-picker
133 148
          v-model="dataForm.onlineRegDeadline"
134 149
          type="datetime"
@ -144,14 +159,18 @@
144 159
          value-format="yyyy-MM-dd HH:mm:ss"
145 160
        ></el-date-picker>
146 161
      </el-form-item>
147
148
      <el-form-item label="会议介绍" prop="introduction">
149
        <el-input
150
          type="textarea"
151
          :autosize="{ minRows: 2, maxRows: 10}"
152
          placeholder="请输入内容"
153
          v-model="dataForm.introduction"
154
        ></el-input>
162
      <!-- <el-form-item label="线上报名起始时间">
163
        <el-date-picker
164
          v-model="dataForm.onsiteRegDeadEndTime"
165
          type="datetimerange"
166
          start-placeholder="开始日期"
167
          end-placeholder="结束日期"
168
          :default-time="['12:00:00']"
169
          value-format="yyyy-MM-dd HH:mm:ss"
170
        ></el-date-picker>
171
      </el-form-item>-->
172
      <el-form-item label="会议介绍">
173
        <u-e @ue="getCotent" ref="ue" :txt="this.txt"></u-e>
155 174
      </el-form-item>
156 175
    </el-form>
157 176
    <span slot="footer" class="dialog-footer">
@ -160,23 +179,20 @@
160 179
    </span>
161 180
  </el-dialog>
162 181
</template>
163
164 182
<script>
183
import ueditor from "ueditor";
184
import uE from "../../../components/ue/ueditor";
165 185
export default {
166 186
  data() {
167 187
    return {
168 188
      url: "",
169
      imageUrl: "",
170 189
      visible: false,
171 190
      dialogVisible: false,
172
173 191
      dataForm: {
174 192
        companyId: 1,
175 193
        nameCn: "",
176 194
        nameEn: "",
177 195
        address: "",
178
        startTime: "",
179
        endTime: "",
180 196
        officeWebsite: "",
181 197
        titlePicture: "",
182 198
        subjects: "",
@ -188,9 +204,10 @@ export default {
188 204
        contactIds: "", // 联系人姓名
189 205
        onlineRegDeadline: "",
190 206
        onsiteRegDeadline: "",
191
        introduction: ""
207
        introduction: "",
208
        startAndEndTime: [],
209
        onsiteRegDeadEndTime: []
192 210
      },
193
194 211
      dataRule: {
195 212
        companyId: [
196 213
          { required: true, message: "举办单位id不能为空", trigger: "blur" }
@ -272,7 +289,9 @@ export default {
272 289
      typesofattender: [], //参会人员提交后台
273 290
      employeeList: [], //员工表信息
274 291
      employeePersonId: [],
275
      employeePerson: []
292
      employeePerson: [],
293
      txt: "",
294
      loading: true
276 295
    };
277 296
  },
278 297
  mounted() {
@ -281,6 +300,9 @@ export default {
281 300
    this.getAttendersType();
282 301
    this.getEmployeeList();
283 302
  },
303
  components: {
304
    uE
305
  },
284 306
  methods: {
285 307
    init(id) {
286 308
      this.dataForm.id = id || 0;
@ -297,17 +319,19 @@ export default {
297 319
              this.dataForm.nameCn = data.meeting.nameCn;
298 320
              this.dataForm.nameEn = data.meeting.nameEn;
299 321
              this.dataForm.address = data.meeting.address;
300
              this.dataForm.startTime = data.meeting.startTime;
301
              this.dataForm.endTime = data.meeting.endTime;
322
              this.titlePictureList = data.titlePictures;
323
              this.dataForm.startAndEndTime = data.startAndEndTime;
302 324
              this.dataForm.officeWebsite = data.meeting.officeWebsite;
303
              this.dataForm.titlePicture = data.meeting.titlePicture;
304 325
              this.dataForm.subjects = data.meeting.subjects;
305 326
              this.dataForm.industries = data.meeting.industries;
306 327
              this.dataForm.attendersType = data.meeting.attendersType;
307
              this.dataForm.serviceEmp = data.meeting.serviceEmp;
328
              this.dataForm.serviceIds = data.meeting.serviceId;
329
              this.employeePerson = data.meeting.contactNames.split(",");
330
              // 线上起始时间
308 331
              this.dataForm.onlineRegDeadline = data.meeting.onlineRegDeadline;
309 332
              this.dataForm.onsiteRegDeadline = data.meeting.onsiteRegDeadline;
310 333
              this.dataForm.introduction = data.meeting.introduction;
334
              this.txt = this.dataForm.introduction;
311 335
            }
312 336
          });
313 337
        }
@ -318,6 +342,7 @@ export default {
318 342
    },
319 343
    // 表单提交
320 344
    dataFormSubmit() {
345
      this.$refs.ue.getContent();
321 346
      this.$refs["dataForm"].validate(valid => {
322 347
        if (valid) {
323 348
          this.$http({
@ -326,13 +351,15 @@ export default {
326 351
            ),
327 352
            method: "post",
328 353
            data: this.$http.adornData({
354
              id: this.dataForm.id,
355
              companyId: 1,
329 356
              nameCn: this.dataForm.nameCn,
330 357
              nameEn: this.dataForm.nameEn,
331 358
              address: this.dataForm.address,
332
              startTime: this.dataForm.startTime,
333
              endTime: this.dataForm.endTime,
359
              // 会议开始时间
360
              startAndEndTime: this.dataForm.startAndEndTime,
334 361
              officeWebsite: this.dataForm.officeWebsite,
335
              titlePicture: this.titlePictureList.join(),
362
              titlePicture: this.titlePictureList,
336 363
              subjects: this.subjects,
337 364
              industries: this.industry,
338 365
              attendersType: this.typesofattender,
@ -367,14 +394,12 @@ export default {
367 394
    },
368 395
    // 上传会议图片
369 396
    handleRemove(file, fileList) {
370
      console.log(file, fileList);
397
      let img = file.uid;
398
      this.titlePictureList.splice(this.titlePictureList.indexOf(img), 1);
371 399
    },
372
    successHandle(response, file) {
373
      if (response && response.code === 0) {
374
        this.titlePictureList.push(response.picname);
375
      } else {
376
        this.$message.error(response.msg);
377
      }
400
    handlePictureCardPreview(response, file, fileList) {
401
      response.url = "http://192.168.3.233/" + response.picname;
402
      this.titlePictureList.push(response);
378 403
    },
379 404
    //获取会议学科
380 405
    getSubject() {
@ -448,7 +473,6 @@ export default {
448 473
        cb(results);
449 474
      }, 1000 * Math.random());
450 475
    },
451
452 476
    //添加行业下tag渲染
453 477
    handIndustries() {
454 478
      if (this.dataForm.industries) {
@ -524,9 +548,27 @@ export default {
524 548
          }
525 549
        }
526 550
      }
551
    },
552
    //获取富文本框内容
553
    getCotent(data) {
554
      this.dataForm.introduction = data;
555
    },
556
    handleClose(data, name) {
557
      switch (name) {
558
        case "subjects":
559
          this.subjects.splice(this.subjects.indexOf(data), 1);
560
          break;
561
        case "industry":
562
          this.industry.splice(this.industry.indexOf(data), 1);
563
          break;
564
        case "typesofattender":
565
          this.typesofattender.splice(this.typesofattender.indexOf(data), 1);
566
          break;
567
        default:
568
          break;
569
      }
527 570
    }
528 571
  }
529
  
530 572
};
531 573
</script>
532 574
<style lang='scss'>
@ -553,4 +595,22 @@ export default {
553 595
  height: 178px;
554 596
  display: block;
555 597
}
598
.doc {
599
  position: relative;
600
}
601
.el-autocomplete {
602
  width: 100%;
603
}
604
.doc .el-button {
605
  position: absolute;
606
  top: 0%;
607
  right: 0%;
608
}
609
.mod-demo-ueditor {
610
  position: relative;
611
  z-index: 510;
612
  > .el-alert {
613
    margin-bottom: 10px;
614
  }
615
}
556 616
</style>

+ 16 - 12
src/views/modules/admin/meeting.vue

@ -1,11 +1,12 @@
1 1
<template>
2 2
  <div class="ll-content" v-loading="loading">
3
    <h1 >{{meetingData.nameCn}}</h1>
3
    <h1>{{meetingData.nameCn}}</h1>
4 4
    <div class="box">
5 5
      <img :src="imageNull" class="bgMeeting" />
6 6
      <el-form label-width="200px" style="margin-top:20px">
7
        <!-- <el-form-item label="会议名称" class="fz_30" style="margin-top:50px">{{meetingData.nameCn}}</el-form-item> -->
8
        <el-form-item label="会议时间">{{meetingData.startTime}}</el-form-item>
7
        <el-form-item
8
          label="开始时间"
9
        >{{meetingData.startTime}}&nbsp;&nbsp;&nbsp;&nbsp;结束时间 {{meetingData.endTime}}</el-form-item>
9 10
        <el-form-item label="举办地点">{{meetingData.address}}</el-form-item>
10 11
        <el-form-item label="涉及学科">
11 12
          <el-tag v-for="(item) in subjectsList" :key="item" style="margin-right:10px">{{item}}</el-tag>
@ -14,8 +15,8 @@
14 15
          <el-tag v-for="(item) in industries" :key="item" style="margin-right:10px">{{item}}</el-tag>
15 16
        </el-form-item>
16 17
        <el-form-item label="会议负责人">{{this.meetingData.serviceName}}</el-form-item>
17
        <el-form-item label="会议介绍">
18
          <div class="introduction">{{this.meetingData.introduction}}</div>
18
        <el-form-item label="会议介绍" style="height:150px;overflow: hidden; ">
19
          <div class="introduction" v-html="this.meetingData.introduction"></div>
19 20
        </el-form-item>
20 21
      </el-form>
21 22
      <div class="code"></div>
@ -51,7 +52,8 @@ export default {
51 52
  },
52 53
  beforeMount() {},
53 54
  created() {
54
    this.demo()
55
    this.demo();
56
    window.console.log(this.dataForm.introduction);
55 57
  },
56 58
  activated() {
57 59
    this.getMeeting();
@ -67,27 +69,24 @@ export default {
67 69
          params: this.$http.adornParams()
68 70
        }).then(res => {
69 71
          if (res.data && res.data.code === 0) {
70
            window.console.log(res);
71 72
            this.meetingData = res.data.meeting;
72 73
            this.industries = res.data.meeting.industries.split(",");
73
            // this.industries = set(this.industries);
74 74
            this.image = res.data.meeting.titlePicture;
75 75
            this.subjectsList = res.data.meeting.subjects.split(",");
76
            // this.subjectsList = set(this.subjectsList);
77 76
            this.loading = false;
78 77
          }
79 78
        });
80 79
      }
81 80
    },
82
    demo(){
83
      let ll = set(this.subjectsList)
81
    demo() {
82
      // let ll = set(this.subjectsList);
84 83
    }
85 84
  }
86 85
};
87 86
</script>
88 87
<style scoped lang='scss'>
89 88
.ll-content {
90
  height: 100%;
89
  height: 90%;
91 90
  width: 100%;
92 91
  .box {
93 92
    position: relative;
@ -104,6 +103,11 @@ export default {
104 103
    }
105 104
    .introduction {
106 105
      width: 400px;
106
      overflow: hidden;
107
      text-overflow: ellipsis;
108
      display: -webkit-box;
109
      -webkit-line-clamp: 6;
110
      -webkit-box-orient: vertical;
107 111
    }
108 112
  }
109 113
}

+ 13 - 15
src/views/modules/admin/member-add-or-update.vue

@ -11,15 +11,6 @@
11 11
      @keyup.enter.native="dataFormSubmit()"
12 12
      label-width="80px"
13 13
    >
14
      <el-form-item label="姓名" prop="truename">
15
        <el-input v-model="dataForm.truename" placeholder="姓名"></el-input>
16
      </el-form-item>
17
      <el-form-item label="用户名" prop="username">
18
        <el-input v-model="dataForm.username" placeholder="手机号"></el-input>
19
      </el-form-item>
20
      <el-form-item label="密码" prop="password">
21
        <el-input v-model="dataForm.password" placeholder="密码"></el-input>
22
      </el-form-item>
23 14
      <el-form-item label="头像" prop="titlePic">
24 15
        <!-- <el-input v-model="dataForm.titlePic" placeholder="头像"></el-input> -->
25 16
        <el-upload
@ -36,6 +27,15 @@
36 27
          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
37 28
        </el-upload>
38 29
      </el-form-item>
30
      <el-form-item label="姓名" prop="truename">
31
        <el-input v-model="dataForm.truename" placeholder="姓名"></el-input>
32
      </el-form-item>
33
      <el-form-item label="用户名" prop="username">
34
        <el-input v-model="dataForm.username" placeholder="手机号"></el-input>
35
      </el-form-item>
36
       <el-form-item label="联系电话" prop="phone">
37
        <el-input v-model="dataForm.phone" placeholder="联系电话"></el-input>
38
      </el-form-item>
39 39
      <el-form-item label="所属机构" prop="organization">
40 40
        <el-input v-model="dataForm.organization" placeholder="所属机构"></el-input>
41 41
      </el-form-item>
@ -46,16 +46,14 @@
46 46
        <el-input v-model="dataForm.jobTitle" placeholder="职称"></el-input>
47 47
      </el-form-item>
48 48
49
      <el-form-item label="电话" prop="phone">
50
        <el-input v-model="dataForm.phone" placeholder="电话"></el-input>
51
      </el-form-item>
52
      <el-form-item label="邮箱" prop="email">
49
     
50
      <el-form-item label="邮箱" >
53 51
        <el-input v-model="dataForm.email" placeholder="邮箱"></el-input>
54 52
      </el-form-item>
55
      <el-form-item label="审核" prop="isCheck">
53
      <!-- <el-form-item label="审核" prop="isCheck">
56 54
        <el-radio v-model="dataForm.isCheck" :label="0">否</el-radio>
57 55
        <el-radio v-model="dataForm.isCheck" :label="1">是</el-radio>
58
      </el-form-item>
56
      </el-form-item> -->
59 57
    </el-form>
60 58
    <span slot="footer" class="dialog-footer">
61 59
      <el-button @click="visible = false">取消</el-button>

+ 1 - 2
src/views/modules/admin/paper-add-or-update.vue

@ -42,7 +42,7 @@
42 42
            type="success"
43 43
            @click="submitUpload"
44 44
          >上传到服务器</el-button>
45
          <div slot="tip" class="el-upload__tip" style="color:red">只能上传 pdf doc docx 文件</div>
45
          <div slot="tip" class="el-upload__tip" style="color:red">只能上传 pdf doc docx 文件,上传大小为4M</div>
46 46
        </el-upload>
47 47
      </el-form-item>
48 48
    </el-form>
@ -52,7 +52,6 @@
52 52
    </span>
53 53
  </el-dialog>
54 54
</template>
55
56 55
<script>
57 56
export default {
58 57
  data() {

+ 13 - 3
src/views/modules/admin/paperrequire-add-or-update.vue

@ -17,13 +17,14 @@
17 17
        ></el-date-picker>
18 18
      </el-form-item>
19 19
      <el-form-item label="要求" prop="content">
20
        <el-input
20
        <!-- <el-input
21 21
          type="textarea"
22 22
          :rows="2"
23 23
          placeholder="请输入内容"
24 24
          v-model="dataForm.content"
25 25
          :autosize="{ minRows: 10, maxRows: 30}"
26
        ></el-input>
26
        ></el-input>-->
27
        <u-e @ue="getCotent" ref="ue">{{this.dataForm.content}}</u-e>
27 28
      </el-form-item>
28 29
    </el-form>
29 30
    <span slot="footer" class="dialog-footer">
@ -32,8 +33,8 @@
32 33
    </span>
33 34
  </el-dialog>
34 35
</template>
35
36 36
<script>
37
import uE from "../../../components/ue/ueditor";
37 38
export default {
38 39
  data() {
39 40
    return {
@ -53,6 +54,9 @@ export default {
53 54
      loading: true
54 55
    };
55 56
  },
57
  components: {
58
    uE
59
  },
56 60
  methods: {
57 61
    init(id) {
58 62
      this.dataForm.id = id || 0;
@ -85,6 +89,7 @@ export default {
85 89
    },
86 90
    // 表单提交
87 91
    dataFormSubmit() {
92
      this.$refs.ue.getContent();
88 93
      this.$refs["dataForm"].validate(valid => {
89 94
        if (valid) {
90 95
          this.$http({
@ -114,6 +119,11 @@ export default {
114 119
          });
115 120
        }
116 121
      });
122
    },
123
    //获取富文本框内容
124
    getCotent(data) {
125
      this.dataForm.content = data;
126
      // this.$message('保存成功')
117 127
    }
118 128
  }
119 129
};

+ 2 - 1
src/views/modules/admin/signinfo-add-or-update.vue

@ -175,7 +175,8 @@ export default {
175 175
              servername: this.dataForm.servername,
176 176
              isPay: this.dataForm.isPay,
177 177
              badge: this.dataForm.badge,
178
              note: this.dataForm.note
178
              note: this.dataForm.note,
179
              money:this.dataForm.money
179 180
            })
180 181
          }).then(({ data }) => {
181 182
            if (data && data.code === 0) {

+ 21 - 16
src/views/modules/admin/typesoffee.vue

@ -1,10 +1,12 @@
1 1
<template>
2 2
  <div class="typesoffeeContent" v-loading="loading">
3
    <el-form :model="dataForm">
3
    <el-form :model="dataForm" :rules="rules">
4 4
      <el-form-item label="注册费用信息"></el-form-item>
5
      <el-form-item>
5
      <el-form-item style="display:inline-block" prop="name">
6 6
        <el-input style="width:400px" placeholder="请输入级别类型" v-model="dataForm.name"></el-input>
7
        <el-input style="width:400px" placeholder="请输入具体金额(单位:元)" v-model="dataForm.money"></el-input>
7
      </el-form-item>
8
      <el-form-item prop="money" style="display:inline-block">
9
        <el-input style="width:400px" placeholder="请输入具体金额(单位:元)" v-model.number="dataForm.money"></el-input>
8 10
        <el-button style="width:180px" type="primary" @click="typesoffeeSave">添加</el-button>
9 11
      </el-form-item>
10 12
    </el-form>
@ -66,6 +68,11 @@ export default {
66 68
        name: "",
67 69
        money: ""
68 70
      },
71
      rules: {
72
        money: [{ type: "number", message: "金额为数字" }],
73
        name: [{ required: true, message: "请输入级别类型", trigger: "blur" }]
74
      },
75
69 76
      pageIndex: 1,
70 77
      pageSize: 10,
71 78
      totalPage: 0,
@ -83,9 +90,10 @@ export default {
83 90
  components: {},
84 91
  computed: {},
85 92
  beforeMount() {},
86
  created() {},
87
  activated() {
93
  created() {
88 94
    this.getDataList();
95
  },
96
  activated() {
89 97
    this.getMoneyaccount();
90 98
  },
91 99
  methods: {
@ -108,11 +116,12 @@ export default {
108 116
            onClose: () => {}
109 117
          });
110 118
          this.getDataList();
111
          // this.dataForm.name = "";
112
          // this.dataForm.money = "";
119
          this.moneyaccountList.name = "";
113 120
        } else {
114 121
          this.$message.error(data.msg);
115 122
        }
123
        this.dataForm.name = "";
124
        this.dataForm.money = "";
116 125
      });
117 126
    },
118 127
    // 获取数据
@ -138,15 +147,11 @@ export default {
138 147
        : this.dataListSelections.map(item => {
139 148
            return item.id;
140 149
          });
141
      this.$confirm(
142
        `确定删除?`,
143
        "提示",
144
        {
145
          confirmButtonText: "确定",
146
          cancelButtonText: "取消",
147
          type: "warning"
148
        }
149
      ).then(() => {
150
      this.$confirm(`确定删除?`, "提示", {
151
        confirmButtonText: "确定",
152
        cancelButtonText: "取消",
153
        type: "warning"
154
      }).then(() => {
150 155
        this.$http({
151 156
          url: this.$http.adornUrl("/admin/typesoffee/delete"),
152 157
          method: "post",

+ 6 - 5
static/config/index-prod.js

@ -1,14 +1,15 @@
1 1
/**
2 2
 * 生产环境
3 3
 */
4
;(function () {
4
;
5
(function () {
5 6
  window.SITE_CONFIG = {};
6 7
7 8
  // api接口请求地址
8
  window.SITE_CONFIG['baseUrl'] =  'http://192.168.3.233:8002/renren-fast';
9
  window.SITE_CONFIG['baseUrl'] = 'http://192.168.3.233:8002/renren-fast';
9 10
10 11
  // cdn地址 = 域名 + 版本号
11
  window.SITE_CONFIG['domain']  = './'; // 域名
12
  window.SITE_CONFIG['version'] = '';   // 版本号(年月日时分)
13
  window.SITE_CONFIG['cdnUrl']  = window.SITE_CONFIG.domain + window.SITE_CONFIG.version;
12
  window.SITE_CONFIG['domain'] = './'; // 域名
13
  window.SITE_CONFIG['version'] = ''; // 版本号(年月日时分)
14
  window.SITE_CONFIG['cdnUrl'] = window.SITE_CONFIG.domain + window.SITE_CONFIG.version;
14 15
})();

+ 1 - 1
static/config/index.js

@ -10,5 +10,5 @@
10 10
  // cdn地址 = 域名 + 版本号
11 11
  window.SITE_CONFIG['domain']  = './'; // 域名
12 12
  window.SITE_CONFIG['version'] = '';   // 版本号(年月日时分)
13
  window.SITE_CONFIG['cdnUrl']  = window.SITE_CONFIG.domain + window.SITE_CONFIG.version;
13
14 14
})();

+ 463 - 454
static/plugins/ueditor-1.4.3.3/ueditor.config.js

@ -10,488 +10,497 @@
10 10
 **************************提示********************************/
11 11
12 12
(function () {
13
14
    /**
15
     * 编辑器资源文件根路径。它所表示的含义是:以编辑器实例化页面为当前路径,指向编辑器资源文件(即dialog等文件夹)的路径。
16
     * 鉴于很多同学在使用编辑器的时候出现的种种路径问题,此处强烈建议大家使用"相对于网站根目录的相对路径"进行配置。
17
     * "相对于网站根目录的相对路径"也就是以斜杠开头的形如"/myProject/ueditor/"这样的路径。
18
     * 如果站点中有多个不在同一层级的页面需要实例化编辑器,且引用了同一UEditor的时候,此处的URL可能不适用于每个页面的编辑器。
19
     * 因此,UEditor提供了针对不同页面的编辑器可单独配置的根路径,具体来说,在需要实例化编辑器的页面最顶部写上如下代码即可。当然,需要令此处的URL等于对应的配置。
20
     * window.UEDITOR_HOME_URL = "/xxxx/xxxx/";
21
     */
22
    var URL = window.UEDITOR_HOME_URL || getUEBasePath();
23
24
    /**
25
     * 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
26
     */
27
    window.UEDITOR_CONFIG = {
28
29
        //为编辑器实例添加一个路径,这个不能被注释
30
        UEDITOR_HOME_URL: URL
31
32
        // 服务器统一请求接口路径
33
        , serverUrl: URL + "jsp/controller.jsp"
34
35
        //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义
36
        , toolbars: [[
37
            'fullscreen', 'source', '|', 'undo', 'redo', '|',
38
            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
39
            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
40
            'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
41
            'directionalityltr', 'directionalityrtl', 'indent', '|',
42
            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
43
            'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
44
            'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
45
            'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
46
            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
47
            'print', 'preview', 'searchreplace', 'drafts', 'help'
48
        ]]
49
        //当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
50
        //,labelMap:{
51
        //    'anchor':'', 'undo':''
52
        //}
53
54
        //语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
55
        //lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
56
        //,lang:"zh-cn"
57
        //,langPath:URL +"lang/"
58
59
        //主题配置项,默认是default。有需要的话也可以使用如下这样的方式来自动多主题切换,当然,前提条件是themes文件夹下存在对应的主题文件:
60
        //现有如下皮肤:default
61
        //,theme:'default'
62
        //,themePath:URL +"themes/"
63
64
        //,zIndex : 900     //编辑器层级的基数,默认是900
65
66
        //针对getAllHtml方法,会在对应的head标签中增加该编码设置。
67
        //,charset:"utf-8"
68
69
        //若实例化编辑器的页面手动修改的domain,此处需要设置为true
70
        //,customDomain:false
71
72
        //常用配置项目
73
        //,isShow : true    //默认显示编辑器
74
75
        //,textarea:'editorValue' // 提交表单时,服务器获取编辑器提交内容的所用的参数,多实例时可以给容器name属性,会将name给定的值最为每个实例的键值,不用每次实例化的时候都设置这个值
76
77
        //,initialContent:'欢迎使用ueditor!'    //初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
78
79
        //,autoClearinitialContent:true //是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了
80
81
        //,focus:false //初始化时,是否让编辑器获得焦点true或false
82
83
        //如果自定义,最好给p标签如下的行高,要不输入中文时,会有跳动感
84
        //,initialStyle:'p{line-height:1em}'//编辑器层级的基数,可以用来改变字体等
85
86
        //,iframeCssUrl: URL + '/themes/iframe.css' //给编辑区域的iframe引入一个css文件
87
88
        //indentValue
89
        //首行缩进距离,默认是2em
90
        //,indentValue:'2em'
91
92
        //,initialFrameWidth:1000  //初始化编辑器宽度,默认1000
93
        //,initialFrameHeight:320  //初始化编辑器高度,默认320
94
95
        //,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false
96
97
        //,autoClearEmptyNode : true //getContent时,是否删除空的inlineElement节点(包括嵌套的情况)
98
99
        //启用自动保存
100
        //,enableAutoSave: true
101
        //自动保存间隔时间, 单位ms
102
        //,saveInterval: 500
103
104
        //,fullscreen : false //是否开启初始化时即全屏,默认关闭
105
106
        //,imagePopup:true      //图片操作的浮层开关,默认打开
107
108
        //,autoSyncData:true //自动同步编辑器要提交的数据
109
        //,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
110
111
        //粘贴只保留标签,去除标签所有属性
112
        //,retainOnlyLabelPasted: false
113
114
        //,pasteplain:false  //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
115
        //纯文本粘贴模式下的过滤规则
116
        //'filterTxtRules' : function(){
117
        //    function transP(node){
118
        //        node.tagName = 'p';
119
        //        node.setStyle();
120
        //    }
121
        //    return {
122
        //        //直接删除及其字节点内容
123
        //        '-' : 'script style object iframe embed input select',
124
        //        'p': {$:{}},
125
        //        'br':{$:{}},
126
        //        'div':{'$':{}},
127
        //        'li':{'$':{}},
128
        //        'caption':transP,
129
        //        'th':transP,
130
        //        'tr':transP,
131
        //        'h1':transP,'h2':transP,'h3':transP,'h4':transP,'h5':transP,'h6':transP,
132
        //        'td':function(node){
133
        //            //没有内容的td直接删掉
134
        //            var txt = !!node.innerText();
135
        //            if(txt){
136
        //                node.parentNode.insertAfter(UE.uNode.createText(' &nbsp; &nbsp;'),node);
137
        //            }
138
        //            node.parentNode.removeChild(node,node.innerText())
139
        //        }
140
        //    }
141
        //}()
142
143
        //,allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串
144
145
        //insertorderedlist
146
        //有序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
147
        //,'insertorderedlist':{
148
        //      //自定的样式
149
        //        'num':'1,2,3...',
150
        //        'num1':'1),2),3)...',
151
        //        'num2':'(1),(2),(3)...',
152
        //        'cn':'一,二,三....',
153
        //        'cn1':'一),二),三)....',
154
        //        'cn2':'(一),(二),(三)....',
155
        //     //系统自带
156
        //     'decimal' : '' ,         //'1,2,3...'
157
        //     'lower-alpha' : '' ,    // 'a,b,c...'
158
        //     'lower-roman' : '' ,    //'i,ii,iii...'
159
        //     'upper-alpha' : '' , lang   //'A,B,C'
160
        //     'upper-roman' : ''      //'I,II,III...'
161
        //}
162
163
        //insertunorderedlist
164
        //无序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
165
        //,insertunorderedlist : { //自定的样式
166
        //    'dash' :'— 破折号', //-破折号
167
        //    'dot':' 。 小圆圈', //系统自带
168
        //    'circle' : '',  // '○ 小圆圈'
169
        //    'disc' : '',    // '● 小圆点'
170
        //    'square' : ''   //'■ 小方块'
171
        //}
172
        //,listDefaultPaddingLeft : '30'//默认的左边缩进的基数倍
173
        //,listiconpath : 'http://bs.baidu.com/listicon/'//自定义标号的路径
174
        //,maxListLevel : 3 //限制可以tab的级数, 设置-1为不限制
175
176
        //,autoTransWordToList:false  //禁止word中粘贴进来的列表自动变成列表标签
177
178
        //fontfamily
179
        //字体设置 label留空支持多语言自动切换,若配置,则以配置值为准
180
        //,'fontfamily':[
181
        //    { label:'',name:'songti',val:'宋体,SimSun'},
182
        //    { label:'',name:'kaiti',val:'楷体,楷体_GB2312, SimKai'},
183
        //    { label:'',name:'yahei',val:'微软雅黑,Microsoft YaHei'},
184
        //    { label:'',name:'heiti',val:'黑体, SimHei'},
185
        //    { label:'',name:'lishu',val:'隶书, SimLi'},
186
        //    { label:'',name:'andaleMono',val:'andale mono'},
187
        //    { label:'',name:'arial',val:'arial, helvetica,sans-serif'},
188
        //    { label:'',name:'arialBlack',val:'arial black,avant garde'},
189
        //    { label:'',name:'comicSansMs',val:'comic sans ms'},
190
        //    { label:'',name:'impact',val:'impact,chicago'},
191
        //    { label:'',name:'timesNewRoman',val:'times new roman'}
192
        //]
193
194
        //fontsize
195
        //字号
196
        //,'fontsize':[10, 11, 12, 14, 16, 18, 20, 24, 36]
197
198
        //paragraph
199
        //段落格式 值留空时支持多语言自动识别,若配置,则以配置值为准
200
        //,'paragraph':{'p':'', 'h1':'', 'h2':'', 'h3':'', 'h4':'', 'h5':'', 'h6':''}
201
202
        //rowspacingtop
203
        //段间距 值和显示的名字相同
204
        //,'rowspacingtop':['5', '10', '15', '20', '25']
205
206
        //rowspacingBottom
207
        //段间距 值和显示的名字相同
208
        //,'rowspacingbottom':['5', '10', '15', '20', '25']
209
210
        //lineheight
211
        //行内间距 值和显示的名字相同
212
        //,'lineheight':['1', '1.5','1.75','2', '3', '4', '5']
213
214
        //customstyle
215
        //自定义样式,不支持国际化,此处配置值即可最后显示值
216
        //block的元素是依据设置段落的逻辑设置的,inline的元素依据BIU的逻辑设置
217
        //尽量使用一些常用的标签
218
        //参数说明
219
        //tag 使用的标签名字
220
        //label 显示的名字也是用来标识不同类型的标识符,注意这个值每个要不同,
221
        //style 添加的样式
222
        //每一个对象就是一个自定义的样式
223
        //,'customstyle':[
224
        //    {tag:'h1', name:'tc', label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:center;margin:0 0 20px 0;'},
225
        //    {tag:'h1', name:'tl',label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;margin:0 0 10px 0;'},
226
        //    {tag:'span',name:'im', label:'', style:'font-style:italic;font-weight:bold'},
227
        //    {tag:'span',name:'hi', label:'', style:'font-style:italic;font-weight:bold;color:rgb(51, 153, 204)'}
228
        //]
229
230
        //打开右键菜单功能
231
        //,enableContextMenu: true
232
        //右键菜单的内容,可以参考plugins/contextmenu.js里边的默认菜单的例子,label留空支持国际化,否则以此配置为准
233
        //,contextMenu:[
234
        //    {
235
        //        label:'',       //显示的名称
236
        //        cmdName:'selectall',//执行的command命令,当点击这个右键菜单时
237
        //        //exec可选,有了exec就会在点击时执行这个function,优先级高于cmdName
238
        //        exec:function () {
239
        //            //this是当前编辑器的实例
240
        //            //this.ui._dialogs['inserttableDialog'].open();
241
        //        }
242
        //    }
243
        //]
244
245
        //快捷菜单
246
        //,shortcutMenu:["fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"]
247
248
        //elementPathEnabled
249
        //是否启用元素路径,默认是显示
250
        //,elementPathEnabled : true
251
252
        //wordCount
253
        //,wordCount:true          //是否开启字数统计
254
        //,maximumWords:10000       //允许的最大字符数
255
        //字数统计提示,{#count}代表当前字数,{#leave}代表还可以输入多少字符数,留空支持多语言自动切换,否则按此配置显示
256
        //,wordCountMsg:''   //当前已输入 {#count} 个字符,您还可以输入{#leave} 个字符
257
        //超出字数限制提示  留空支持多语言自动切换,否则按此配置显示
258
        //,wordOverFlowMsg:''    //<span style="color:red;">你输入的字符个数已经超出最大允许值,服务器可能会拒绝保存!</span>
259
260
        //tab
261
        //点击tab键时移动的距离,tabSize倍数,tabNode什么字符做为单位
262
        //,tabSize:4
263
        //,tabNode:'&nbsp;'
264
265
        //removeFormat
266
        //清除格式时可以删除的标签和属性
267
        //removeForamtTags标签
268
        //,removeFormatTags:'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var'
269
        //removeFormatAttributes属性
270
        //,removeFormatAttributes:'class,style,lang,width,height,align,hspace,valign'
271
272
        //undo
273
        //可以最多回退的次数,默认20
274
        //,maxUndoCount:20
275
        //当输入的字符数超过该值时,保存一次现场
276
        //,maxInputCount:1
277
278
        //autoHeightEnabled
279
        // 是否自动长高,默认true
280
        //,autoHeightEnabled:true
281
282
        //scaleEnabled
283
        //是否可以拉伸长高,默认true(当开启时,自动长高失效)
284
        //,scaleEnabled:false
285
        //,minFrameWidth:800    //编辑器拖动时最小宽度,默认800
286
        //,minFrameHeight:220  //编辑器拖动时最小高度,默认220
287
288
        //autoFloatEnabled
289
        //是否保持toolbar的位置不动,默认true
290
        //,autoFloatEnabled:true
291
        //浮动时工具栏距离浏览器顶部的高度,用于某些具有固定头部的页面
292
        //,topOffset:30
293
        //编辑器底部距离工具栏高度(如果参数大于等于编辑器高度,则设置无效)
294
        //,toolbarTopOffset:400
295
296
        //设置远程图片是否抓取到本地保存
297
        //,catchRemoteImageEnable: true //设置是否抓取远程图片
298
299
        //pageBreakTag
300
        //分页标识符,默认是_ueditor_page_break_tag_
301
        //,pageBreakTag:'_ueditor_page_break_tag_'
302
303
        //autotypeset
304
        //自动排版参数
305
        //,autotypeset: {
306
        //    mergeEmptyline: true,           //合并空行
307
        //    removeClass: true,              //去掉冗余的class
308
        //    removeEmptyline: false,         //去掉空行
309
        //    textAlign:"left",               //段落的排版方式,可以是 left,right,center,justify 去掉这个属性表示不执行排版
310
        //    imageBlockLine: 'center',       //图片的浮动方式,独占一行剧中,左右浮动,默认: center,left,right,none 去掉这个属性表示不执行排版
311
        //    pasteFilter: false,             //根据规则过滤没事粘贴进来的内容
312
        //    clearFontSize: false,           //去掉所有的内嵌字号,使用编辑器默认的字号
313
        //    clearFontFamily: false,         //去掉所有的内嵌字体,使用编辑器默认的字体
314
        //    removeEmptyNode: false,         // 去掉空节点
315
        //    //可以去掉的标签
316
        //    removeTagNames: {标签名字:1},
317
        //    indent: false,                  // 行首缩进
318
        //    indentValue : '2em',            //行首缩进的大小
319
        //    bdc2sb: false,
320
        //    tobdc: false
321
        //}
322
323
        //tableDragable
324
        //表格是否可以拖拽
325
        //,tableDragable: true
326
327
328
329
        //sourceEditor
330
        //源码的查看方式,codemirror 是代码高亮,textarea是文本框,默认是codemirror
331
        //注意默认codemirror只能在ie8+和非ie中使用
332
        //,sourceEditor:"codemirror"
333
        //如果sourceEditor是codemirror,还用配置一下两个参数
334
        //codeMirrorJsUrl js加载的路径,默认是 URL + "third-party/codemirror/codemirror.js"
335
        //,codeMirrorJsUrl:URL + "third-party/codemirror/codemirror.js"
336
        //codeMirrorCssUrl css加载的路径,默认是 URL + "third-party/codemirror/codemirror.css"
337
        //,codeMirrorCssUrl:URL + "third-party/codemirror/codemirror.css"
338
        //编辑器初始化完成后是否进入源码模式,默认为否。
339
        //,sourceEditorFirst:false
340
341
        //iframeUrlMap
342
        //dialog内容的路径 ~会被替换成URL,垓属性一旦打开,将覆盖所有的dialog的默认路径
343
        //,iframeUrlMap:{
344
        //    'anchor':'~/dialogs/anchor/anchor.html',
345
        //}
346
347
        //allowLinkProtocol 允许的链接地址,有这些前缀的链接地址不会自动添加http
348
        //, allowLinkProtocols: ['http:', 'https:', '#', '/', 'ftp:', 'mailto:', 'tel:', 'git:', 'svn:']
349
350
        //webAppKey 百度应用的APIkey,每个站长必须首先去百度官网注册一个key后方能正常使用app功能,注册介绍,http://app.baidu.com/static/cms/getapikey.html
351
        //, webAppKey: ""
352
353
        //默认过滤规则相关配置项目
354
        //,disabledTableInTable:true  //禁止表格嵌套
355
        //,allowDivTransToP:true      //允许进入编辑器的div标签自动变成p标签
356
        //,rgb2Hex:true               //默认产出的数据中的color自动从rgb格式变成16进制格式
357
358
		// xss 过滤是否开启,inserthtml等操作
359
		,xssFilterRules: true
360
		//input xss过滤
361
		,inputXssFilter: true
362
		//output xss过滤
363
		,outputXssFilter: true
364
		// xss过滤白名单 名单来源: https://raw.githubusercontent.com/leizongmin/js-xss/master/lib/default.js
365
		,whitList: {
366
			a:      ['target', 'href', 'title', 'class', 'style'],
367
			abbr:   ['title', 'class', 'style'],
368
			address: ['class', 'style'],
369
			area:   ['shape', 'coords', 'href', 'alt'],
370
			article: [],
371
			aside:  [],
372
			audio:  ['autoplay', 'controls', 'loop', 'preload', 'src', 'class', 'style'],
373
			b:      ['class', 'style'],
374
			bdi:    ['dir'],
375
			bdo:    ['dir'],
376
			big:    [],
377
			blockquote: ['cite', 'class', 'style'],
378
			br:     [],
379
			caption: ['class', 'style'],
380
			center: [],
381
			cite:   [],
382
			code:   ['class', 'style'],
383
			col:    ['align', 'valign', 'span', 'width', 'class', 'style'],
384
			colgroup: ['align', 'valign', 'span', 'width', 'class', 'style'],
385
			dd:     ['class', 'style'],
386
			del:    ['datetime'],
387
			details: ['open'],
388
			div:    ['class', 'style'],
389
			dl:     ['class', 'style'],
390
			dt:     ['class', 'style'],
391
			em:     ['class', 'style'],
392
			font:   ['color', 'size', 'face'],
393
			footer: [],
394
			h1:     ['class', 'style'],
395
			h2:     ['class', 'style'],
396
			h3:     ['class', 'style'],
397
			h4:     ['class', 'style'],
398
			h5:     ['class', 'style'],
399
			h6:     ['class', 'style'],
400
			header: [],
401
			hr:     [],
402
			i:      ['class', 'style'],
403
			img:    ['src', 'alt', 'title', 'width', 'height', 'id', '_src', 'loadingclass', 'class', 'data-latex'],
404
			ins:    ['datetime'],
405
			li:     ['class', 'style'],
406
			mark:   [],
407
			nav:    [],
408
			ol:     ['class', 'style'],
409
			p:      ['class', 'style'],
410
			pre:    ['class', 'style'],
411
			s:      [],
412
			section:[],
413
			small:  [],
414
			span:   ['class', 'style'],
415
			sub:    ['class', 'style'],
416
			sup:    ['class', 'style'],
417
			strong: ['class', 'style'],
418
			table:  ['width', 'border', 'align', 'valign', 'class', 'style'],
419
			tbody:  ['align', 'valign', 'class', 'style'],
420
			td:     ['width', 'rowspan', 'colspan', 'align', 'valign', 'class', 'style'],
421
			tfoot:  ['align', 'valign', 'class', 'style'],
422
			th:     ['width', 'rowspan', 'colspan', 'align', 'valign', 'class', 'style'],
423
			thead:  ['align', 'valign', 'class', 'style'],
424
			tr:     ['rowspan', 'align', 'valign', 'class', 'style'],
425
			tt:     [],
426
			u:      [],
427
			ul:     ['class', 'style'],
428
			video:  ['autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style']
429
		}
430
    };
431
432
    function getUEBasePath(docUrl, confUrl) {
433
434
        return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath());
435
13
  
14
  /**
15
   * 编辑器资源文件根路径。它所表示的含义是:以编辑器实例化页面为当前路径,指向编辑器资源文件(即dialog等文件夹)的路径。
16
   * 鉴于很多同学在使用编辑器的时候出现的种种路径问题,此处强烈建议大家使用"相对于网站根目录的相对路径"进行配置。
17
   * "相对于网站根目录的相对路径"也就是以斜杠开头的形如"/myProject/ueditor/"这样的路径。
18
   * 如果站点中有多个不在同一层级的页面需要实例化编辑器,且引用了同一UEditor的时候,此处的URL可能不适用于每个页面的编辑器。
19
   * 因此,UEditor提供了针对不同页面的编辑器可单独配置的根路径,具体来说,在需要实例化编辑器的页面最顶部写上如下代码即可。当然,需要令此处的URL等于对应的配置。
20
   * window.UEDITOR_HOME_URL = "/xxxx/xxxx/";
21
   */
22
  window.UEDITOR_HOME_URL = "static/plugins/ueditor-1.4.3.3/";
23
  var URL = window.UEDITOR_HOME_URL || getUEBasePath();
24
25
  /**
26
   * 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
27
   */
28
  window.UEDITOR_CONFIG = {
29
30
    //为编辑器实例添加一个路径,这个不能被注释
31
    UEDITOR_HOME_URL: URL
32
33
      // 服务器统一请求接口路径
34
      ,
35
    serverUrl: URL + "jsp/controller.jsp"
36
37
      //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义
38
      ,
39
    toolbars: [
40
        [
41
          'fullscreen', 'source', '|', 'undo', 'redo', '|',
42
          'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
43
          'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
44
          'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
45
          'directionalityltr', 'directionalityrtl', 'indent', '|',
46
          'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
47
          'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
48
          'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
49
          'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
50
          'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
51
          'print', 'preview', 'searchreplace', 'drafts', 'help'
52
        ]
53
      ]
54
      //当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
55
      //,labelMap:{
56
      //    'anchor':'', 'undo':''
57
      //}
58
59
      //语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
60
      //lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
61
      //,lang:"zh-cn"
62
      //,langPath:URL +"lang/"
63
64
      //主题配置项,默认是default。有需要的话也可以使用如下这样的方式来自动多主题切换,当然,前提条件是themes文件夹下存在对应的主题文件:
65
      //现有如下皮肤:default
66
      //,theme:'default'
67
      //,themePath:URL +"themes/"
68
69
      //,zIndex : 900     //编辑器层级的基数,默认是900
70
71
      //针对getAllHtml方法,会在对应的head标签中增加该编码设置。
72
      //,charset:"utf-8"
73
74
      //若实例化编辑器的页面手动修改的domain,此处需要设置为true
75
      //,customDomain:false
76
77
      //常用配置项目
78
      //,isShow : true    //默认显示编辑器
79
80
      //,textarea:'editorValue' // 提交表单时,服务器获取编辑器提交内容的所用的参数,多实例时可以给容器name属性,会将name给定的值最为每个实例的键值,不用每次实例化的时候都设置这个值
81
82
      //,initialContent:'欢迎使用ueditor!'    //初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
83
84
      //,autoClearinitialContent:true //是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了
85
86
      //,focus:false //初始化时,是否让编辑器获得焦点true或false
87
88
      //如果自定义,最好给p标签如下的行高,要不输入中文时,会有跳动感
89
      //,initialStyle:'p{line-height:1em}'//编辑器层级的基数,可以用来改变字体等
90
91
      //,iframeCssUrl: URL + '/themes/iframe.css' //给编辑区域的iframe引入一个css文件
92
93
      //indentValue
94
      //首行缩进距离,默认是2em
95
      //,indentValue:'2em'
96
97
      //,initialFrameWidth:1000  //初始化编辑器宽度,默认1000
98
      //,initialFrameHeight:320  //初始化编辑器高度,默认320
99
100
      //,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false
101
102
      //,autoClearEmptyNode : true //getContent时,是否删除空的inlineElement节点(包括嵌套的情况)
103
104
      //启用自动保存
105
      //,enableAutoSave: true
106
      //自动保存间隔时间, 单位ms
107
      //,saveInterval: 500
108
109
      //,fullscreen : false //是否开启初始化时即全屏,默认关闭
110
111
      //,imagePopup:true      //图片操作的浮层开关,默认打开
112
113
      //,autoSyncData:true //自动同步编辑器要提交的数据
114
      //,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
115
116
      //粘贴只保留标签,去除标签所有属性
117
      //,retainOnlyLabelPasted: false
118
119
      //,pasteplain:false  //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
120
      //纯文本粘贴模式下的过滤规则
121
      //'filterTxtRules' : function(){
122
      //    function transP(node){
123
      //        node.tagName = 'p';
124
      //        node.setStyle();
125
      //    }
126
      //    return {
127
      //        //直接删除及其字节点内容
128
      //        '-' : 'script style object iframe embed input select',
129
      //        'p': {$:{}},
130
      //        'br':{$:{}},
131
      //        'div':{'$':{}},
132
      //        'li':{'$':{}},
133
      //        'caption':transP,
134
      //        'th':transP,
135
      //        'tr':transP,
136
      //        'h1':transP,'h2':transP,'h3':transP,'h4':transP,'h5':transP,'h6':transP,
137
      //        'td':function(node){
138
      //            //没有内容的td直接删掉
139
      //            var txt = !!node.innerText();
140
      //            if(txt){
141
      //                node.parentNode.insertAfter(UE.uNode.createText(' &nbsp; &nbsp;'),node);
142
      //            }
143
      //            node.parentNode.removeChild(node,node.innerText())
144
      //        }
145
      //    }
146
      //}()
147
148
      //,allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串
149
150
      //insertorderedlist
151
      //有序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
152
      //,'insertorderedlist':{
153
      //      //自定的样式
154
      //        'num':'1,2,3...',
155
      //        'num1':'1),2),3)...',
156
      //        'num2':'(1),(2),(3)...',
157
      //        'cn':'一,二,三....',
158
      //        'cn1':'一),二),三)....',
159
      //        'cn2':'(一),(二),(三)....',
160
      //     //系统自带
161
      //     'decimal' : '' ,         //'1,2,3...'
162
      //     'lower-alpha' : '' ,    // 'a,b,c...'
163
      //     'lower-roman' : '' ,    //'i,ii,iii...'
164
      //     'upper-alpha' : '' , lang   //'A,B,C'
165
      //     'upper-roman' : ''      //'I,II,III...'
166
      //}
167
168
      //insertunorderedlist
169
      //无序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
170
      //,insertunorderedlist : { //自定的样式
171
      //    'dash' :'— 破折号', //-破折号
172
      //    'dot':' 。 小圆圈', //系统自带
173
      //    'circle' : '',  // '○ 小圆圈'
174
      //    'disc' : '',    // '● 小圆点'
175
      //    'square' : ''   //'■ 小方块'
176
      //}
177
      //,listDefaultPaddingLeft : '30'//默认的左边缩进的基数倍
178
      //,listiconpath : 'http://bs.baidu.com/listicon/'//自定义标号的路径
179
      //,maxListLevel : 3 //限制可以tab的级数, 设置-1为不限制
180
181
      //,autoTransWordToList:false  //禁止word中粘贴进来的列表自动变成列表标签
182
183
      //fontfamily
184
      //字体设置 label留空支持多语言自动切换,若配置,则以配置值为准
185
      //,'fontfamily':[
186
      //    { label:'',name:'songti',val:'宋体,SimSun'},
187
      //    { label:'',name:'kaiti',val:'楷体,楷体_GB2312, SimKai'},
188
      //    { label:'',name:'yahei',val:'微软雅黑,Microsoft YaHei'},
189
      //    { label:'',name:'heiti',val:'黑体, SimHei'},
190
      //    { label:'',name:'lishu',val:'隶书, SimLi'},
191
      //    { label:'',name:'andaleMono',val:'andale mono'},
192
      //    { label:'',name:'arial',val:'arial, helvetica,sans-serif'},
193
      //    { label:'',name:'arialBlack',val:'arial black,avant garde'},
194
      //    { label:'',name:'comicSansMs',val:'comic sans ms'},
195
      //    { label:'',name:'impact',val:'impact,chicago'},
196
      //    { label:'',name:'timesNewRoman',val:'times new roman'}
197
      //]
198
199
      //fontsize
200
      //字号
201
      //,'fontsize':[10, 11, 12, 14, 16, 18, 20, 24, 36]
202
203
      //paragraph
204
      //段落格式 值留空时支持多语言自动识别,若配置,则以配置值为准
205
      //,'paragraph':{'p':'', 'h1':'', 'h2':'', 'h3':'', 'h4':'', 'h5':'', 'h6':''}
206
207
      //rowspacingtop
208
      //段间距 值和显示的名字相同
209
      //,'rowspacingtop':['5', '10', '15', '20', '25']
210
211
      //rowspacingBottom
212
      //段间距 值和显示的名字相同
213
      //,'rowspacingbottom':['5', '10', '15', '20', '25']
214
215
      //lineheight
216
      //行内间距 值和显示的名字相同
217
      //,'lineheight':['1', '1.5','1.75','2', '3', '4', '5']
218
219
      //customstyle
220
      //自定义样式,不支持国际化,此处配置值即可最后显示值
221
      //block的元素是依据设置段落的逻辑设置的,inline的元素依据BIU的逻辑设置
222
      //尽量使用一些常用的标签
223
      //参数说明
224
      //tag 使用的标签名字
225
      //label 显示的名字也是用来标识不同类型的标识符,注意这个值每个要不同,
226
      //style 添加的样式
227
      //每一个对象就是一个自定义的样式
228
      //,'customstyle':[
229
      //    {tag:'h1', name:'tc', label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:center;margin:0 0 20px 0;'},
230
      //    {tag:'h1', name:'tl',label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;margin:0 0 10px 0;'},
231
      //    {tag:'span',name:'im', label:'', style:'font-style:italic;font-weight:bold'},
232
      //    {tag:'span',name:'hi', label:'', style:'font-style:italic;font-weight:bold;color:rgb(51, 153, 204)'}
233
      //]
234
235
      //打开右键菜单功能
236
      //,enableContextMenu: true
237
      //右键菜单的内容,可以参考plugins/contextmenu.js里边的默认菜单的例子,label留空支持国际化,否则以此配置为准
238
      //,contextMenu:[
239
      //    {
240
      //        label:'',       //显示的名称
241
      //        cmdName:'selectall',//执行的command命令,当点击这个右键菜单时
242
      //        //exec可选,有了exec就会在点击时执行这个function,优先级高于cmdName
243
      //        exec:function () {
244
      //            //this是当前编辑器的实例
245
      //            //this.ui._dialogs['inserttableDialog'].open();
246
      //        }
247
      //    }
248
      //]
249
250
      //快捷菜单
251
      //,shortcutMenu:["fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"]
252
253
      //elementPathEnabled
254
      //是否启用元素路径,默认是显示
255
      //,elementPathEnabled : true
256
257
      //wordCount
258
      //,wordCount:true          //是否开启字数统计
259
      //,maximumWords:10000       //允许的最大字符数
260
      //字数统计提示,{#count}代表当前字数,{#leave}代表还可以输入多少字符数,留空支持多语言自动切换,否则按此配置显示
261
      //,wordCountMsg:''   //当前已输入 {#count} 个字符,您还可以输入{#leave} 个字符
262
      //超出字数限制提示  留空支持多语言自动切换,否则按此配置显示
263
      //,wordOverFlowMsg:''    //<span style="color:red;">你输入的字符个数已经超出最大允许值,服务器可能会拒绝保存!</span>
264
265
      //tab
266
      //点击tab键时移动的距离,tabSize倍数,tabNode什么字符做为单位
267
      //,tabSize:4
268
      //,tabNode:'&nbsp;'
269
270
      //removeFormat
271
      //清除格式时可以删除的标签和属性
272
      //removeForamtTags标签
273
      //,removeFormatTags:'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var'
274
      //removeFormatAttributes属性
275
      //,removeFormatAttributes:'class,style,lang,width,height,align,hspace,valign'
276
277
      //undo
278
      //可以最多回退的次数,默认20
279
      //,maxUndoCount:20
280
      //当输入的字符数超过该值时,保存一次现场
281
      //,maxInputCount:1
282
283
      //autoHeightEnabled
284
      // 是否自动长高,默认true
285
      //,autoHeightEnabled:true
286
287
      //scaleEnabled
288
      //是否可以拉伸长高,默认true(当开启时,自动长高失效)
289
      //,scaleEnabled:false
290
      //,minFrameWidth:800    //编辑器拖动时最小宽度,默认800
291
      //,minFrameHeight:220  //编辑器拖动时最小高度,默认220
292
293
      //autoFloatEnabled
294
      //是否保持toolbar的位置不动,默认true
295
      //,autoFloatEnabled:true
296
      //浮动时工具栏距离浏览器顶部的高度,用于某些具有固定头部的页面
297
      //,topOffset:30
298
      //编辑器底部距离工具栏高度(如果参数大于等于编辑器高度,则设置无效)
299
      //,toolbarTopOffset:400
300
301
      //设置远程图片是否抓取到本地保存
302
      //,catchRemoteImageEnable: true //设置是否抓取远程图片
303
304
      //pageBreakTag
305
      //分页标识符,默认是_ueditor_page_break_tag_
306
      //,pageBreakTag:'_ueditor_page_break_tag_'
307
308
      //autotypeset
309
      //自动排版参数
310
      //,autotypeset: {
311
      //    mergeEmptyline: true,           //合并空行
312
      //    removeClass: true,              //去掉冗余的class
313
      //    removeEmptyline: false,         //去掉空行
314
      //    textAlign:"left",               //段落的排版方式,可以是 left,right,center,justify 去掉这个属性表示不执行排版
315
      //    imageBlockLine: 'center',       //图片的浮动方式,独占一行剧中,左右浮动,默认: center,left,right,none 去掉这个属性表示不执行排版
316
      //    pasteFilter: false,             //根据规则过滤没事粘贴进来的内容
317
      //    clearFontSize: false,           //去掉所有的内嵌字号,使用编辑器默认的字号
318
      //    clearFontFamily: false,         //去掉所有的内嵌字体,使用编辑器默认的字体
319
      //    removeEmptyNode: false,         // 去掉空节点
320
      //    //可以去掉的标签
321
      //    removeTagNames: {标签名字:1},
322
      //    indent: false,                  // 行首缩进
323
      //    indentValue : '2em',            //行首缩进的大小
324
      //    bdc2sb: false,
325
      //    tobdc: false
326
      //}
327
328
      //tableDragable
329
      //表格是否可以拖拽
330
      //,tableDragable: true
331
332
333
334
      //sourceEditor
335
      //源码的查看方式,codemirror 是代码高亮,textarea是文本框,默认是codemirror
336
      //注意默认codemirror只能在ie8+和非ie中使用
337
      //,sourceEditor:"codemirror"
338
      //如果sourceEditor是codemirror,还用配置一下两个参数
339
      //codeMirrorJsUrl js加载的路径,默认是 URL + "third-party/codemirror/codemirror.js"
340
      //,codeMirrorJsUrl:URL + "third-party/codemirror/codemirror.js"
341
      //codeMirrorCssUrl css加载的路径,默认是 URL + "third-party/codemirror/codemirror.css"
342
      //,codeMirrorCssUrl:URL + "third-party/codemirror/codemirror.css"
343
      //编辑器初始化完成后是否进入源码模式,默认为否。
344
      //,sourceEditorFirst:false
345
346
      //iframeUrlMap
347
      //dialog内容的路径 ~会被替换成URL,垓属性一旦打开,将覆盖所有的dialog的默认路径
348
      //,iframeUrlMap:{
349
      //    'anchor':'~/dialogs/anchor/anchor.html',
350
      //}
351
352
      //allowLinkProtocol 允许的链接地址,有这些前缀的链接地址不会自动添加http
353
      //, allowLinkProtocols: ['http:', 'https:', '#', '/', 'ftp:', 'mailto:', 'tel:', 'git:', 'svn:']
354
355
      //webAppKey 百度应用的APIkey,每个站长必须首先去百度官网注册一个key后方能正常使用app功能,注册介绍,http://app.baidu.com/static/cms/getapikey.html
356
      //, webAppKey: ""
357
358
      //默认过滤规则相关配置项目
359
      //,disabledTableInTable:true  //禁止表格嵌套
360
      //,allowDivTransToP:true      //允许进入编辑器的div标签自动变成p标签
361
      //,rgb2Hex:true               //默认产出的数据中的color自动从rgb格式变成16进制格式
362
363
      // xss 过滤是否开启,inserthtml等操作
364
      ,
365
    xssFilterRules: true
366
      //input xss过滤
367
      ,
368
    inputXssFilter: true
369
      //output xss过滤
370
      ,
371
    outputXssFilter: true
372
      // xss过滤白名单 名单来源: https://raw.githubusercontent.com/leizongmin/js-xss/master/lib/default.js
373
      ,
374
    whitList: {
375
      a: ['target', 'href', 'title', 'class', 'style'],
376
      abbr: ['title', 'class', 'style'],
377
      address: ['class', 'style'],
378
      area: ['shape', 'coords', 'href', 'alt'],
379
      article: [],
380
      aside: [],
381
      audio: ['autoplay', 'controls', 'loop', 'preload', 'src', 'class', 'style'],
382
      b: ['class', 'style'],
383
      bdi: ['dir'],
384
      bdo: ['dir'],
385
      big: [],
386
      blockquote: ['cite', 'class', 'style'],
387
      br: [],
388
      caption: ['class', 'style'],
389
      center: [],
390
      cite: [],
391
      code: ['class', 'style'],
392
      col: ['align', 'valign', 'span', 'width', 'class', 'style'],
393
      colgroup: ['align', 'valign', 'span', 'width', 'class', 'style'],
394
      dd: ['class', 'style'],
395
      del: ['datetime'],
396
      details: ['open'],
397
      div: ['class', 'style'],
398
      dl: ['class', 'style'],
399
      dt: ['class', 'style'],
400
      em: ['class', 'style'],
401
      font: ['color', 'size', 'face'],
402
      footer: [],
403
      h1: ['class', 'style'],
404
      h2: ['class', 'style'],
405
      h3: ['class', 'style'],
406
      h4: ['class', 'style'],
407
      h5: ['class', 'style'],
408
      h6: ['class', 'style'],
409
      header: [],
410
      hr: [],
411
      i: ['class', 'style'],
412
      img: ['src', 'alt', 'title', 'width', 'height', 'id', '_src', 'loadingclass', 'class', 'data-latex'],
413
      ins: ['datetime'],
414
      li: ['class', 'style'],
415
      mark: [],
416
      nav: [],
417
      ol: ['class', 'style'],
418
      p: ['class', 'style'],
419
      pre: ['class', 'style'],
420
      s: [],
421
      section: [],
422
      small: [],
423
      span: ['class', 'style'],
424
      sub: ['class', 'style'],
425
      sup: ['class', 'style'],
426
      strong: ['class', 'style'],
427
      table: ['width', 'border', 'align', 'valign', 'class', 'style'],
428
      tbody: ['align', 'valign', 'class', 'style'],
429
      td: ['width', 'rowspan', 'colspan', 'align', 'valign', 'class', 'style'],
430
      tfoot: ['align', 'valign', 'class', 'style'],
431
      th: ['width', 'rowspan', 'colspan', 'align', 'valign', 'class', 'style'],
432
      thead: ['align', 'valign', 'class', 'style'],
433
      tr: ['rowspan', 'align', 'valign', 'class', 'style'],
434
      tt: [],
435
      u: [],
436
      ul: ['class', 'style'],
437
      video: ['autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style']
436 438
    }
439
  };
437 440
438
    function getConfigFilePath() {
441
  function getUEBasePath(docUrl, confUrl) {
439 442
440
        var configPath = document.getElementsByTagName('script');
443
    return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath());
441 444
442
        return configPath[ configPath.length - 1 ].src;
445
  }
443 446
444
    }
447
  function getConfigFilePath() {
445 448
446
    function getBasePath(docUrl, confUrl) {
449
    var configPath = document.getElementsByTagName('script');
447 450
448
        var basePath = confUrl;
451
    return configPath[configPath.length - 1].src;
449 452
453
  }
450 454
451
        if (/^(\/|\\\\)/.test(confUrl)) {
455
  function getBasePath(docUrl, confUrl) {
452 456
453
            basePath = /^.+?\w(\/|\\\\)/.exec(docUrl)[0] + confUrl.replace(/^(\/|\\\\)/, '');
457
    var basePath = confUrl;
454 458
455
        } else if (!/^[a-z]+:/i.test(confUrl)) {
456 459
457
            docUrl = docUrl.split("#")[0].split("?")[0].replace(/[^\\\/]+$/, '');
460
    if (/^(\/|\\\\)/.test(confUrl)) {
458 461
459
            basePath = docUrl + "" + confUrl;
462
      basePath = /^.+?\w(\/|\\\\)/.exec(docUrl)[0] + confUrl.replace(/^(\/|\\\\)/, '');
460 463
461
        }
464
    } else if (!/^[a-z]+:/i.test(confUrl)) {
462 465
463
        return optimizationPath(basePath);
466
      docUrl = docUrl.split("#")[0].split("?")[0].replace(/[^\\\/]+$/, '');
467
468
      basePath = docUrl + "" + confUrl;
464 469
465 470
    }
466 471
467
    function optimizationPath(path) {
472
    return optimizationPath(basePath);
468 473
469
        var protocol = /^[a-z]+:\/\//.exec(path)[ 0 ],
470
            tmp = null,
471
            res = [];
474
  }
472 475
473
        path = path.replace(protocol, "").split("?")[0].split("#")[0];
476
  function optimizationPath(path) {
474 477
475
        path = path.replace(/\\/g, '/').split(/\//);
478
    var protocol = /^[a-z]+:\/\//.exec(path)[0],
479
      tmp = null,
480
      res = [];
476 481
477
        path[ path.length - 1 ] = "";
482
    path = path.replace(protocol, "").split("?")[0].split("#")[0];
478 483
479
        while (path.length) {
484
    path = path.replace(/\\/g, '/').split(/\//);
480 485
481
            if (( tmp = path.shift() ) === "..") {
482
                res.pop();
483
            } else if (tmp !== ".") {
484
                res.push(tmp);
485
            }
486
    path[path.length - 1] = "";
486 487
487
        }
488
    while (path.length) {
488 489
489
        return protocol + res.join("/");
490
      if ((tmp = path.shift()) === "..") {
491
        res.pop();
492
      } else if (tmp !== ".") {
493
        res.push(tmp);
494
      }
490 495
491 496
    }
492 497
493
    window.UE = {
494
        getUEBasePath: getUEBasePath
495
    };
498
    return protocol + res.join("/");
499
500
  }
501
502
  window.UE = {
503
    getUEBasePath: getUEBasePath
504
  };
496 505
497 506
})();