932 lines
115 KiB
Plaintext
932 lines
115 KiB
Plaintext
|
webpackJsonp([8],{
|
|||
|
|
|||
|
/***/ "Wxq9":
|
|||
|
/***/ (function(module, exports, __webpack_require__) {
|
|||
|
|
|||
|
!function(t,r){if(true)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var e=r();for(var n in e)("object"==typeof exports?exports:t)[n]=e[n]}}(window,function(){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=40)}([function(t,r){t.exports={86:{110000:"北京市",120000:"天津市",130000:"河北省",140000:"山西省",150000:"内蒙古自治区",210000:"辽宁省",220000:"吉林省",230000:"黑龙江省",310000:"上海市",320000:"江苏省",330000:"浙江省",340000:"安徽省",350000:"福建省",360000:"江西省",370000:"山东省",410000:"河南省",420000:"湖北省",430000:"湖南省",440000:"广东省",450000:"广西壮族自治区",460000:"海南省",500000:"重庆市",510000:"四川省",520000:"贵州省",530000:"云南省",540000:"西藏自治区",610000:"陕西省",620000:"甘肃省",630000:"青海省",640000:"宁夏回族自治区",650000:"新疆维吾尔自治区",710000:"台湾省",810000:"香港特别行政区",820000:"澳门特别行政区"},110000:{110100:"市辖区"},110100:{110101:"东城区",110102:"西城区",110105:"朝阳区",110106:"丰台区",110107:"石景山区",110108:"海淀区",110109:"门头沟区",110111:"房山区",110112:"通州区",110113:"顺义区",110114:"昌平区",110115:"大兴区",110116:"怀柔区",110117:"平谷区",110118:"密云区",110119:"延庆区"},120000:{120100:"市辖区"},120100:{120101:"和平区",120102:"河东区",120103:"河西区",120104:"南开区",120105:"河北区",120106:"红桥区",120110:"东丽区",120111:"西青区",120112:"津南区",120113:"北辰区",120114:"武清区",120115:"宝坻区",120116:"滨海新区",120117:"宁河区",120118:"静海区",120119:"蓟州区"},130000:{130100:"石家庄市",130200:"唐山市",130300:"秦皇岛市",130400:"邯郸市",130500:"邢台市",130600:"保定市",130700:"张家口市",130800:"承德市",130900:"沧州市",131000:"廊坊市",131100:"衡水市",139001:"定州市",139002:"辛集市"},130100:{130102:"长安区",130104:"桥西区",130105:"新华区",130107:"井陉矿区",130108:"裕华区",130109:"藁城区",130110:"鹿泉区",130111:"栾城区",130121:"井陉县",130123:"正定县",130125:"行唐县",130126:"灵寿县",130127:"高邑县",130128:"深泽县",130129:"赞皇县",130130:"无极县",130131:"平山县",130132:"元氏县",130133:"赵县",130183:"晋州市",130184:"新乐市"},130200:{130202:"路南区",130203:"路北区",130204:"古冶区",130205:"开平区",130207:"丰南区",130208:"丰润区",130209:"曹妃甸区",130223:"滦县",130224:"滦南县",130225:"乐亭县",130227:"迁西县",130229:"玉田县",130281:"遵化市",130283:"迁安市"},130300:{130302:"海港区",130303:"山海关区",130304:"北戴河区",130306:"抚宁区",130321:"青龙满族自治县",130322:"昌黎县",130324:"卢龙县"},130400:{130402:"邯山区",130403:"丛台区",130404:"复兴区",130406:"峰峰矿区",130421:"邯郸县",130423:"临漳县",130424:"成安县",130425:"大名县",130426:"涉县",130427:"磁县",130428:"肥乡县",130429:"永年县",130430:"邱县",130431:"鸡泽县",130432:"广平县",130433:"馆陶县",130434:"魏县",130435:"曲周县",130481:"武安市"},130500:{130502:"桥东区",130503:"桥西区",130521:"<22><>
|
|||
|
|
|||
|
/***/ }),
|
|||
|
|
|||
|
/***/ "fA3u":
|
|||
|
/***/ (function(module, exports) {
|
|||
|
|
|||
|
// removed by extract-text-webpack-plugin
|
|||
|
|
|||
|
/***/ }),
|
|||
|
|
|||
|
/***/ "fMc7":
|
|||
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|||
|
|
|||
|
// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/typeof.js
|
|||
|
var helpers_typeof = __webpack_require__("pFYg");
|
|||
|
var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
|
|||
|
|
|||
|
// EXTERNAL MODULE: ./src/components/Title.vue + 2 modules
|
|||
|
var Title = __webpack_require__("/+Ed");
|
|||
|
|
|||
|
// EXTERNAL MODULE: ./src/components/Pagination.vue + 2 modules
|
|||
|
var Pagination = __webpack_require__("cMGX");
|
|||
|
|
|||
|
// EXTERNAL MODULE: ./node_modules/vuex/dist/vuex.esm.js
|
|||
|
var vuex_esm = __webpack_require__("NYxO");
|
|||
|
|
|||
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/pages/siteManagement/AddSites.vue
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
|
|||
|
|
|||
|
/* harmony default export */ var AddSites = ({
|
|||
|
name: 'AddSites',
|
|||
|
props: ['available', 'URL', 'contextPath'],
|
|||
|
data: function data() {
|
|||
|
var _this = this;
|
|||
|
|
|||
|
var fileError = function fileError(rule, value, callback) {
|
|||
|
if (value != null && value != "") {
|
|||
|
if (_this.isvalidError) {
|
|||
|
callback(new Error(_this.errorTest));
|
|||
|
} else {
|
|||
|
callback();
|
|||
|
}
|
|||
|
} else {
|
|||
|
callback();
|
|||
|
}
|
|||
|
};
|
|||
|
return {
|
|||
|
errorLists: [],
|
|||
|
url: '/',
|
|||
|
options: [],
|
|||
|
areaCodes: [],
|
|||
|
areaCode: '',
|
|||
|
file: '',
|
|||
|
isError: false,
|
|||
|
isvalidError: false,
|
|||
|
errorTest: '',
|
|||
|
form: {
|
|||
|
areaCodes: [],
|
|||
|
file: ''
|
|||
|
},
|
|||
|
rules: {
|
|||
|
areaCodes: [{ required: true, message: '请选择区域', trigger: ['blur', 'change'] }],
|
|||
|
file: [{ required: true, message: '上传文件不能为空', trigger: ['blur', 'change'] }, { validator: fileError, trigger: ['blur', 'change'] }]
|
|||
|
}
|
|||
|
};
|
|||
|
},
|
|||
|
mounted: function mounted() {
|
|||
|
if (this.superAdmin) {
|
|||
|
this.getArea();
|
|||
|
}
|
|||
|
},
|
|||
|
|
|||
|
computed: Object(vuex_esm["b" /* mapState */])({
|
|||
|
superAdmin: 'super',
|
|||
|
areaAdmin: 'areaAdmin'
|
|||
|
}),
|
|||
|
methods: {
|
|||
|
getArea: function getArea() {
|
|||
|
var that = this;
|
|||
|
var parameters = {
|
|||
|
type: ""
|
|||
|
};
|
|||
|
this.$axios({
|
|||
|
method: 'post',
|
|||
|
url: that.contextPath + that.URL.getArea,
|
|||
|
data: parameters,
|
|||
|
needInterceptors: true,
|
|||
|
showError: true,
|
|||
|
loader: true
|
|||
|
}).then(function (res) {
|
|||
|
that.options = res.options;
|
|||
|
});
|
|||
|
},
|
|||
|
handleChange: function handleChange(value) {
|
|||
|
this.areaCode = value[1];
|
|||
|
},
|
|||
|
changeFile: function changeFile(file) {
|
|||
|
this.form.file = file.name;
|
|||
|
this.file = file;
|
|||
|
if (file.size > 10 * 1024 * 1024) {
|
|||
|
this.isvalidError = true;
|
|||
|
this.isError = false;
|
|||
|
this.errorTest = "文件过大,请重新选择";
|
|||
|
this.$refs.addSitesForm.validateField("file");
|
|||
|
}
|
|||
|
this.errorLists = [];
|
|||
|
this.isError = false;
|
|||
|
this.isvalidError = false;
|
|||
|
this.errorTest = '';
|
|||
|
},
|
|||
|
handlePreview: function handlePreview(file) {
|
|||
|
var that = this;
|
|||
|
var parameters = new FormData();
|
|||
|
parameters.append('file', file); //传文件
|
|||
|
parameters.append('areaCode', this.areaCode); //传其他参数
|
|||
|
this.$axios({
|
|||
|
method: 'post',
|
|||
|
url: that.contextPath + that.URL.downloadMb,
|
|||
|
data: parameters,
|
|||
|
needInterceptors: true,
|
|||
|
showError: true,
|
|||
|
loader: true
|
|||
|
}).then(function (res) {
|
|||
|
var length = res.error.length;
|
|||
|
if (length != 0) {
|
|||
|
that.errorLists = res.error;
|
|||
|
that.isError = true;
|
|||
|
that.isvalidError = true;
|
|||
|
that.errorTest = res.errorTest;
|
|||
|
that.$refs.addSitesForm.validateField("file");
|
|||
|
} else {
|
|||
|
that.closeDialog();
|
|||
|
}
|
|||
|
});
|
|||
|
},
|
|||
|
submitForm: function submitForm() {
|
|||
|
var _this2 = this;
|
|||
|
|
|||
|
var that = this;
|
|||
|
that.$refs['addSitesForm'].validate(function (valid) {
|
|||
|
if (valid) {
|
|||
|
_this2.$refs.upload.submit();
|
|||
|
}
|
|||
|
});
|
|||
|
/*var that = this;
|
|||
|
let parameters = new FormData();
|
|||
|
parameters.append('file',this.file);//传文件
|
|||
|
parameters.append('areaCode',this.areaCode);//传其他参数
|
|||
|
this.$axios({
|
|||
|
method: 'post',
|
|||
|
url: that.contextPath + that.URL.downloadMb,
|
|||
|
data: parameters,
|
|||
|
needInterceptors: true,
|
|||
|
showError: true,
|
|||
|
loader: true
|
|||
|
}).then(function(res){
|
|||
|
that.options = res.options;
|
|||
|
})*/
|
|||
|
},
|
|||
|
closeDialog: function closeDialog() {
|
|||
|
var that = this;
|
|||
|
that.$emit('update:available', false);
|
|||
|
that.$parent.getDomainList();
|
|||
|
},
|
|||
|
downloadMb: function downloadMb() {
|
|||
|
window.location.href = this.contextPath + this.URL.downloadMb;
|
|||
|
}
|
|||
|
}
|
|||
|
});
|
|||
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-b190fd52","hasScoped":false,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/pages/siteManagement/AddSites.vue
|
|||
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-dialog',{attrs:{"title":"批量添加网站","visible":_vm.available,"close-on-click-modal":false,"close-on-press-escape":false,"custom-class":'addUserDialog',"center":""},on:{"close":_vm.closeDialog}},[_c('div',{staticClass:"resetFormArea"},[_c('el-form',{ref:"addSitesForm",attrs:{"rules":_vm.rules,"model":_vm.form,"label-width":"60px","size":"small","label-position":"left"}},[(_vm.superAdmin)?_c('el-form-item',{attrs:{"label":"区域","prop":"areaCodes"}},[_c('el-cascader',{attrs:{"expand-trigger":"hover","options":_vm.options},on:{"change":_vm.handleChange},model:{value:(_vm.form.areaCodes),callback:function ($$v) {_vm.$set(_vm.form, "areaCodes", $$v)},expression:"form.areaCodes"}})],1):_vm._e(),_vm._v(" "),_c('el-form-item',{attrs:{"label":"文件","prop":"file"}},[_c('div',{staticClass:"addSiteUpload"},[_c('el-input',{attrs:{"type":"text"},model:{value:(_vm.form.file),callback:function ($$v) {_vm.$set(_vm.form, "file", $$v)},expression:"form.file"}},[_c('el-upload',{ref:"upload",staticClass:"upload-demo",attrs:{"slot":"append","accept":".xlsx","action":_vm.url,"on-change":_vm.changeFile,"before-upload":_vm.handlePreview,"multiple":false,"auto-upload":false,"show-file-list":false,"limit":1},slot:"append"},[_c('el-button',{attrs:{"slot":"trigger","size":"small","type":"primary"},slot:"trigger"},[_vm._v("选择文件")])],1)],1)],1),_vm._v(" "),_c('a',{on:{"click":_vm.downloadMb}},[_vm._v("下载模板")])])],1),_vm._v(" "),(_vm.isError)?_c('div',{staticClass:"errorArea"},[_c('span',{staticStyle:{"color":"#EC1D1D"}},[_vm._v("添加失败!")]),_c('span',[_vm._v("错误详情:")]),_vm._v(" "),_c('ul',{staticClass:"errorList"},_vm._l((_vm.errorLists),function(item){return _c('li',[_vm._v(_vm._s(item))])}),0)]):_vm._e()],1),_vm._v(" "),_c('template',{slot:"footer"},[_c('el-button',{on:{"click":_vm.closeDialog}},[_vm._v("取消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":function($event){return _vm.submitForm()}}},[_vm._v("确定")])],1)],2)}
|
|||
|
var staticRenderFns = []
|
|||
|
var esExports = { render: render, staticRenderFns: staticRenderFns }
|
|||
|
/* harmony default export */ var siteManagement_AddSites = (esExports);
|
|||
|
// CONCATENATED MODULE: ./src/pages/siteManagement/AddSites.vue
|
|||
|
function injectStyle (ssrContext) {
|
|||
|
__webpack_require__("fA3u")
|
|||
|
}
|
|||
|
var normalizeComponent = __webpack_require__("VU/8")
|
|||
|
/* script */
|
|||
|
|
|||
|
|
|||
|
/* template */
|
|||
|
|
|||
|
/* template functional */
|
|||
|
var __vue_template_functional__ = false
|
|||
|
/* styles */
|
|||
|
var __vue_styles__ = injectStyle
|
|||
|
/* scopeId */
|
|||
|
var __vue_scopeId__ = null
|
|||
|
/* moduleIdentifier (server only) */
|
|||
|
var __vue_module_identifier__ = null
|
|||
|
var Component = normalizeComponent(
|
|||
|
AddSites,
|
|||
|
siteManagement_AddSites,
|
|||
|
__vue_template_functional__,
|
|||
|
__vue_styles__,
|
|||
|
__vue_scopeId__,
|
|||
|
__vue_module_identifier__
|
|||
|
)
|
|||
|
|
|||
|
/* harmony default export */ var pages_siteManagement_AddSites = (Component.exports);
|
|||
|
|
|||
|
// EXTERNAL MODULE: ./node_modules/element-china-area-data/dist/app.js
|
|||
|
var app = __webpack_require__("Wxq9");
|
|||
|
var app_default = /*#__PURE__*/__webpack_require__.n(app);
|
|||
|
|
|||
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/pages/siteManagement/SiteSet.vue
|
|||
|
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
//
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
/* harmony default export */ var SiteSet = ({
|
|||
|
components: {
|
|||
|
Title: Title["a" /* default */],
|
|||
|
Pagination: Pagination["a" /* default */],
|
|||
|
AddSites: pages_siteManagement_AddSites
|
|||
|
},
|
|||
|
data: function data() {
|
|||
|
return {
|
|||
|
ptitle: "网站管理",
|
|||
|
title: "网站配置",
|
|||
|
total: 0,
|
|||
|
pageSize: 10,
|
|||
|
currentPage: 1,
|
|||
|
tableData: [],
|
|||
|
name: '',
|
|||
|
roleId: '0',
|
|||
|
timeValue: '',
|
|||
|
isChecking: false,
|
|||
|
index: -1,
|
|||
|
roleList: [{ name: '网站域名', id: '0' }, { name: '用户名', id: '1' }],
|
|||
|
domainList: [],
|
|||
|
domainId: '',
|
|||
|
adminList: [],
|
|||
|
adminId: '',
|
|||
|
handleUsers: '',
|
|||
|
provinces: [],
|
|||
|
areaCodes: [],
|
|||
|
areaCode: '',
|
|||
|
normalCount: '',
|
|||
|
totalCount: '',
|
|||
|
availableAddUser: false,
|
|||
|
URL: {
|
|||
|
getProvince: '/website/rest/queryArea',
|
|||
|
getKeyList: '/website/rest/queryKeyWordList',
|
|||
|
getDomainList: '/website/rest/queryWebsiteList',
|
|||
|
pauseWebsiteInfo: '/website/pauseWebsiteInfo',
|
|||
|
deleteWebsiteInfo: '/website/deleteWebsiteInfo',
|
|||
|
getArea: '/website/rest/queryArea',
|
|||
|
downloadMb: '/website/batchAdd',
|
|||
|
testState: '/website/rest/queryDomain/'
|
|||
|
}
|
|||
|
};
|
|||
|
},
|
|||
|
|
|||
|
computed: Object(vuex_esm["b" /* mapState */])({
|
|||
|
contextPath: 'urlHost',
|
|||
|
active: 'active',
|
|||
|
roleAction: 'roleAction'
|
|||
|
}),
|
|||
|
mounted: function mounted() {
|
|||
|
/*this.active = 0;
|
|||
|
if(this.roleAction.province){
|
|||
|
this.getProvince();
|
|||
|
}
|
|||
|
this.getKeyList();
|
|||
|
this.getDomainList();*/
|
|||
|
},
|
|||
|
|
|||
|
methods: {
|
|||
|
//获取省份信息
|
|||
|
getProvince: function getProvince() {
|
|||
|
var that = this;
|
|||
|
this.$axios({
|
|||
|
method: 'get',
|
|||
|
url: that.contextPath + that.URL.getArea + "?type=QUERY",
|
|||
|
needInterceptors: true,
|
|||
|
showError: true,
|
|||
|
loader: true
|
|||
|
}).then(function (res) {
|
|||
|
/*if(that.areaCodes.length == 0){
|
|||
|
that.areaCodes.push(res[0].value);
|
|||
|
}*/
|
|||
|
if (that.areaCode == '') {
|
|||
|
that.areaCode = res[0].value;
|
|||
|
}
|
|||
|
that.provinces = res;
|
|||
|
});
|
|||
|
},
|
|||
|
|
|||
|
//复制CName
|
|||
|
copy: function copy(cname) {
|
|||
|
var url = cname;
|
|||
|
var oInput = document.createElement('input');
|
|||
|
oInput.value = url;
|
|||
|
document.body.appendChild(oInput);
|
|||
|
oInput.select(); // 选择对象;
|
|||
|
document.execCommand("Copy"); // 执行浏览器复制命令
|
|||
|
this.$message({
|
|||
|
message: '已成功复制到剪切板',
|
|||
|
type: 'success'
|
|||
|
});
|
|||
|
oInput.remove();
|
|||
|
},
|
|||
|
test: function test(index, row, data) {
|
|||
|
var that = this;
|
|||
|
this.index = index;
|
|||
|
this.$axios({
|
|||
|
method: 'post',
|
|||
|
url: that.contextPath + that.URL.testState + data,
|
|||
|
needInterceptors: true,
|
|||
|
showError: true,
|
|||
|
loader: false
|
|||
|
}).then(function (res) {
|
|||
|
row.dnsState = res.dnsState;
|
|||
|
that.index = -1;
|
|||
|
});
|
|||
|
},
|
|||
|
handleChange: function handleChange(value) {
|
|||
|
this.adminId = '';
|
|||
|
this.domainId = '';
|
|||
|
this.getKeyList();
|
|||
|
},
|
|||
|
pselect: function pselect(val) {
|
|||
|
this.getKeyList();
|
|||
|
},
|
|||
|
getKeyList: function getKeyList() {
|
|||
|
var that = this;
|
|||
|
var parameters = {};
|
|||
|
parameters = {
|
|||
|
orgCode: this.areaCode
|
|||
|
};
|
|||
|
this.$axios({
|
|||
|
method: 'post',
|
|||
|
url: that.contextPath + that.URL.getKeyList,
|
|||
|
data: parameters,
|
|||
|
needInterceptors: true,
|
|||
|
showError: true,
|
|||
|
loader: false
|
|||
|
}).then(function (res) {
|
|||
|
that.domainList = res.domainList;
|
|||
|
that.adminList = res.userList;
|
|||
|
});
|
|||
|
},
|
|||
|
getDomainSelectList: function getDomainSelectList(name) {
|
|||
|
if ((typeof name === 'undefined' ? 'undefined' : typeof_default()(name)) == 'object') {
|
|||
|
name = '';
|
|||
|
}
|
|||
|
var that = this;
|
|||
|
var parameters = {};
|
|||
|
parameters = {
|
|||
|
orgCode: this.areaCode,
|
|||
|
domainKey: name || ''
|
|||
|
};
|
|||
|
this.$axios({
|
|||
|
method: 'post',
|
|||
|
url: that.contextPath + that.URL.getKeyList,
|
|||
|
data: parameters,
|
|||
|
needInterceptors: true,
|
|||
|
showError: true,
|
|||
|
loader: false
|
|||
|
}).then(function (res) {
|
|||
|
that.domainList = res.domainList;
|
|||
|
});
|
|||
|
},
|
|||
|
getUserSelectList: function getUserSelectList(name) {
|
|||
|
var that = this;
|
|||
|
var parameters = {};
|
|||
|
parameters = {
|
|||
|
orgCode: this.areaCode,
|
|||
|
userKey: name || ''
|
|||
|
};
|
|||
|
this.$axios({
|
|||
|
method: 'post',
|
|||
|
url: that.contextPath + that.URL.getKeyList,
|
|||
|
data: parameters,
|
|||
|
needInterceptors: true,
|
|||
|
showError: true,
|
|||
|
loader: false
|
|||
|
}).then(function (res) {
|
|||
|
that.adminList = res.userList;
|
|||
|
});
|
|||
|
},
|
|||
|
getDomainList: function getDomainList() {
|
|||
|
var that = this;
|
|||
|
var parameters = {};
|
|||
|
if (this.roleId == '1') {
|
|||
|
parameters = {
|
|||
|
orgCode: this.areaCode,
|
|||
|
id: 0,
|
|||
|
userId: this.adminId || 0,
|
|||
|
pageSize: this.pageSize,
|
|||
|
currentPage: this.currentPage
|
|||
|
};
|
|||
|
}
|
|||
|
if (this.roleId == '0') {
|
|||
|
parameters = {
|
|||
|
orgCode: this.areaCode,
|
|||
|
id: this.domainId || 0,
|
|||
|
userId: 0,
|
|||
|
pageSize: this.pageSize,
|
|||
|
currentPage: this.currentPage
|
|||
|
};
|
|||
|
}
|
|||
|
this.$axios({
|
|||
|
method: 'post',
|
|||
|
url: that.contextPath + that.URL.getDomainList,
|
|||
|
data: parameters,
|
|||
|
needInterceptors: true,
|
|||
|
showError: true,
|
|||
|
loader: true
|
|||
|
}).then(function (res) {
|
|||
|
that.tableData = res.data;
|
|||
|
that.normalCount = res.normalCount;
|
|||
|
that.totalCount = res.totalCount;
|
|||
|
that.pageSize = res.pageSize;
|
|||
|
that.currentPage = res.currentPage;
|
|||
|
that.total = res.total;
|
|||
|
});
|
|||
|
/*this.$axios.post(this.contextPath+this.URL.getDomainList,parameters).then(function (res) {
|
|||
|
let resultAll = res.data;
|
|||
|
if(resultAll.resultCode == "0"){
|
|||
|
that.tableData = resultAll.result.data;
|
|||
|
that.normalCount = resultAll.result.normalCount;
|
|||
|
that.totalCount = resultAll.result.totalCount;
|
|||
|
that.pageSize = resultAll.result.pageSize;
|
|||
|
that.currentPage = resultAll.result.currentPage;
|
|||
|
that.total = resultAll.result.total;
|
|||
|
}
|
|||
|
}).catch(function (error) {
|
|||
|
error && alert(error);
|
|||
|
});*/
|
|||
|
},
|
|||
|
search: function search() {
|
|||
|
this.getDomainList();
|
|||
|
},
|
|||
|
setProtect: function setProtect(data) {
|
|||
|
this.$router.push({ path: '/protectSet', query: { domain: data.domain, id: data.id } });
|
|||
|
},
|
|||
|
clear: function clear() {
|
|||
|
this.name = '';
|
|||
|
this.timeValue = '';
|
|||
|
this.roleId = '';
|
|||
|
},
|
|||
|
sizeChange: function sizeChange(val) {
|
|||
|
this.currentPage = 1;
|
|||
|
this.pageSize = val;
|
|||
|
this.getDomainList();
|
|||
|
},
|
|||
|
currentChange: function currentChange(val) {
|
|||
|
this.currentPage = val;
|
|||
|
this.getDomainList();
|
|||
|
},
|
|||
|
go: function go(data) {
|
|||
|
this.$router.push({ path: '/appList', query: { data: data } });
|
|||
|
},
|
|||
|
addSite: function addSite() {
|
|||
|
var limitNum = this.global.getRoleLimit().addSiteCount || 0;
|
|||
|
if (this.totalCount >= limitNum) {
|
|||
|
this.$alert("网站数量达到上限(" + limitNum + "个),请删除后尝试添加!", '提示', {
|
|||
|
dangerouslyUseHTMLString: true,
|
|||
|
customClass: 'wafConfirm',
|
|||
|
confirmButtonText: '确定',
|
|||
|
type: 'warning'
|
|||
|
}).then(function () {}).catch(function () {});
|
|||
|
} else {
|
|||
|
this.$router.push({ path: '/addSite' });
|
|||
|
}
|
|||
|
},
|
|||
|
editSite: function editSite(data) {
|
|||
|
this.$store.commit('$_setEditSiteForm', data);
|
|||
|
this.$router.push({ path: '/editSite' });
|
|||
|
},
|
|||
|
addSites: function addSites() {
|
|||
|
this.availableAddUser = true;
|
|||
|
},
|
|||
|
stopProtect: function stopProtect(data) {
|
|||
|
var _this = this;
|
|||
|
|
|||
|
this.$confirm("您确定要暂停域名" + data.domain + "的防护吗?<br/><span class='confimTip'>暂停后,流量将直接转发</span>", '提示', {
|
|||
|
dangerouslyUseHTMLString: true,
|
|||
|
customClass: 'wafConfirm',
|
|||
|
confirmButtonText: '确定',
|
|||
|
cancelButtonText: '取消',
|
|||
|
type: 'warning'
|
|||
|
}).then(function () {
|
|||
|
var that = _this;
|
|||
|
var parameters = {
|
|||
|
id: data.id,
|
|||
|
domain: data.domain,
|
|||
|
pause: data.state == 0 ? 1 : 0
|
|||
|
};
|
|||
|
_this.$axios.post(_this.contextPath + _this.URL.pauseWebsiteInfo, parameters).then(function (res) {
|
|||
|
var data = res.data;
|
|||
|
if (data.resultCode == "0") {
|
|||
|
that.getDomainList();
|
|||
|
that.$message({
|
|||
|
type: 'success',
|
|||
|
message: '暂停成功!'
|
|||
|
});
|
|||
|
} else {
|
|||
|
that.$message({
|
|||
|
type: 'warning',
|
|||
|
message: '暂停失败!'
|
|||
|
});
|
|||
|
}
|
|||
|
}, function (res) {});
|
|||
|
}).catch(function () {});
|
|||
|
},
|
|||
|
startProtect: function startProtect(data) {
|
|||
|
var _this2 = this;
|
|||
|
|
|||
|
this.$confirm("您确定要开启域名" + data.domain + "的防护吗?", '提示', {
|
|||
|
dangerouslyUseHTMLString: true,
|
|||
|
customClass: 'wafConfirm',
|
|||
|
confirmButtonText: '确定',
|
|||
|
cancelButtonText: '取消',
|
|||
|
type: 'warning'
|
|||
|
}).then(function () {
|
|||
|
var that = _this2;
|
|||
|
var parameters = {
|
|||
|
id: data.id,
|
|||
|
domain: data.domain,
|
|||
|
pause: data.state == 0 ? 1 : 0
|
|||
|
};
|
|||
|
_this2.$axios.post(_this2.contextPath + _this2.URL.pauseWebsiteInfo, parameters).then(function (res) {
|
|||
|
var data = res.data;
|
|||
|
if (data.resultCode == "0") {
|
|||
|
that.getDomainList();
|
|||
|
that.$message({
|
|||
|
type: 'success',
|
|||
|
message: '开启成功!'
|
|||
|
});
|
|||
|
} else {
|
|||
|
that.$message({
|
|||
|
type: 'warning',
|
|||
|
message: '暂停失败!'
|
|||
|
});
|
|||
|
}
|
|||
|
}, function (res) {});
|
|||
|
}).catch(function () {});
|
|||
|
},
|
|||
|
deleteDomin: function deleteDomin(data) {
|
|||
|
var _this3 = this;
|
|||
|
|
|||
|
this.$confirm("您确定要删除域名" + data.domain + "的转发配置吗?<br/><span class='confimTip'>建议您先将DNS指回服务器源站IP,否则在删除配置后,该域名流量将无法正常转发。删除配置后,该域名统计数据将删除!</span>", '提示', {
|
|||
|
dangerouslyUseHTMLString: true,
|
|||
|
customClass: 'wafConfirm',
|
|||
|
confirmButtonText: '确定',
|
|||
|
cancelButtonText: '取消',
|
|||
|
type: 'warning'
|
|||
|
}).then(function () {
|
|||
|
var that = _this3;
|
|||
|
var parameters = {
|
|||
|
id: data.id,
|
|||
|
domain: data.domain
|
|||
|
};
|
|||
|
_this3.$axios.post(_this3.contextPath + _this3.URL.deleteWebsiteInfo, parameters).then(function (res) {
|
|||
|
var data = res.data;
|
|||
|
if (data.resultCode == "0") {
|
|||
|
that.getDomainList();
|
|||
|
that.$message({
|
|||
|
type: 'success',
|
|||
|
message: '删除成功!'
|
|||
|
});
|
|||
|
} else {
|
|||
|
that.$message({
|
|||
|
type: 'warning',
|
|||
|
message: '删除失败!'
|
|||
|
});
|
|||
|
}
|
|||
|
}, function (res) {});
|
|||
|
}).catch(function () {});
|
|||
|
},
|
|||
|
handleSelectionChange: function handleSelectionChange(val) {
|
|||
|
this.handleUsers = val;
|
|||
|
}
|
|||
|
}
|
|||
|
});
|
|||
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-07e00858","hasScoped":false,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/pages/siteManagement/SiteSet.vue
|
|||
|
var SiteSet_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-breadcrumb',{attrs:{"separator-class":"el-icon-arrow-right"}},[(_vm.roleAction.topTitle)?_c('el-breadcrumb-item',{staticClass:"con-ptitle",attrs:{"to":{ path: '/CDNindex' }}},[_vm._v("Web应用防火墙")]):_vm._e(),_vm._v(" "),(!_vm.roleAction.topTitle)?_c('el-breadcrumb-item',{staticClass:"con-ptitle"},[_vm._v(_vm._s(_vm.ptitle))]):_vm._e(),_vm._v(" "),_c('el-breadcrumb-item',[_vm._v(_vm._s(_vm.title))])],1),_vm._v(" "),_c('div',{staticClass:"con-content"},[_c('div',{staticClass:"handle"},[(_vm.roleAction.province)?_c('span',{staticClass:"search-name"},[_vm._v("省份")]):_vm._e(),_vm._v(" "),(_vm.roleAction.province)?_c('el-select',{attrs:{"size":"small","collapse-tags":"","placeholder":"请选择省份"},on:{"change":_vm.handleChange},model:{value:(_vm.areaCode),callback:function ($$v) {_vm.areaCode=$$v},expression:"areaCode"}},_vm._l((_vm.provinces),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.label,"value":item.value}})}),1):_vm._e(),_vm._v(" "),(_vm.roleAction.domainSearch && !_vm.roleAction.pnameSearch)?_c('el-select',{staticClass:"province-sh-c",attrs:{"filterable":"","remote":"","remote-method":_vm.getDomainSelectList,"clearable":"","size":"small","placeholder":"请输入网站域名","popper-class":"defaultSelect"},on:{"focus":_vm.getDomainSelectList},model:{value:(_vm.domainId),callback:function ($$v) {_vm.domainId=$$v},expression:"domainId"}},_vm._l((_vm.domainList),function(item){return _c('el-option',{key:item.id,attrs:{"label":item.domain,"value":item.id}})}),1):_vm._e(),_vm._v(" "),(_vm.roleAction.domainSearch && _vm.roleAction.pnameSearch)?_c('el-select',{staticClass:"province-sh province-sh-c",attrs:{"size":"small","placeholder":"请选择"},model:{value:(_vm.roleId),callback:function ($$v) {_vm.roleId=$$v},expression:"roleId"}},_vm._l((_vm.roleList),function(item){return _c('el-option',{key:item.id,attrs:{"label":item.name,"value":item.id}})}),1):_vm._e(),_vm._v(" "),(_vm.roleAction.domainSearch && _vm.roleAction.pnameSearch && _vm.roleId == '0')?_c('el-select',{staticClass:"province-sh-c",attrs:{"filterable":"","remote":"","remote-method":_vm.getDomainSelectList,"clearable":"","size":"small","placeholder":"请输入网站域名","popper-class":"defaultSelect"},on:{"focus":_vm.getDomainSelectList},model:{value:(_vm.domainId),callback:function ($$v) {_vm.domainId=$$v},expression:"domainId"}},_vm._l((_vm.domainList),function(item){return _c('el-option',{key:item.id,attrs:{"label":item.domain,"value":item.id}})}),1):_vm._e(),_vm._v(" "),(_vm.roleAction.domainSearch && _vm.roleAction.pnameSearch && _vm.roleId == '1')?_c('el-select',{staticClass:"province-sh-c",attrs:{"filterable":"","clearable":"","size":"small","placeholder":"请输入企业用户账号","popper-class":"defaultSelect"},model:{value:(_vm.adminId),callback:function ($$v) {_vm.adminId=$$v},expression:"adminId"}},_vm._l((_vm.adminList),function(item){return _c('el-option',{key:item.id,attrs:{"label":item.phone,"value":item.id}})}),1):_vm._e(),_vm._v(" "),_c('el-button',{staticClass:"left-space",attrs:{"type":"primary","size":"small"},on:{"click":_vm.search}},[_vm._v("搜索")])],1),_vm._v(" "),_c('div',{staticClass:"table-area"},[_c('div',{staticClass:"table-area-handle"},[(_vm.roleAction.addSite)?_c('el-button',{attrs:{"type":"primary","size":"mini","icon":"el-icon-my-add"},on:{"click":_vm.addSite}},[_vm._v("添加网站")]):_vm._e(),_vm._v(" "),(_vm.roleAction.addSites)?_c('el-button',{attrs:{"type":"primary","size":"mini","icon":"el-icon-my-add el-icon-my-adds"},on:{"click":_vm.addSites}},[_vm._v("批量添加网站")]):_vm._e(),_vm._v(" "),_c('span',{staticStyle:{"float":"right","line-height":"32px"}},[_vm._v("当前接入网站状态正常个数 "+_vm._s(_vm.normalCount)+"/"+_vm._s(_vm.totalCount))])],1),_vm._v(" "),_c('el-table',{ref:"singleTable",staticClass:"contable",staticStyle:{"width":"100%"},attrs:{"border":"","stripe":"true","height":this.$store.state.siteSetHeight,"data":_vm.tabl
|
|||
|
var SiteSet_staticRenderFns = []
|
|||
|
var SiteSet_esExports = { render: SiteSet_render, staticRenderFns: SiteSet_staticRenderFns }
|
|||
|
/* harmony default export */ var siteManagement_SiteSet = (SiteSet_esExports);
|
|||
|
// CONCATENATED MODULE: ./src/pages/siteManagement/SiteSet.vue
|
|||
|
function SiteSet_injectStyle (ssrContext) {
|
|||
|
__webpack_require__("lXwt")
|
|||
|
}
|
|||
|
var SiteSet_normalizeComponent = __webpack_require__("VU/8")
|
|||
|
/* script */
|
|||
|
|
|||
|
|
|||
|
/* template */
|
|||
|
|
|||
|
/* template functional */
|
|||
|
var SiteSet___vue_template_functional__ = false
|
|||
|
/* styles */
|
|||
|
var SiteSet___vue_styles__ = SiteSet_injectStyle
|
|||
|
/* scopeId */
|
|||
|
var SiteSet___vue_scopeId__ = null
|
|||
|
/* moduleIdentifier (server only) */
|
|||
|
var SiteSet___vue_module_identifier__ = null
|
|||
|
var SiteSet_Component = SiteSet_normalizeComponent(
|
|||
|
SiteSet,
|
|||
|
siteManagement_SiteSet,
|
|||
|
SiteSet___vue_template_functional__,
|
|||
|
SiteSet___vue_styles__,
|
|||
|
SiteSet___vue_scopeId__,
|
|||
|
SiteSet___vue_module_identifier__
|
|||
|
)
|
|||
|
|
|||
|
/* harmony default export */ var pages_siteManagement_SiteSet = __webpack_exports__["default"] = (SiteSet_Component.exports);
|
|||
|
|
|||
|
|
|||
|
/***/ }),
|
|||
|
|
|||
|
/***/ "lXwt":
|
|||
|
/***/ (function(module, exports) {
|
|||
|
|
|||
|
// removed by extract-text-webpack-plugin
|
|||
|
|
|||
|
/***/ })
|
|||
|
|
|||
|
});
|