Ejemplo n.º 1
0
Archivo: app.py Proyecto: peng5550/demo
    def __createUI(self):
        # 日志信息
        self.logBox = mtk.LabelFrame(self.root, text="日志信息", fg="blue")
        self.logBox.place(x=20, y=20, width=250, height=260)
        self.logText = scrolledtext.ScrolledText(self.logBox, fg="green")
        self.logText.place(x=20, y=15, width=220, height=210)
        # Excel数据
        self.excelDataBox = mtk.LabelFrame(self.root, text="当前数据", fg="blue")
        self.excelDataBox.place(x=290, y=20, width=180, height=80)
        self.dataNum = mtk.Label(self.excelDataBox, text="当前数据数量:")
        self.dataNum.place(x=10, y=10, width=100, height=30)
        self.dataNumText = mtk.Label(self.excelDataBox, text=0)
        self.dataNumText.place(x=115, y=10, width=30, height=30)

        # taskInfo
        self.taskInfoBox = mtk.LabelFrame(self.root, text="启动任务", fg="blue")
        self.taskInfoBox.place(x=290, y=120, width=180, height=160)
        self.excelExportInBtn = mtk.Button(self.taskInfoBox, text="导入Excel",
                                           command=lambda: self.thread_it(self.excelExportIn))
        self.excelExportInBtn.place(x=15, y=20, width=80, height=35)
        self.excelExportOutBtn = mtk.Button(self.taskInfoBox, text="导出Excel",
                                            command=lambda: self.thread_it(self.excelExportOut))
        self.excelExportOutBtn.place(x=15, y=80, width=80, height=35)
        self.taskStartBtn = mtk.Button(self.taskInfoBox, text="开始", command=lambda: self.thread_it(self.start))
        self.taskStartBtn.place(x=110, y=20, width=50, height=90)
Ejemplo n.º 2
0
    def createNewUI(self, taskName, taskInfo):
        detailWin = mtk.Toplevel(self.root)
        detailWin.title(taskName)
        detailWin.geometry("650x550")
        tasksInfoBox = mtk.LabelFrame(detailWin, text="任务说明:", fg="blue")
        tasksInfoBox.place(x=20, y=20, width=610, height=510)
        tasksIntro = scrolledtext.ScrolledText(tasksInfoBox, fg="green")
        tasksIntro.place(x=20, y=10, width=580, height=60)
        tasksIntro.insert(
            END,
            f"{''.join([taskInfo.get('EarnDeatile').get('detail')[j] for j in range(len(taskInfo.get('EarnDeatile').get('detail'))) if ord(taskInfo.get('EarnDeatile').get('detail')[j]) in range(65536)])}\n{taskInfo.get('EarnDeatile').get('condition')}"
            .replace(" ", ""))

        taskStep = mtk.LabelFrame(tasksInfoBox, text="任务步骤", fg="blue")
        taskStep.place(x=20, y=80, width=200, height=380)
        stepText = scrolledtext.ScrolledText(taskStep, fg="green")
        stepText.place(x=10, y=10, width=180, height=330)
        if isinstance(taskInfo.get("WjMissionDeatile"), list):
            totalTextList = []
            for index, item in enumerate(taskInfo.get("WjMissionDeatile")):
                detail = item.get("detail", "")
                othLink = item.get("btnname", "")
                detailText = detail + othLink
                text = f"\n\nstep {index + 1}: " + ''.join([
                    detailText[j] for j in range(len(detailText))
                    if ord(detailText[j]) in range(65536)
                ]).strip()
                totalTextList.append(text)
            stepText.insert(END, "\n\n".join(totalTextList))
        else:
            stepText.insert(
                END,
                f"\n\nstep 1: {taskInfo.get('WjMissionDeatile').get('msg')}")

        self.imageShow = mtk.LabelFrame(tasksInfoBox, text="图例", fg="blue")
        self.imageShow.place(x=240, y=80, width=350, height=380)
        taskId = taskInfo.get('EarnDeatile').get('id')
        imageList = self.imageInfo.get(taskId)
        IMG = []
        if imageList:
            for image in imageList:
                if image[0]:
                    self.pil_image = Image.open(image[0])
                    self.pil_image = self.pil_image.resize((320, 350),
                                                           Image.ANTIALIAS)
                    IMG.append(self.pil_image)
        self.image = mtk.Label(self.imageShow)
        if IMG:
            self.counter = 0
            self.imgNow = ImageTk.PhotoImage(IMG[self.counter])
            self.image.configure(image=self.imgNow)
            self.image.place(x=2, y=2, width=322, height=352)
            self.image.bind(
                sequence="<MouseWheel>",
                func=lambda x: self.thread_it(self.changeImage, IMG))
            self.image.bind(sequence="<Button-3>",
                            func=lambda x: self.thread_it(self.saveImage, IMG))

        else:
            self.image.configure(text="暂无图片", fg="red")
Ejemplo n.º 3
0
    def __creatUI(self):
        self.box = mtk.LabelFrame(self.root)
        self.box.place(x=20, y=20, width=340, height=400)

        self.user_name = mtk.Label(self.box, text="账  号:")
        self.user_name.place(x=20, y=20, width=60, height=25)
        self.user_name_text = mtk.Entry(self.box)
        self.user_name_text.place(x=80, y=20, width=100, height=25)

        self.pass_word = mtk.Label(self.box, text="密  码:")
        self.pass_word.place(x=20, y=70, width=60, height=25)
        self.password_text = mtk.Entry(self.box)
        self.password_text.place(x=80, y=70, width=100, height=25)

        self.loginadd = mtk.Label(self.box, text="登录地:")
        self.loginadd.place(x=20, y=120, width=60, height=25)
        self.loginaddsel = ttk.Combobox(self.box)
        self.loginaddsel["values"] = [
            "上海总部", "上海物流", "甘肃", "河北", "西北", "山西", "浙江", "安徽", "山东", "江西",
            "武汉", "北京", "江苏", "四川", "广东"
        ]
        self.loginaddsel.place(x=80, y=120, width=100, height=25)

        self.verify_code = mtk.Label(self.box, text="验证码:")
        self.verify_code.place(x=20, y=170, width=60, height=25)
        self.verify_code_text = mtk.Entry(self.box)
        self.verify_code_text.place(x=80, y=170, width=100, height=25)

        self.exam_name = mtk.Label(self.box, text="考试名称:")
        self.exam_name.place(x=20, y=220, width=60, height=25)
        self.exam_name_text = mtk.Entry(self.box)
        self.exam_name_text.place(x=80, y=220, width=100, height=25)

        self.loadbtn = mtk.Button(
            self.box,
            text="加载题型",
            command=lambda: self.thread_it(self.__loadExcel))
        self.loadbtn.place(x=210, y=20, width=100, height=50)

        self.startbtn = mtk.Button(self.box,
                                   text="开始",
                                   command=lambda: self.thread_it(self.start))
        self.startbtn.place(x=210, y=100, width=100, height=50)

        self.stopbtn = mtk.Button(self.box,
                                  text="退出",
                                  command=lambda: self.thread_it(self.stop))
        self.stopbtn.place(x=210, y=180, width=100, height=50)

        self.logs = mtk.LabelFrame(self.box, text="信息", fg="blue")
        self.logs.place(x=20, y=270, width=300, height=120)
        self.logtext = scrolledtext.ScrolledText(self.logs, fg="green")
        self.logtext.place(x=20, y=10, width=270, height=80)
Ejemplo n.º 4
0
    def createPage(self):
        self.infoBox = mtk.LabelFrame(self.root, text="搜索框", fg="blue")
        self.infoBox.place(x=20, y=20, width=540, height=100)

        self.kw = mtk.Label(self.infoBox, text="关键词:")
        self.kw.place(x=20, y=20, width=50, height=25)
        self.kwText = mtk.Entry(self.infoBox)
        self.kwText.place(x=80, y=20, width=150, height=25)

        self.searchTime = mtk.Label(self.infoBox, text="搜索时间:")
        self.searchTime.place(x=280, y=20, width=60, height=25)
        self.stText = ttk.Combobox(self.infoBox)
        self.stText.place(x=350, y=20, width=100, height=25)
        self.stText["values"] = [
            "7 Days", "14 Days", "30 Days", "45 Days", "60 Days", "90 Days",
            "1 Year"
        ]

        self.log = mtk.LabelFrame(self.root, text="log日志", fg="blue")
        self.log.place(x=20, y=140, width=300, height=350)
        self.logtext = scrolledtext.ScrolledText(self.log, fg="green")
        self.logtext.place(x=20, y=15, width=270, height=300)

        self.status = mtk.LabelFrame(self.root, text="当前进度", fg="blue")
        self.status.place(x=340, y=140, width=220, height=150)

        self.indexnow = mtk.Label(self.status, text="当前条数:")
        self.indexnow.place(x=20, y=20, width=60, height=25)
        self.indexnowText = mtk.Label(self.status, text="0 条")
        self.indexnowText.place(x=90, y=20, width=50, height=25)

        self.indexTotals = mtk.Label(self.status, text="总条数:")
        self.indexTotals.place(x=20, y=65, width=60, height=25)
        self.indexTotalsText = mtk.Label(self.status, text="0 条")
        self.indexTotalsText.place(x=90, y=65, width=50, height=25)

        self.btnBox = mtk.LabelFrame(self.root)
        self.btnBox.place(x=340, y=320, width=220, height=170)

        self.startbtn = mtk.Button(self.btnBox,
                                   text="开始",
                                   command=lambda: self.thread_it(self.start))
        self.startbtn.place(x=40, y=20, width=120, height=40)
        self.loadoutbtn = mtk.Button(
            self.btnBox,
            text="导出",
            command=lambda: self.thread_it(self.export))
        self.loadoutbtn.place(x=40, y=100, width=120, height=40)
Ejemplo n.º 5
0
    def createPage(self):
        self.loginBox = mtk.LabelFrame(self.loginPage, text="账号登录", fg="blue")
        self.loginBox.place(x=30, y=30, width=300, height=280)

        self.userName = mtk.Label(self.loginBox, text="账号:")
        self.userName.place(x=20, y=20, width=50, height=30)
        self.userNameText = mtk.Entry(self.loginBox)
        self.userNameText.place(x=90, y=20, width=150, height=30)

        self.passWord = mtk.Label(self.loginBox, text="密码:")
        self.passWord.place(x=20, y=70, width=50, height=30)
        self.passWordText = mtk.Entry(self.loginBox)
        self.passWordText.place(x=90, y=70, width=150, height=30)

        # self.keyValue = mtk.Label(self.loginBox, text="KEY:")
        # self.keyValue.place(x=20, y=120, width=50, height=30)
        self.keyValueText = mtk.Entry(self.loginBox, show="*")
        self.keyValueText.place(x=90, y=120, width=150, height=30)

        self.loginBtn = mtk.Button(self.loginBox,
                                   text="登录",
                                   command=lambda: self.thread_it(self.login))
        self.loginBtn.place(x=150, y=180, width=80, height=30)

        self.logoutBtn = mtk.Button(self.loginBox,
                                    text="退出",
                                    command=lambda: self.thread_it(self.stop))
        self.logoutBtn.place(x=40, y=180, width=80, height=30)
Ejemplo n.º 6
0
    def createPage(self):
        self.login = mtk.LabelFrame(self.root, text="登录", fg="blue")
        self.login.place(x=30, y=50, width=380, height=250)

        self.label_asino = mtk.Label(self.login, text="AsiNumber:")
        self.label_asino.place(x=30, y=10, width=75, height=25)
        self.entry_asino = mtk.Entry(self.login)
        self.entry_asino.place(x=120, y=10, width=220, height=25)

        self.label_user = mtk.Label(self.login, text="账号:")
        self.label_user.place(x=30, y=65, width=75, height=25)
        self.entry_user = mtk.Entry(self.login)
        self.entry_user.place(x=120, y=65, width=220, height=25)

        self.label_passwd = mtk.Label(self.login, text="密码:")
        self.label_passwd.place(x=30, y=120, width=75, height=25)
        self.entry_passwd = mtk.Entry(self.login, show="*")
        self.entry_passwd.place(x=120, y=120, width=220, height=25)

        self.btn_logins = mtk.Button(
            self.login,
            text="自动登录",
            command=lambda: self.thread_it(self.loginSelf))
        self.btn_logins.place(x=40, y=170, width=100, height=30)

        self.btn_login = mtk.Button(
            self.login,
            text="登录",
            command=lambda: self.thread_it(self.loginContent))
        self.btn_login.place(x=220, y=170, width=100, height=30)
Ejemplo n.º 7
0
    def __createUI(self):

        # 博轩下载设置
        self.settingsBox = mtk.LabelFrame(self.root, text="下载设置", fg="blue")
        self.settingsBox.place(x=20, y=20, width=260, height=250)
        # 网站选择
        self.siteLable = mtk.Label(self.settingsBox, text="互联网平台:")
        self.siteLable.place(x=25, y=20, width=75, height=25)
        self.siteSelect = ttk.Combobox(self.settingsBox)
        self.siteSelect["values"] = ["360图书馆", "39康复网", "中医世家", "中医人", "中医中药秘方网", "中医中药网", "经方派", "新浪博文", "好大夫在线"]
        self.siteSelect.place(x=115, y=20, width=100, height=25)

        # 页面属性
        self.siteCls = mtk.Label(self.settingsBox, text="页面选择:")
        self.siteCls.place(x=25, y=65, width=65, height=25)
        self.siteClsSelect = ttk.Combobox(self.settingsBox)
        self.siteClsSelect["values"] = ["列表页", "内容页"]
        self.siteClsSelect.place(x=115, y=65, width=100, height=25)

        # 链接
        self.labelUrl = mtk.Label(self.settingsBox, text="链接:")
        self.labelUrl.place(x=25, y=110, width=40, height=25)
        self.urlText = mtk.Text(self.settingsBox)
        self.urlText.place(x=75, y=110, width=160, height=50)
        self.urlText.bind(sequence="<Double-Button-1>", func=lambda x: self.thread_it(self.loadErrors))
        # 任务按钮
        self.startBtn = mtk.Button(self.settingsBox, text="开始", command=lambda: self.thread_it(self.start))
        self.startBtn.place(x=25, y=180, width=80, height=35)
        self.stopBtn = mtk.Button(self.settingsBox, text="停止")
        self.stopBtn.place(x=135, y=180, width=80, height=35)
Ejemplo n.º 8
0
 def createNewUI(self, phoneNo):
     detailWin = mtk.Toplevel(self.root)
     detailWin.title(phoneNo)
     detailWin.geometry("300x400")
     errorInfoBox = mtk.LabelFrame(detailWin, text="ERROR信息:", fg="blue")
     errorInfoBox.place(x=20, y=20, width=250, height=350)
     errerText = mtk.Text(errorInfoBox)
     errerText.place(x=10, y=20, width=220, height=300)
     errerText.insert(
         mtk.END, "\n" + ''.join([
             self.errordata[phoneNo][j]
             for j in range(len(self.errordata[phoneNo]))
             if ord(self.errordata[phoneNo][j]) in range(65536)
         ]).strip())
Ejemplo n.º 9
0
    def createUI(self, func):
        # 日志信息
        self.logBox = mtk.LabelFrame(self.root, text="下载进度", fg="blue")
        self.logBox.place(x=20, y=20, width=300, height=280)
        title = ['1', '2', '3']
        self.box = ttk.Treeview(self.logBox, columns=title, show='headings')
        self.box.place(x=15, y=15, width=275, height=225)
        self.box.column('1', width=30, anchor='center')
        self.box.column('2', width=165, anchor='center')
        self.box.column('3', width=80, anchor='center')
        self.box.heading('1', text='序号')
        self.box.heading('2', text='文章标题')
        self.box.heading('3', text='状态')
        self.VScroll1 = Scrollbar(self.box, orient='vertical', command=self.box.yview)
        self.VScroll1.pack(side="right", fill="y")
        self.box.configure(yscrollcommand=self.VScroll1.set)

        self.logInfoBox = mtk.LabelFrame(self.root, text="日志信息", fg="blue")
        self.logInfoBox.place(x=20, y=310, width=300, height=150)
        # 下载进度
        self.logText = scrolledtext.ScrolledText(self.logInfoBox, fg="green")
        self.logText.place(x=15, y=10, width=275, height=110)
        self.logText.bind(sequence="<Double-Button-1>", func=lambda x: self.thread_it(func))
Ejemplo n.º 10
0
    def __creatUI(self):
        self.box = mtk.LabelFrame(self.root)
        self.box.place(x=20, y=20, width=340, height=400)

        self.user_name = mtk.Label(self.box, text="账  号:")
        self.user_name.place(x=20, y=20, width=60, height=25)
        self.user_name_text = mtk.Entry(self.box)
        self.user_name_text.place(x=80, y=20, width=100, height=25)

        self.pass_word = mtk.Label(self.box, text="密  码:")
        self.pass_word.place(x=20, y=70, width=60, height=25)
        self.password_text = mtk.Entry(self.box)
        self.password_text.place(x=80, y=70, width=100, height=25)

        self.verify_code = mtk.Label(self.box, text="验证码:")
        self.verify_code.place(x=20, y=120, width=60, height=25)
        self.verify_code_text = mtk.Entry(self.box)
        self.verify_code_text.place(x=80, y=120, width=100, height=25)

        self.exam_name = mtk.Label(self.box, text="考试名称:")
        self.exam_name.place(x=20, y=170, width=60, height=25)
        self.exam_name_text = mtk.Entry(self.box)
        self.exam_name_text.place(x=80, y=170, width=100, height=25)

        self.loadbtn = mtk.Button(self.box, text="加载题型", command=lambda: self.thread_it(self.__loadExcel))
        self.loadbtn.place(x=210, y=20, width=100, height=50)

        self.startbtn = mtk.Button(self.box, text="开始", command=lambda: self.thread_it(self.start))
        self.startbtn.place(x=210, y=85, width=100, height=50)

        self.stopbtn = mtk.Button(self.box, text="退出", command=lambda: self.thread_it(self.stop))
        self.stopbtn.place(x=210, y=150, width=100, height=50)

        self.logs = mtk.LabelFrame(self.box, text="信息", fg="blue")
        self.logs.place(x=20, y=210, width=300, height=170)
        self.logtext = scrolledtext.ScrolledText(self.logs, fg="green")
        self.logtext.place(x=20, y=10, width=270, height=130)
Ejemplo n.º 11
0
    def __createGUI(self):
        self.root = mtk.Tk()
        self.root.title("移动惠购用户查询工具")
        self.root.geometry("720x600")

        self.settings = mtk.LabelFrame(text="设置", fg="blue")
        self.settings.place(x=50, y=20, width=600, height=130)

        self.shopId = mtk.Label(self.settings, text="店铺  ID:")
        self.shopId.place(x=30, y=10, width=60, height=20)
        self.shopIdText = mtk.Entry(self.settings)
        self.shopIdText.place(x=85, y=10, width=80, height=20)

        self.workNo = mtk.Label(self.settings, text="工   号:")
        self.workNo.place(x=200, y=10, width=60, height=20)
        self.workNoText = mtk.Entry(self.settings)
        self.workNoText.place(x=260, y=10, width=80, height=20)

        self.semaphoreNum = mtk.Label(self.settings, text="并发数量:")
        self.semaphoreNum.place(x=30, y=70, width=60, height=20)
        self.entrySemaphoreNum = mtk.Entry(self.settings)
        self.entrySemaphoreNum.place(x=85, y=70, width=80, height=20)

        self.timeSleep = mtk.Label(self.settings, text="延迟时间:")
        self.timeSleep.place(x=200, y=70, width=60, height=20)
        self.entrySleep = mtk.Entry(self.settings)
        self.entrySleep.place(x=260, y=70, width=80, height=20)

        self.statusNow = mtk.Label(self.settings, text="当前进度:")
        self.statusNow.place(x=420, y=10, width=60, height=20)
        self.statusNowText = mtk.Label(self.settings, text="0/0")
        self.statusNowText.place(x=450, y=50, width=60, height=20)

        self.showDataBox = mtk.LabelFrame(self.root, text="数据信息", fg="blue")
        self.showDataBox.place(x=50, y=170, width=400, height=400)
        title = ['1', '2', '3', '4']
        self.box = ttk.Treeview(self.showDataBox,
                                columns=title,
                                show='headings')
        self.box.place(x=20, y=15, width=360, height=340)
        self.box.column('1', width=50, anchor='center')
        self.box.column('2', width=100, anchor='center')
        self.box.column('3', width=50, anchor='center')
        self.box.column('4', width=160, anchor='center')
        self.box.heading('1', text='序号')
        self.box.heading('2', text='手机号')
        self.box.heading('3', text='优惠')
        self.box.heading('4', text='ERROR信息')
        self.VScroll1 = Scrollbar(self.box,
                                  orient='vertical',
                                  command=self.box.yview)
        self.VScroll1.pack(side="right", fill="y")
        self.box.configure(yscrollcommand=self.VScroll1.set)
        self.box.bind(sequence="<Double-Button-1>",
                      func=lambda x: self.thread_it(self.showDetail))

        self.btnBox = mtk.LabelFrame(self.root, text="任务栏", fg="blue")
        self.btnBox.place(x=480, y=170, width=170, height=400)

        self.fileBox = mtk.LabelFrame(self.btnBox)
        self.fileBox.place(x=15, y=30, width=140, height=120)

        self.loadExcel = mtk.Button(
            self.fileBox,
            text="导入Excel",
            command=lambda: self.thread_it(self.__loadExcel))
        self.loadExcel.place(x=15, y=20, width=100, height=30)
        self.btnEnd = mtk.Button(
            self.fileBox,
            text="导出Excel",
            command=lambda: self.thread_it(self.__saveExcel))
        self.btnEnd.place(x=15, y=70, width=100, height=30)

        self.btnBbox = mtk.LabelFrame(self.btnBox)
        self.btnBbox.place(x=15, y=200, width=140, height=120)
        self.btnStart = mtk.Button(self.btnBbox,
                                   text="开始",
                                   command=lambda: self.thread_it(self.start))
        self.btnStart.place(x=15, y=20, width=100, height=30)
        self.btnStop = mtk.Button(self.btnBbox,
                                  text="停止",
                                  command=lambda: self.thread_it(self.stop))
        self.btnStop.place(x=15, y=70, width=100, height=30)
Ejemplo n.º 12
0
    def creatUI(self):
        self.window = tk.Tk()
        self.window.title("GDMapPoi")
        # 设置窗口大小和位置
        self.window.geometry('800x650+500+50')
        # 设置字体
        self.font = tf.Font(size=10)

        # poi搜索
        # self.oneSearch = tk.Label(self.window, text="Poi搜索", font=self.font)
        # self.oneSearch.place(x=20, y=50)
        # 地 区
        self.label_totals = tk.LabelFrame(self.window, text="地 区", font=self.font, padx=10, pady=10)
        self.label_totals.place(x=20, y=50)
        self.window_entry_cities = scrolledtext.ScrolledText(self.label_totals, width=20, height=5, wrap=tk.WORD,
                                                             font=tf.Font(size=12))
        self.window_entry_cities.grid()

        # 关键词
        self.label_keywords = tk.LabelFrame(self.window, text="关键词", font=self.font, padx=10, pady=10)
        self.label_keywords.place(x=250, y=50)
        self.window_entry_keywords = scrolledtext.ScrolledText(self.label_keywords, width=20, height=5, wrap=tk.WORD,
                                                               font=tf.Font(size=12))
        self.window_entry_keywords.grid()

        # 高德API接口KEY
        self.label_totals = tk.LabelFrame(self.window, text="高德API接口KEY", font=self.font, padx=10, pady=10)
        self.label_totals.place(x=550, y=80)
        self.window_entry_cities = scrolledtext.ScrolledText(self.label_totals, width=20, height=2, wrap=tk.WORD,
                                                             font=tf.Font(size=11))
        self.window_entry_cities.grid()

        # 数据量
        self.label_totals = tk.LabelFrame(self.window, text="数据量", font=self.font, padx=10, pady=10)
        self.label_totals.place(x=550, y=200)
        self.window_entry_totals = scrolledtext.ScrolledText(self.label_totals, width=20, height=2, wrap=tk.WORD,
                                                             font=tf.Font(size=11))
        self.window_entry_totals.grid()

        # # 查询button
        # self.btn_seacch = tk.Button(self.window, text="查询", font=self.font,
        #                             )
        # self.btn_seacch.place(x=630, y=500, width=150, height=30)
        #
        # # 导出excel
        # self.btn_excel = tk.Button(self.window, text="导出文件", font=self.font,
        #                            )
        # self.btn_excel.place(x=630, y=540, width=150, height=30)
        #
        # 数据展示
        self.label_show_data = tk.LabelFrame(self.window, text="数据展示", font=self.font, padx=10, pady=10)
        self.label_show_data.place(x=20, y=200)
        self.window_showdata = scrolledtext.ScrolledText(self.label_show_data, width=57, height=20, wrap=tk.WORD,
                                                         font=tf.Font(size=11))
        # self.window_showdata.grid()
        # self.scrollbar = tk.Scrollbar(self.window_showdata)
        # self.scrollbar.pack(side=tk.RIGHT, fill=tk.Y)
        title = ['1', '2', '3', '4', '5', '6', '7']
        self.box = ttk.Treeview(self.window_showdata, columns=title, show='headings')

        self.box.place(x=0, y=0, height=20)
        # self.box.grid()
        self.box.column('1', width=50, anchor='center')
        self.box.column('2', width=50, anchor='center')
        self.box.column('3', width=100, anchor='center')
        self.box.column('4', width=100, anchor='center')
        self.box.column('5', width=100, anchor='center')
        self.box.column('6', width=50, anchor='center')
        self.box.column('7', width=50, anchor='center')
        self.box.heading('1', text='省份')
        self.box.heading('2', text='城市')
        self.box.heading('3', text='名称')
        self.box.heading('4', text='地址')
        self.box.heading('5', text='电话')
        self.box.heading('6', text='经度')
        self.box.heading('7', text='纬度')
        self.window_showdata.grid()
Ejemplo n.º 13
0
    def createPage(self):
        self.baseInfo = mtk.LabelFrame(self.root, text="当前用户", fg="blue")
        self.baseInfo.place(x=30, y=50, width=250, height=150)

        self.userName = mtk.Label(self.baseInfo, text="姓 名:")
        self.userName.place(x=20, y=10, width=80, height=25)
        self.userNameText = mtk.Entry(self.baseInfo)
        self.userNameText.place(x=110, y=10, width=100, height=25)
        self.userNameText.insert(0, self.NAME)
        self.userNameText.bind(sequence="<Return>",
                               func=lambda x: self.thread_it(self.updateName))
        self.taskName = mtk.Label(self.baseInfo, text="预约业务:")
        self.taskName.place(x=20, y=45, width=80, height=25)
        self.taskNameText = mtk.Label(self.baseInfo, text="人才引进落户申请")
        self.taskNameText.place(x=110, y=45, width=100, height=25)

        self.seetings = mtk.LabelFrame(self.root, text="设 置", fg="blue")
        self.seetings.place(x=320, y=50, width=250, height=150)

        self.taskDate = mtk.Label(self.seetings, text="预约日期:")
        self.taskDate.place(x=10, y=10, width=80, height=25)
        self.taskDateText = mtk.Entry(self.seetings)
        self.taskDateText.place(x=100, y=10, width=100, height=25)
        self.taskDateText.bind(sequence="<Double-Button-1>",
                               func=lambda x: self.thread_it(self.getDate))

        self.timeChoose = mtk.Label(self.seetings, text="预约时间:")
        self.timeChoose.place(x=10, y=50, width=80, height=25)
        self.timeChooseText = ttk.Combobox(self.seetings)
        self.timeChooseText.place(x=100, y=50, width=100, height=25)
        self.timeChooseText["values"] = ["09:00-12:00", "13:00-70:00"]

        self.taskSleep = mtk.Label(self.seetings, text="延时设置:")
        self.taskSleep.place(x=10, y=90, width=80, height=25)
        self.taskSleepText = mtk.Entry(self.seetings)
        self.taskSleepText.place(x=100, y=90, width=100, height=25)

        self.startBtn = mtk.Button(
            self.root,
            text="预约",
            command=lambda: self.thread_it(self.startTask))
        self.startBtn.place(x=470, y=440, width=100, height=30)

        self.stopBtn = mtk.Button(self.root,
                                  text="暂停",
                                  command=lambda: self.thread_it(self.stop))
        self.stopBtn.place(x=470, y=490, width=100, height=30)

        self.timeNow = mtk.LabelFrame(self.root, text="当前时间:", fg="blue")
        self.timeNow.place(x=450, y=270, width=150, height=120)

        self.timeNowText = mtk.Label(self.timeNow, fg="green")
        self.timeNowText.place(x=20, y=20, width=110, height=60)
        self.timeNowText["text"] = datetime.now().strftime(
            '%Y-%m-%d \n\n %H:%M:%S')

        self.logInfo = mtk.LabelFrame(self.root, text="日志信息", fg="blue")
        self.logInfo.place(x=30, y=230, width=400, height=350)

        self.logTxt = scrolledtext.ScrolledText(self.logInfo, fg="green")
        self.logTxt.place(x=20, y=15, width=360, height=290)
Ejemplo n.º 14
0
    def creatUI(self):
        # 数据展示
        self.showData = mtk.LabelFrame(self.root, text="新任务", fg="blue")
        self.showData.place(x=20, y=20, width=760, height=510)

        title = ['1', '2', '3', '4', '5', '6']
        self.box = ttk.Treeview(self.showData, columns=title, show='headings')
        self.box.place(x=20, y=15, width=730, height=450)
        self.box.column('1', width=30, anchor='center')
        self.box.column('2', width=180, anchor='center')
        self.box.column('3', width=100, anchor='center')
        self.box.column('4', width=50, anchor='center')
        self.box.column('5', width=50, anchor='center')
        self.box.column('6', width=140, anchor='center')

        self.box.heading('1', text='序号')
        self.box.heading('2', text='任务名称')
        self.box.heading('3', text='悬赏主ID')
        self.box.heading('4', text='关键字')
        self.box.heading('5', text='赏金')
        self.box.heading('6', text='获取时间')

        self.VScroll1 = ttk.Scrollbar(self.box,
                                      orient='vertical',
                                      command=self.box.yview)
        self.VScroll1.pack(side="right", fill="y")
        self.box.configure(yscrollcommand=self.VScroll1.set)

        self.box.bind(sequence="<Double-Button-1>",
                      func=lambda x: self.thread_it(self.showDetail))

        # 日志
        self.logs = mtk.LabelFrame(self.root, text="log日志", fg="blue")
        self.logs.place(x=20, y=550, width=300, height=200)
        self.logtext = scrolledtext.ScrolledText(self.logs, fg="green")
        self.logtext.place(x=20, y=15, width=270, height=140)

        self.settings = mtk.LabelFrame(self.root, text="设置", fg="blue")
        self.settings.place(x=340, y=550, width=440, height=200)

        self.timeSleep = mtk.Label(self.settings, text="任务延时(分钟):")
        self.timeSleep.place(x=20, y=30, width=100, height=25)
        self.timeSleepText = mtk.Entry(self.settings)
        self.timeSleepText.place(x=120, y=30, width=80, height=25)

        self.timeNow = mtk.Label(self.settings, text="当前时间:")
        self.timeNow.place(x=20, y=100, width=70, height=25)
        self.timeNowText = mtk.Label(
            self.settings,
            text=str(datetime.now().strftime("%Y-%m-%d %H:%M:%S")))
        self.timeNowText.place(x=100, y=100, width=150, height=25)

        self.startBtn = mtk.Button(self.settings,
                                   text="启动",
                                   command=lambda: self.thread_it(self.start))
        self.startBtn.place(x=280, y=30, width=100, height=30)

        self.stopBtn = mtk.Button(self.settings,
                                  text="退出",
                                  command=lambda: self.thread_it(self.stop))
        self.stopBtn.place(x=280, y=100, width=100, height=30)
Ejemplo n.º 15
0
    def __createGUI(self):
        self.root = mtk.Tk()
        self.root.title("宽带查询助手2.0")
        self.root.geometry("860x700")
        self.companySet = mtk.LabelFrame(text="通信公司选择", fg="blue")
        self.companySet.place(x=50, y=20, width=220, height=100)

        self.labelCompany = mtk.Label(self.companySet, text="通信公司:")
        self.labelCompany.place(x=20, y=20, width=60, height=25)
        self.boxCompany = ttk.Combobox(self.companySet)
        self.boxCompany.place(x=100, y=20, width=80, height=25)
        self.boxCompany["values"] = ["中国移动", "中国联通"]

        self.loadExcel = mtk.LabelFrame(text="导入Excel文件", fg="blue")
        self.loadExcel.place(x=320, y=20, width=220, height=100)
        self.fileChoose = mtk.Button(
            self.loadExcel,
            text="选择文件",
            command=lambda: self.thread_it(self.__loadExcel))
        self.fileChoose.place(x=15, y=40, width=80, height=25)
        self.outExcel = mtk.Button(
            self.loadExcel,
            text="导出Excel",
            command=lambda: self.thread_it(self._saveExcel))
        self.outExcel.place(x=120, y=40, width=80, height=25)

        self.staticData = mtk.Label(self.loadExcel, text="数量统计:")
        self.staticData.place(x=20, y=5, width=60, height=20)
        self.entryShowNum = mtk.Label(self.loadExcel, text="0/0")
        self.entryShowNum.place(x=90, y=5, width=100, height=20)

        self.showDataBox = mtk.LabelFrame(text="数据展示区域", fg="blue")
        self.showDataBox.place(x=50, y=150, width=760, height=300)

        title = ['1', '2', '3', '4', '5', '6', '7', '8']
        self.box = ttk.Treeview(self.showDataBox,
                                columns=title,
                                show='headings')
        self.box.place(x=20, y=15, width=730, height=250)
        self.box.column('1', width=30, anchor='center')
        self.box.column('2', width=90, anchor='center')
        self.box.column('3', width=100, anchor='center')
        self.box.column('4', width=80, anchor='center')
        self.box.column('5', width=60, anchor='center')
        self.box.column('6', width=80, anchor='center')
        self.box.column('7', width=100, anchor='center')
        self.box.column('8', width=80, anchor='center')

        self.box.heading('1', text='序号')
        self.box.heading('2', text='宽带编码')
        self.box.heading('3', text='机主姓名')
        self.box.heading('4', text='产品名称')
        self.box.heading('5', text='签约速率')
        self.box.heading('6', text='联系电话')
        self.box.heading('7', text='装机地址')
        self.box.heading('8', text='到期时间')
        self.VScroll1 = Scrollbar(self.box,
                                  orient='vertical',
                                  command=self.box.yview)
        self.VScroll1.pack(side="right", fill="y")
        self.box.configure(yscrollcommand=self.VScroll1.set)

        self.btnBox = mtk.LabelFrame(text="任务栏", fg="blue")
        self.btnBox.place(x=590, y=20, width=220, height=100)
        self.btnStart = mtk.Button(self.btnBox,
                                   text="开始",
                                   command=lambda: self.thread_it(self.start))
        self.btnStart.place(x=20, y=20, width=80, height=30)
        self.btnEnd = mtk.Button(self.btnBox,
                                 text="退出",
                                 command=lambda: self.thread_it(self.stop))
        self.btnEnd.place(x=120, y=20, width=80, height=30)

        self.loginfo = mtk.LabelFrame(text="log日志信息", fg="blue")
        self.loginfo.place(x=50, y=480, width=760, height=150)

        self.logtext = scrolledtext.ScrolledText(self.loginfo, fg="green")
        self.logtext.place(x=20, y=15, width=730, height=100)
    def __createGUI(self):
        self.root = mtk.Tk()
        self.root.title("宽带通查询助手1.0")
        self.root.geometry("860x500")

        self.loadExcel = mtk.LabelFrame(text="导入Excel文件", fg="blue")
        self.loadExcel.place(x=50, y=20, width=220, height=100)
        self.fileChoose = mtk.Button(
            self.loadExcel,
            text="选择文件",
            command=lambda: self.thread_it(self.__loadExcel))
        self.fileChoose.place(x=70, y=5, width=80, height=30)
        self.outExcel = mtk.Button(
            self.loadExcel,
            text="导出Excel",
            command=lambda: self.thread_it(self._saveExcel))
        self.outExcel.place(x=70, y=43, width=80, height=30)

        self.btnBox = mtk.LabelFrame(text="任务栏", fg="blue")
        self.btnBox.place(x=320, y=20, width=220, height=100)
        self.btnStart = mtk.Button(self.btnBox,
                                   text="开始",
                                   command=lambda: self.thread_it(self.start))
        self.btnStart.place(x=70, y=5, width=80, height=30)
        self.btnEnd = mtk.Button(self.btnBox,
                                 text="退出",
                                 command=lambda: self.thread_it(self.stop))
        self.btnEnd.place(x=70, y=43, width=80, height=30)

        self.staticData = mtk.LabelFrame(self.root, text="数量统计", fg="blue")
        self.staticData.place(x=583, y=20, width=220, height=100)
        self.labelDataTotal = mtk.Label(self.staticData, text="总导入数量:")
        self.labelDataTotal.place(x=20, y=5, width=80, height=30)
        self.entryDataTotal = mtk.Label(self.staticData, text="0")
        self.entryDataTotal.place(x=120, y=5, width=80, height=30)

        self.labelDoneTotal = mtk.Label(self.staticData, text="已完成数量:")
        self.labelDoneTotal.place(x=20, y=40, width=80, height=30)
        self.entryDoneTotal = mtk.Label(self.staticData, text="0")
        self.entryDoneTotal.place(x=120, y=40, width=80, height=30)

        self.showDataBox = mtk.LabelFrame(text="数据展示区域", fg="blue")
        self.showDataBox.place(x=50, y=150, width=760, height=300)

        title = ['1', '2', '3', '4', '5', '6']
        self.box = ttk.Treeview(self.showDataBox,
                                columns=title,
                                show='headings')
        self.box.place(x=20, y=15, width=730, height=250)
        self.box.column('1', width=80, anchor='center')
        self.box.column('2', width=120, anchor='center')
        self.box.column('3', width=180, anchor='center')
        self.box.column('4', width=80, anchor='center')
        self.box.column('5', width=100, anchor='center')
        self.box.column('6', width=150, anchor='center')
        self.box.heading('1', text='序号')
        self.box.heading('2', text='用户ID')
        self.box.heading('3', text='OLT名称')
        self.box.heading('4', text='PON端口')
        self.box.heading('5', text='用户状态')
        self.box.heading('6', text='时间')
        self.VScroll1 = Scrollbar(self.box,
                                  orient='vertical',
                                  command=self.box.yview)
        self.VScroll1.pack(side="right", fill="y")
        self.box.configure(yscrollcommand=self.VScroll1.set)